Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseConf ¶
type BaseConf struct { PidFile string `mapstructure:"pid_file"` PprofBind []string `mapstructure:"pprof_bind"` MaxProc int }
BaseConf is struct of base config
type Config ¶
type Config struct { Base *BaseConf `mapstructure:"base"` Redis *RedisConf `mapstructure:"redis"` RPC *RPCConf `mapstructure:"rpc"` HTTP *HTTPConf `mapstructure:"http"` Log *log.Config `mapstructure:"log"` }
Config is struct of logic config
var ( // Conf is config for logic server Conf *Config )
type HTTPConf ¶
type HTTPConf struct { Address []string `mapstructure:"address"` ReadTimeout time.Duration `mapstructure:"read_timeout"` WriteTimeout time.Duration `mapstructure:"write_timeout"` ReadHeaderTimeout time.Duration `mapstructure:"read_header_timeout"` IdleTimeout time.Duration `mapstructure:"idle_timeout"` }
HTTPConf is config for http server
type RPCConf ¶
type RPCConf struct {
Address []string `mapstructure:"address"`
}
RPCConf is config for logic rpc
type RedisConf ¶
type RedisConf struct { Password string `mapstructure:"password"` Address string `mapstructure:"address"` DefaultDB int `mapstructure:"default_db"` MaxRetries int `mapstructure:"max_retries"` IdleTimeout time.Duration `mapstructure:"idle_timeout"` }
RedisConf is struct of redis config
Click to show internal directories.
Click to hide internal directories.