Change default production storage to HashDB
This commit is contained in:
parent
ccb2e46400
commit
038f0d83d4
10
config.go
10
config.go
|
@ -5,6 +5,10 @@ import (
|
|||
"fmt"
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultProductionStorage = "burlesque.kch#opts=c#zcomp=gz#msiz=524288000"
|
||||
)
|
||||
|
||||
type (
|
||||
Config struct {
|
||||
Storage string
|
||||
|
@ -19,11 +23,15 @@ var (
|
|||
)
|
||||
|
||||
func SetupConfig() {
|
||||
cfg.Storage = *flag.String("storage", "-", "Kyoto Cabinet storage path (e.g. storage.kch#zcomp=gz#capsiz=524288000)")
|
||||
cfg.Storage = *flag.String("storage", "-", "Kyoto Cabinet storage path (e.g. "+DefaultProductionStorage+")")
|
||||
cfg.Env = *flag.String("environment", "development", "Process environment: development or production")
|
||||
cfg.Port = *flag.Int("port", 4401, "Server HTTP port")
|
||||
cfg.Rollbar = *flag.String("rollbar", "", "Rollbar token")
|
||||
flag.Parse()
|
||||
|
||||
if cfg.Env == "production" && cfg.Storage == "-" {
|
||||
cfg.Storage = DefaultProductionStorage
|
||||
}
|
||||
}
|
||||
|
||||
func (c Config) PortString() string {
|
||||
|
|
Loading…
Reference in New Issue