123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- // Copyright 2019 github.com. All rights reserved.
- // Use of this source code is governed by github.com.
- package config
- type LogConfig struct {
- Path string
- Level string
- MaxSize int
- MaxBackups int
- MaxAge int
- Stacktrace bool
- }
- type MysqlConfig struct {
- User string
- Password string
- Addr string
- DB string
- Charset string
- MaxIdle int
- MaxConn int
- LogMode bool
- }
- type RedisConfig struct {
- Addrs []string
- Password string
- DB int
- PoolSize int
- MinIdleConns int
- MaxRetries int
- Cluster bool
- }
- type ElasticConfig struct {
- Addrs []string
- Sniff bool
- }
- type ThirdPartNode struct {
- Host string
- AppKey string
- AppSecret string
- }
- type ThirdPartConfig struct {
- PartName ThirdPartNode
- }
- type RPCNode struct {
- ServiceName string
- ServicePort int
- ServiceIp string
- MysqlDb string
- RedisDb int
- LogLevel string
- LogStacktrace bool
- }
- type KeepaliveConfig struct {
- ClientTime int
- ClientTimeout int
- ServerTime int
- ServerTimeout int
- ServerMiniTime int
- }
- type RPCConfig struct {
- Keepalive KeepaliveConfig
- SmartAuth RPCNode
- SmartAlarm RPCNode
- SmartThirdparty RPCNode
- SmartProvincial RPCNode
- //DustMonitor RPCNode
- }
- type OssConfig struct {
- Protocol string
- UseSsl bool
- Endpoint string
- Id string
- Key string
- DustBucket string
- }
- type InfluxdbConfig struct {
- Addr string
- Username string
- Password string
- }
- type GatewayConfig struct {
- ServiceName string
- ServiceIp string
- ServicePort int
- GatewayIp string
- GatewayPort int
- MysqlDb string
- RedisDb int
- LogLevel string
- LogStacktrace bool
- }
- type Configure struct {
- // 基础配置
- //LocalMode bool
- K8s bool
- RunMode string
- Log LogConfig
- Mysql MysqlConfig
- // 按需配置
- Influxdb InfluxdbConfig
- // 所要启用的服务
- Rpc RPCConfig
- DustMonitor GatewayConfig
- Oss OssConfig
- ChannelSnapUrl string
- }
|