diff options
Diffstat (limited to 'plugins/redis/config.go')
-rw-r--r-- | plugins/redis/config.go | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/plugins/redis/config.go b/plugins/redis/config.go index ebcefed1..58766293 100644 --- a/plugins/redis/config.go +++ b/plugins/redis/config.go @@ -3,27 +3,27 @@ package redis import "time" type Config struct { - Addrs []string `yaml:"addrs"` - DB int `yaml:"db"` - Username string `yaml:"username"` - Password string `yaml:"password"` - MasterName string `yaml:"master_name"` - SentinelPassword string `yaml:"sentinel_password"` - RouteByLatency bool `yaml:"route_by_latency"` - RouteRandomly bool `yaml:"route_randomly"` - MaxRetries int `yaml:"max_retries"` - DialTimeout time.Duration `yaml:"dial_timeout"` - MinRetryBackoff time.Duration `yaml:"min_retry_backoff"` - MaxRetryBackoff time.Duration `yaml:"max_retry_backoff"` - PoolSize int `yaml:"pool_size"` - MinIdleConns int `yaml:"min_idle_conns"` - MaxConnAge time.Duration `yaml:"max_conn_age"` - ReadTimeout time.Duration `yaml:"read_timeout"` - WriteTimeout time.Duration `yaml:"write_timeout"` - PoolTimeout time.Duration `yaml:"pool_timeout"` - IdleTimeout time.Duration `yaml:"idle_timeout"` - IdleCheckFreq time.Duration `yaml:"idle_check_freq"` - ReadOnly bool `yaml:"read_only"` + Addrs []string `mapstructure:"addrs"` + DB int `mapstructure:"db"` + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` + MasterName string `mapstructure:"master_name"` + SentinelPassword string `mapstructure:"sentinel_password"` + RouteByLatency bool `mapstructure:"route_by_latency"` + RouteRandomly bool `mapstructure:"route_randomly"` + MaxRetries int `mapstructure:"max_retries"` + DialTimeout time.Duration `mapstructure:"dial_timeout"` + MinRetryBackoff time.Duration `mapstructure:"min_retry_backoff"` + MaxRetryBackoff time.Duration `mapstructure:"max_retry_backoff"` + PoolSize int `mapstructure:"pool_size"` + MinIdleConns int `mapstructure:"min_idle_conns"` + MaxConnAge time.Duration `mapstructure:"max_conn_age"` + ReadTimeout time.Duration `mapstructure:"read_timeout"` + WriteTimeout time.Duration `mapstructure:"write_timeout"` + PoolTimeout time.Duration `mapstructure:"pool_timeout"` + IdleTimeout time.Duration `mapstructure:"idle_timeout"` + IdleCheckFreq time.Duration `mapstructure:"idle_check_freq"` + ReadOnly bool `mapstructure:"read_only"` } // InitDefaults initializing fill config with default values |