Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Listen string `toml:"listen"` RedisServers map[string]RedisServer `toml:"redisservers"` }
Config 对应配置文件结构
func UnmarshalConfig ¶
UnmarshalConfig 解析toml配置
func (Config) RedisServerConf ¶
func (c Config) RedisServerConf(key string) (RedisServer, bool)
RedisServerConf 获取数据库配置
type RedisServer ¶
type RedisServer struct { Addr string `toml:"addr"` Password string `toml:"password"` DB int `toml:"db"` }
RedisServer 表示 redis 服务器配置
Click to show internal directories.
Click to hide internal directories.