1
0
Fork 0

Change default production storage to HashDB

This commit is contained in:
Gregory Eremin 2014-07-13 17:14:26 +07:00
parent ccb2e46400
commit 038f0d83d4
1 changed files with 9 additions and 1 deletions

View File

@ -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 {