Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitBrokerConfig ¶
func InitBrokerConfig() error
func InitLogicConfig ¶
func InitLogicConfig() error
Types ¶
type BrokerConfig ¶
type BrokerConfig struct {
Logger LogConfig `mapstructure:"logger"`
LogicDealer struct {
Address string `mapstructure:"address"`
} `mapstructure:"logic_dealer"`
Broker struct {
WebSocketAddress string `mapstructure:"ws_address"`
GrpcAddress string `mapstructure:"grpc_address"`
} `mapstructure:"broker"`
Ping struct {
Interval time.Duration `mapstructure:"interval"`
MaxWait time.Duration `mapstructure:"maxWait"`
} `mapstructure:"ping"`
}
func GetBrokerOpts ¶
func GetBrokerOpts() *BrokerConfig
type LogicConfig ¶
type LogicConfig struct {
Logger LogConfig `mapstructure:"logger"`
LogicDealer struct {
ListenAddress string `mapstructure:"listen_address"`
} `mapstructure:"logic_dealer"`
MySQLConf struct {
DSN string `mapstructure:"dsn"`
MaxIdleConn int `mapstructure:"max_idle_conn"`
MaxOpenConn int `mapstructure:"max_open_conn"`
ConnMaxLifeSecs int `mapstructure:"conn_max_life_secs"`
// 是否启动debug模式
// 若开启则会打印具体的执行SQL
Debug bool `mapstructure:"debug"`
} `mapstructure:"mysql"`
}
func GetLogicOpts ¶
func GetLogicOpts() *LogicConfig
Click to show internal directories.
Click to hide internal directories.