diff --git a/redis/redis.go b/redis/redis.go index 1672d95..0093b3a 100644 --- a/redis/redis.go +++ b/redis/redis.go @@ -28,6 +28,10 @@ type ReidsOption struct { Prefix string Separator string + // Database to be selected after connecting to the server. + // Only single-node and failover clients. + DB int + MaxRetries int MinRetryBackoff time.Duration MaxRetryBackoff time.Duration @@ -56,6 +60,8 @@ func New(opt *ReidsOption) Client { Addrs: opt.Addrs, Password: opt.Password, + DB: opt.DB, + MaxRetries: opt.MaxRetries, MinRetryBackoff: opt.MinRetryBackoff, MaxRetryBackoff: opt.MaxRetryBackoff,