Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ LogLevel: "Info", AutoCreate: true, UpstreamServerList: make([]string, 0), AppList: map[string]constant.AppList{ "9001.4.1.1": { RegionName: "hkrpg_rel", App: map[string]constant.AppNet{ "port_http": { InnerPort: "8080", InnerAddr: "127.0.0.1", OuterPort: "8080", OuterAddr: "127.0.0.1", }, }, }, }, NetConf: map[string]string{ "Node": "127.0.0.1:20081", }, MysqlConf: map[string]constant.MysqlConf{ "account": { Dsn: "root:password@tcp(127.0.0.1:3306)/hkrpg-go-account?charset=utf8mb4&parseTime=True&loc=Local", }, "user": { Dsn: "root:password@tcp(127.0.0.1:3306)/hkrpg-go-user?charset=utf8mb4&parseTime=True&loc=Local", }, "player": { Dsn: "root:password@tcp(127.0.0.1:3306)/hkrpg-go-player?charset=utf8mb4&parseTime=True&loc=Local", }, "conf": { Dsn: "root:password@tcp(127.0.0.1:3306)/hkrpg-go-conf?charset=utf8mb4&parseTime=True&loc=Local", }, }, RedisConf: map[string]constant.RedisConf{ "player_login": { Addr: "127.0.0.1:6379", Password: "password", DB: 1, }, "player_status": { Addr: "127.0.0.1:6379", Password: "password", DB: 1, }, "player_mail": { Addr: "127.0.0.1:6379", Password: "password", DB: 1, }, "player_chat": { Addr: "127.0.0.1:6379", Password: "password", DB: 1, }, "player_brief_data": { Addr: "127.0.0.1:6379", Password: "password", DB: 1, }, }, Email: &email{ From: "123456789@qq.com", Addr: "smtp.qq.com:587", Host: "smtp.qq.com", Identity: "123456789", }, }
View Source
var FileNotExist = errors.New("config file not found")
Functions ¶
func LoadConfig ¶ added in v1.5.0
Types ¶
type Config ¶ added in v1.5.0
type Config struct { LogLevel string `json:"LogLevel"` AutoCreate bool `json:"AutoCreate"` UpstreamServerList []string `json:"UpstreamServerList"` AppList map[string]constant.AppList `json:"AppList"` NetConf map[string]string `json:"NetConf"` Email *email `json:"Email"` MysqlConf map[string]constant.MysqlConf `json:"MysqlConf"` RedisConf map[string]constant.RedisConf `json:"RedisConf"` }
Click to show internal directories.
Click to hide internal directories.