1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- // 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
- SmartSupplierManagement RPCNode
- SmartThirdparty RPCNode
- }
- type InfluxdbConfig struct {
- Addr string
- Username string
- Password string
- }
- type Configure struct {
- // 基础配置
- VedioArea string
- K8s bool
- RunMode string
- Log LogConfig
- // 按需配置
- Mysql MysqlConfig
- Redis RedisConfig
- Elastic ElasticConfig
- ThirdPart ThirdPartConfig
- Influxdb InfluxdbConfig
- // 所要启用的服务
- Rpc RPCConfig
- }
|