Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRedisAddr ¶
GetRedisAddr printf the redis addr from srvconfig
Types ¶
type Gate ¶
type Gate struct { Host string `yaml:"host"` Port int `yaml:"port"` Mode string `yaml:"mode"` // 初始化Mode模式的Broker失败是否panic Panic bool `yaml:"panic"` }
Gate configure for Gate Node.
type Logic ¶
type Logic struct { Host string `yaml:"host"` Port int `yaml:"port"` Mode string `yaml:"mode"` // 初始化Mode模式的Broker失败是否panic Panic bool `yaml:"panic"` }
Logic configure for Logic Server
type Mongo ¶
type Mongo struct { Host string `yaml:"host"` Port string `yaml:"port"` DB string `yaml:"db"` Password string `yaml:"password"` Panic bool `yaml:"panic"` }
Mongo conf for mongoDB
type Redis ¶
type Redis struct { Host string `yaml:"host"` Port int `yaml:"port"` Password string `yaml:"password"` DB int `yaml:"db"` Panic bool `yaml:"panic"` }
Redis configure for Redis
type SrvConfig ¶
type SrvConfig struct { Build Mongo `yaml:"mongo" json:"Mongo,omitempty"` Redis `yaml:"redis" json:"Redis,omitempty"` Log `yaml:"log" json:"Log,omitempty"` HTTP `yaml:"http" json:"HTTP,omitempty"` SocketIO `yaml:"socket.io" json:"SocketIO,omitempty"` Logic `yaml:"logic" json:"Logic,omitempty"` Gate `yaml:"gate" json:"Gate,omitempty"` AppKey string `yaml:"appkey" json:"AppKey"` }
SrvConfig records for all conf
func InitSrvCfg ¶
Click to show internal directories.
Click to hide internal directories.