Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConsulCacheConfig ¶
func InitConsulCacheConfig()
func InitFetcherConfig ¶
func InitFetcherConfig()
func ReadConfig ¶
Types ¶
type ConsulCacheConfig ¶
type ConsulCacheConfig struct { Logger LogConfig `mapstructure:"logger"` RedisConsul RedisConf `mapstructure:"redis-consul"` StateMQ RocketMQ `mapstructure:"rocketmq-state"` Cache struct { Expiration time.Duration `mapstructure:"expiration"` } `mapstructure:"cache"` Web struct { Mode string `mapstructure:"mode"` MiddlewareEnabled bool `mapstructure:"middleware_enabled"` ListenAddress string `mapstructure:"listen_address"` PprofAddress string `mapstructure:"pprof_address"` PrometheusAddress string `mapstructure:"prometheus_address"` } `mapstructure:"web"` }
func GetConsulCacheOpts ¶
func GetConsulCacheOpts() *ConsulCacheConfig
type FetcherConfig ¶
type FetcherConfig struct { Logger LogConfig `mapstructure:"logger"` Consuls []model.ConsulInfo `mapstructure:"consuls"` Services []string `mapstructure:"services"` RedisConsul RedisConf `mapstructure:"redis-consul"` StateMQ RocketMQ `mapstructure:"rocketmq-state"` }
func GetFetcherOpts ¶
func GetFetcherOpts() *FetcherConfig
type RedisConf ¶
type RedisConf struct { Addr string `mapstructure:"addr"` Password string `mapstructure:"password"` DB int `mapstructure:"db"` MaxRetries int `mapstructure:"maxRetries"` MinRetryBackoff time.Duration `mapstructure:"minRetryBackoff"` MaxRetryBackoff time.Duration `mapstructure:"maxRetryBackoff"` DialTimeout time.Duration `mapstructure:"dialTimeout"` ReadTimeout time.Duration `mapstructure:"readTimeout"` WriteTimeout time.Duration `mapstructure:"writeTimeout"` PoolSize int `mapstructure:"poolSize"` PoolTimeout time.Duration `mapstructure:"poolTimeout"` }
type RocketMQ ¶
type RocketMQ struct { NameServers string `mapstructure:"NameServers"` Topic string `mapstructure:"topic"` Producer RocketMQParticipant `mapstructure:"producer"` Consumer RocketMQParticipant `mapstructure:"consumer"` }
type RocketMQParticipant ¶
type RocketMQParticipant struct {
GroupID string `mapstructure:"groupId"`
}
Click to show internal directories.
Click to hide internal directories.