Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SysConfig ServerConfig SysConfigDir string SysConfigName string )
Functions ¶
func InitConfig ¶
func InitConfig() error
Types ¶
type MongoDbConfig ¶
type MysqlConfig ¶
type MysqlConfig struct { MysqlMaxIdle int MysqlMaxActive int MysqlDb []MysqlDbConfig }
type MysqlDbConfig ¶
type RedisConfig ¶
type RedisConfig struct { RedisMaxIdle int RedisMaxActive int RedisTimeout int RedisDb []RedisDbConfig }
type RedisDbConfig ¶
type RocketmqConfig ¶
type ServerConfig ¶
type ServerConfig struct { MysqlCfg *MysqlConfig // MongoCfg *MongoDbConfig // RedisCfg *RedisConfig // RocketmqCfg *RocketmqConfig // OssCfg *OssConfig // HttpPort string // 监听端口 ServiceName string // 服务名称 Debug bool // 是否调试模式 }
func NewConfig ¶
func NewConfig(configs ...*viper.Viper) ServerConfig
NewConfig creates a new config with a given viper config if given
Click to show internal directories.
Click to hide internal directories.