diff --git a/config/backends.go b/config/backends.go index 122617a6..a29d6a27 100644 --- a/config/backends.go +++ b/config/backends.go @@ -188,11 +188,11 @@ type RedisSentinel struct { } func (cfg *RedisSentinel) validateAndLog() error { - log.Infof("config.backend.redis-sentinel.sentinel_addrs: %s", cfg.SentinelAddrs) - log.Infof("config.backend.redis-sentinel.master_name: %s", cfg.MasterName) - log.Infof("config.backend.redis-sentinel.db: %d", cfg.Db) - log.Infof("config.backend.redis-sentinel.tls.enabled: %t", cfg.TLS.Enabled) - log.Infof("config.backend.redis-sentinel.tls.insecure_skip_verify: %t", cfg.TLS.InsecureSkipVerify) + log.Infof("config.backend.redis_sentinel.sentinel_addrs: %s", cfg.SentinelAddrs) + log.Infof("config.backend.redis_sentinel.master_name: %s", cfg.MasterName) + log.Infof("config.backend.redis_sentinel.db: %d", cfg.Db) + log.Infof("config.backend.redis_sentinel.tls.enabled: %t", cfg.TLS.Enabled) + log.Infof("config.backend.redis_sentinel.tls.insecure_skip_verify: %t", cfg.TLS.InsecureSkipVerify) return nil } diff --git a/config/config.go b/config/config.go index 59e02080..b84a0686 100644 --- a/config/config.go +++ b/config/config.go @@ -69,6 +69,16 @@ func setConfigDefaults(v *viper.Viper) { v.SetDefault("backend.redis.expiration", utils.REDIS_DEFAULT_EXPIRATION_MINUTES) v.SetDefault("backend.redis.tls.enabled", false) v.SetDefault("backend.redis.tls.insecure_skip_verify", false) + v.SetDefault("backend.redis.tls.enabled", false) + v.SetDefault("backend.redis.tls.insecure_skip_verify", false) + v.SetDefault("backend.redis_sentinel.db", 0) + v.SetDefault("backend.redis_sentinel.master_name", "") + v.SetDefault("backend.redis_sentinel.password", "") + v.SetDefault("backend.redis_sentinel.sentinel_addrs", []string{}) + v.SetDefault("backend.redis_sentinel.tls.enabled", false) + v.SetDefault("backend.redis_sentinel.tls.enabled", false) + v.SetDefault("backend.redis_sentinel.tls.insecure_skip_verify", false) + v.SetDefault("backend.redis_sentinel.tls.insecure_skip_verify", false) v.SetDefault("backend.ignite.scheme", "") v.SetDefault("backend.ignite.host", "") v.SetDefault("backend.ignite.port", 0)