Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
Types ¶
type Config ¶
type Config struct { APP APP `mapstructure:"app"` Mysql Mysql `mapstructure:"mysql"` Redis Redis `mapstructure:"redis"` Log Log `mapstructure:"log"` HTTPServer HTTPServer `mapstructure:"httpServer"` FilePath FilePath `mapstructure:"filePath"` Minio Minio `mapstructure:"minio"` Captcha Captcha `mapstructure:"captcha"` RpcXServer RpcXServer `mapstructure:"rpcServer"` }
type HTTPServer ¶
type Log ¶
type Log struct { Level string `mapstructure:"level"` Stdout bool `mapstructure:"stdout"` LogRate bool `mapstructure:"logRate"` LogRateConf LogRateConf `mapstructure:"logRateConf"` }
type LogRateConf ¶
type Mysql ¶
type Mysql struct { User string `mapstructure:"user"` Password string `mapstructure:"password"` Addr string `mapstructure:"addr"` Port int `mapstructure:"port"` Database string `mapstructure:"database"` MaxOpenConn int `mapstructure:"maxOpenConn"` MaxIdleConn int `mapstructure:"maxIdleConn"` ConnMaxLifeTime time.Duration `mapstructure:"connMaxLifeTime"` LogLevel int `mapstructure:"logLevel"` }
type Options ¶
type Options struct { ComponentConfig Config WebServer *core.WebServer RpcXServer *core.RpcXServer Db *gorm.DB Redis *redis.Client Minio *minio.Client }
type RpcXServer ¶
type RpcXServer struct { ServerName string `mapstructure:"serverName"` Address string `mapstructure:"address"` Port int `mapstructure:"port"` ReadTimeout int64 `mapstructure:"readTimeout"` // 单位秒 WriteTimeout int64 `mapstructure:"writeTimeout"` // 单位秒 EtcdNodes []string `mapstructure:"etcdNodes"` EtcdBasePath string `mapstructure:"etcdBasePath"` EtcdUpdateInterval int64 `mapstructure:"etcdUpdateInterval"` // 单位秒 EtcdExpired int64 `mapstructure:"etcdExpired"` // 单位秒 PondPoolMaxWorkers int `mapstructure:"pondPoolMaxWorkers"` // 协程配置,和pondPoolMaxCapacity必须都有值才生效 PondPoolMaxCapacity int `mapstructure:"pondPoolMaxCapacity"` CertFile string `mapstructure:"certFile"` KeyFile string `mapstructure:"keyFile"` }
Click to show internal directories.
Click to hide internal directories.