示例#1
0
文件: config.go 项目: knolleary/pat
func DescribeParameters(config config.Config) {
	config.StringVar(&params.csvDir, "csv-dir", "output/csvs", "Directory to Store CSVs")
	config.BoolVar(&params.useRedis, "use-redis", false, "True if redis should be used (requires the -redis-host, -redis-port and -redis-password arguments)")
	config.StringVar(&params.redisHost, "redis-host", "localhost", "Redis hostname")
	config.IntVar(&params.redisPort, "redis-port", 6379, "Redis port")
	config.StringVar(&params.redisPassword, "redis-password", "", "Redis password")
	config.EnvVar(&params.vcapServices, "VCAP_SERVICES", "", "The VCAP_SERVICES environment variable")
}
示例#2
0
文件: server.go 项目: knolleary/pat
func InitCommandLineFlags(config config.Config) {
	config.EnvVar(&params.port, "VCAP_APP_PORT", "8080", "The port to bind to")
	store.DescribeParameters(config)
}