diff --git a/options.go b/options.go index a8c67ae37..449a92521 100644 --- a/options.go +++ b/options.go @@ -142,7 +142,7 @@ type Options struct { // Enables read only queries on slave/follower nodes. readOnly bool - // // Disable set-lib on connect. Default is false. + // Disable set-lib on connect. Default is false. DisableIndentity bool } diff --git a/ring.go b/ring.go index c83dcaeeb..d39856bce 100644 --- a/ring.go +++ b/ring.go @@ -84,6 +84,8 @@ type RingOptions struct { WriteTimeout time.Duration ContextTimeoutEnabled bool + ContextTimeoutEnabled bool + // PoolFIFO uses FIFO mode for each node connection pool GET/PUT (default LIFO). PoolFIFO bool @@ -97,6 +99,8 @@ type RingOptions struct { TLSConfig *tls.Config Limiter Limiter + + DisableIndentity bool } func (opt *RingOptions) init() { @@ -151,6 +155,8 @@ func (opt *RingOptions) clientOptions() *Options { WriteTimeout: opt.WriteTimeout, ContextTimeoutEnabled: opt.ContextTimeoutEnabled, + ContextTimeoutEnabled: opt.ContextTimeoutEnabled, + PoolFIFO: opt.PoolFIFO, PoolSize: opt.PoolSize, PoolTimeout: opt.PoolTimeout, @@ -162,6 +168,8 @@ func (opt *RingOptions) clientOptions() *Options { TLSConfig: opt.TLSConfig, Limiter: opt.Limiter, + + DisableIndentity: opt.DisableIndentity, } } diff --git a/sentinel.go b/sentinel.go index 542293ab2..31ea3c77a 100644 --- a/sentinel.go +++ b/sentinel.go @@ -79,6 +79,8 @@ type FailoverOptions struct { ConnMaxLifetime time.Duration TLSConfig *tls.Config + + DisableIndentity bool } func (opt *FailoverOptions) clientOptions() *Options { @@ -113,6 +115,8 @@ func (opt *FailoverOptions) clientOptions() *Options { ConnMaxLifetime: opt.ConnMaxLifetime, TLSConfig: opt.TLSConfig, + + DisableIndentity: opt.DisableIndentity, } } diff --git a/universal.go b/universal.go index cb3f2e142..1e48d7b90 100644 --- a/universal.go +++ b/universal.go @@ -65,6 +65,8 @@ type UniversalOptions struct { // Only failover clients. MasterName string + + DisableIndentity bool } // Cluster returns cluster options created from the universal options. @@ -108,6 +110,8 @@ func (o *UniversalOptions) Cluster() *ClusterOptions { ConnMaxLifetime: o.ConnMaxLifetime, TLSConfig: o.TLSConfig, + + DisableIndentity: o.DisableIndentity, } } @@ -151,6 +155,8 @@ func (o *UniversalOptions) Failover() *FailoverOptions { ConnMaxLifetime: o.ConnMaxLifetime, TLSConfig: o.TLSConfig, + + DisableIndentity: o.DisableIndentity, } } @@ -191,6 +197,8 @@ func (o *UniversalOptions) Simple() *Options { ConnMaxLifetime: o.ConnMaxLifetime, TLSConfig: o.TLSConfig, + + DisableIndentity: o.DisableIndentity, } }