Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServerCfg = new(ServerConfig)
Functions ¶
Types ¶
type ServerConfig ¶
type ServerConfig struct { ServerName string `yaml:"server_name"` Port int `yaml:"port"` DB struct { Host string `yaml:"host"` Port int `yaml:"port"` User string `yaml:"user"` Password string `yaml:"password"` Dbname string `yaml:"dbname"` MaxIdle int `yaml:"max_idle,omitempty"` //设置连接池中空闲连接的最大数量 MaxOpen int `yaml:"max_open,omitempty"` //设置打开数据库连接的最大数量 } `yaml:"db"` Redis struct { Host string `yaml:"host"` Port int `yaml:"port"` Password string `yaml:"password"` } `yaml:"redis"` }
Click to show internal directories.
Click to hide internal directories.