Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Deploy *DeployConf `toml:"deploy"` Mysql *MysqlConf `toml:"mysql"` Redis *RedisConf `toml:"redis"` Mc *McConf `toml:"mc"` Kafka *KafkaConf `toml:"kafka"` }
Config struct define
type DeployConf ¶
type DeployConf struct {
APIAddr string `toml:"api_addr"` //api HTTP server listen address
}
DeployConf deploy config
type McConf ¶ added in v1.0.2
type McConf struct { Servers string `toml:"servers"` MaxActiveConnections int `toml:"max_active_connections"` MaxIdleConnections int `toml:"max_idle_connections"` MaxWaitTimeMs int `toml:"max_wait_time_ms"` MaxIdleTimeMs int `toml:"max_idle_time_ms"` ConnectionTimeoutMs int `toml:"connection_timeout_ms"` ReadTimeoutMs int `toml:"read_timeout_ms"` WriteTimeoutMs int `toml:"write_timeout_ms"` Rehash bool `toml:"rehash"` }
McConf memcached conifg
type MysqlConf ¶
type MysqlConf struct { Master string `toml:"master"` Slaves []string `toml:"slaves"` Port int `toml:"port"` Username string `toml:"username"` Password string `toml:"password"` Dbname string `toml:"dbname"` MaxOpenConnCount int `toml:"max_open_conn_count"` MaxIdleConnCount int `toml:"max_idle_conn_count"` ConnWaitTimeMs int `toml:"conn_wait_time_ms"` ConnIdleTimeMs int `toml:"conn_idle_time_ms"` ConnTimeoutMs int `toml:"conn_timeout_ms"` WriteTimeoutMs int `toml:"write_timeout_ms"` ReadTimeoutMs int `toml:"read_timeout_ms"` }
MysqlConf mysql config
type RedisConf ¶
type RedisConf struct { Master string `toml:"master"` Slaves []string `toml:"slaves"` MaxConns int `toml:"max_conns"` MaxIdle int `toml:"max_idle"` ReadTimeoutMs int `toml:"read_timeout_ms"` WriteTimeoutMs int `toml:"write_timeout_ms"` ConnectTimeoutMs int `toml:"connect_timeout_ms"` IdleTimeoutMs int `toml:"idle_timeout_ms"` DB int `toml:"DB"` Password string `toml:"Password"` }
RedisConf redis config
Click to show internal directories.
Click to hide internal directories.