summaryrefslogtreecommitdiff
path: root/plugins/redis/config.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-15 00:52:09 +0300
committerGitHub <[email protected]>2021-01-15 00:52:09 +0300
commit83e510d734815968a998fa8e4c14ac0900b9c485 (patch)
tree50dc6e22db7ff51b0fcf3cce0a45b7b739e1f300 /plugins/redis/config.go
parent7542ae2d4c392290766405d31996378378aad975 (diff)
parentd4a067d1fdc4911cb5467620da981fca3dc4cc08 (diff)
Merge pull request #476 from spiral/fix/use_mapstructure_instead_yaml_tagsv2.0.0-beta7
fix(yaml): Use mapstructure structure tags instead of yaml
Diffstat (limited to 'plugins/redis/config.go')
-rw-r--r--plugins/redis/config.go42
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