Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = struct { Env Env `default:"develop" env:"ONCEKV_ENV"` Root string HTTPRequestTimeout time.Duration `default:"100000000" default:"ONCEKV_HTTP_REQUEST_TIMEOUT"` IdealResponseDuration time.Duration `default:"50000000" default:"ONCEKV_HTTP_IDEAL_RESPONSE_DURATION"` // etcd addrs and the the meta data key EtcdEndpoints []string `default:"['127.0.0.1:2379']" env:"ONCEKV_ETCD_ADDRS"` RaftKey string `default:"oncekv.nodes.http.adrr" env:"ONCEKV_DB_NODE_KEY"` RaftNodesKey string `default:"oncekv.db.nodes" env:"ONCEKV_DB_NODES_KEY"` CacheNodesKey string `default:"oncekv.cache.nodes" env:"ONCEKV_CACHE_NODES_KEY"` // db shard master ShardCount int `default:"10" env:"ONCEKV_SHARD_COUNT"` // cache server CacheMasterAddr string `default:"127.0.0.1:5550" env:"ONCEKV_CACHE_MASTER_ADDR"` // default is 10M CacheBytes int64 `default:"10485760" env:"ONCEKV_CACHE_BYTES"` // admin AdminAddr string `default:"127.0.0.1:5546" env:"ONCEKV_ADMIN_ADDR"` // TODO: choose log collector LogOut io.Writer }{}
Config for config
View Source
var ErrDataNotFound = errors.New("data not found")
ErrDataNotFound for error data not found
Functions ¶
Types ¶
type Env ¶
type Env string
Env for application environment
func (Env) IsProduction ¶
IsProduction returns if the env equals to production
Click to show internal directories.
Click to hide internal directories.