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"
|
"fmt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
DefaultProductionStorage = "burlesque.kch#opts=c#zcomp=gz#msiz=524288000"
|
||||||
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
Config struct {
|
Config struct {
|
||||||
Storage string
|
Storage string
|
||||||
@ -19,11 +23,15 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func SetupConfig() {
|
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.Env = *flag.String("environment", "development", "Process environment: development or production")
|
||||||
cfg.Port = *flag.Int("port", 4401, "Server HTTP port")
|
cfg.Port = *flag.Int("port", 4401, "Server HTTP port")
|
||||||
cfg.Rollbar = *flag.String("rollbar", "", "Rollbar token")
|
cfg.Rollbar = *flag.String("rollbar", "", "Rollbar token")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
if cfg.Env == "production" && cfg.Storage == "-" {
|
||||||
|
cfg.Storage = DefaultProductionStorage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c Config) PortString() string {
|
func (c Config) PortString() string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user