mirror of https://github.com/go-redis/redis.git
typo: fix DisableIndentity -> DisableIdentity typo
This commit is contained in:
parent
b5a9e5d2c6
commit
f4abc731d8
|
@ -30,7 +30,7 @@ func NewClientStub(resp []byte) *ClientStub {
|
||||||
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||||
return stub.stubConn(initHello), nil
|
return stub.stubConn(initHello), nil
|
||||||
},
|
},
|
||||||
DisableIndentity: true,
|
DisableIdentity: true,
|
||||||
})
|
})
|
||||||
return stub
|
return stub
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ func NewClusterClientStub(resp []byte) *ClientStub {
|
||||||
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||||
return stub.stubConn(initHello), nil
|
return stub.stubConn(initHello), nil
|
||||||
},
|
},
|
||||||
DisableIndentity: true,
|
DisableIdentity: true,
|
||||||
|
|
||||||
ClusterSlots: func(_ context.Context) ([]ClusterSlot, error) {
|
ClusterSlots: func(_ context.Context) ([]ClusterSlot, error) {
|
||||||
return []ClusterSlot{
|
return []ClusterSlot{
|
||||||
|
|
|
@ -143,7 +143,7 @@ type Options struct {
|
||||||
readOnly bool
|
readOnly bool
|
||||||
|
|
||||||
// Disable set-lib on connect. Default is false.
|
// Disable set-lib on connect. Default is false.
|
||||||
DisableIndentity bool
|
DisableIdentity bool
|
||||||
|
|
||||||
// Add suffix to client name. Default is empty.
|
// Add suffix to client name. Default is empty.
|
||||||
IdentitySuffix string
|
IdentitySuffix string
|
||||||
|
|
|
@ -85,8 +85,8 @@ type ClusterOptions struct {
|
||||||
ConnMaxIdleTime time.Duration
|
ConnMaxIdleTime time.Duration
|
||||||
ConnMaxLifetime time.Duration
|
ConnMaxLifetime time.Duration
|
||||||
|
|
||||||
TLSConfig *tls.Config
|
TLSConfig *tls.Config
|
||||||
DisableIndentity bool // Disable set-lib on connect. Default is false.
|
DisableIdentity bool // Disable set-lib on connect. Default is false.
|
||||||
|
|
||||||
IdentitySuffix string // Add suffix to client name. Default is empty.
|
IdentitySuffix string // Add suffix to client name. Default is empty.
|
||||||
}
|
}
|
||||||
|
@ -286,17 +286,17 @@ func (opt *ClusterOptions) clientOptions() *Options {
|
||||||
WriteTimeout: opt.WriteTimeout,
|
WriteTimeout: opt.WriteTimeout,
|
||||||
ContextTimeoutEnabled: opt.ContextTimeoutEnabled,
|
ContextTimeoutEnabled: opt.ContextTimeoutEnabled,
|
||||||
|
|
||||||
PoolFIFO: opt.PoolFIFO,
|
PoolFIFO: opt.PoolFIFO,
|
||||||
PoolSize: opt.PoolSize,
|
PoolSize: opt.PoolSize,
|
||||||
PoolTimeout: opt.PoolTimeout,
|
PoolTimeout: opt.PoolTimeout,
|
||||||
MinIdleConns: opt.MinIdleConns,
|
MinIdleConns: opt.MinIdleConns,
|
||||||
MaxIdleConns: opt.MaxIdleConns,
|
MaxIdleConns: opt.MaxIdleConns,
|
||||||
MaxActiveConns: opt.MaxActiveConns,
|
MaxActiveConns: opt.MaxActiveConns,
|
||||||
ConnMaxIdleTime: opt.ConnMaxIdleTime,
|
ConnMaxIdleTime: opt.ConnMaxIdleTime,
|
||||||
ConnMaxLifetime: opt.ConnMaxLifetime,
|
ConnMaxLifetime: opt.ConnMaxLifetime,
|
||||||
DisableIndentity: opt.DisableIndentity,
|
DisableIdentity: opt.DisableIdentity,
|
||||||
IdentitySuffix: opt.IdentitySuffix,
|
IdentitySuffix: opt.IdentitySuffix,
|
||||||
TLSConfig: opt.TLSConfig,
|
TLSConfig: opt.TLSConfig,
|
||||||
// If ClusterSlots is populated, then we probably have an artificial
|
// If ClusterSlots is populated, then we probably have an artificial
|
||||||
// cluster whose nodes are not in clustering mode (otherwise there isn't
|
// cluster whose nodes are not in clustering mode (otherwise there isn't
|
||||||
// much use for ClusterSlots config). This means we cannot execute the
|
// much use for ClusterSlots config). This means we cannot execute the
|
||||||
|
|
2
redis.go
2
redis.go
|
@ -334,7 +334,7 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
|
||||||
pipe.ClientSetName(ctx, c.opt.ClientName)
|
pipe.ClientSetName(ctx, c.opt.ClientName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !c.opt.DisableIndentity {
|
if !c.opt.DisableIdentity {
|
||||||
libName := ""
|
libName := ""
|
||||||
libVer := Version()
|
libVer := Version()
|
||||||
if c.opt.IdentitySuffix != "" {
|
if c.opt.IdentitySuffix != "" {
|
||||||
|
|
8
ring.go
8
ring.go
|
@ -98,8 +98,8 @@ type RingOptions struct {
|
||||||
TLSConfig *tls.Config
|
TLSConfig *tls.Config
|
||||||
Limiter Limiter
|
Limiter Limiter
|
||||||
|
|
||||||
DisableIndentity bool
|
DisableIdentity bool
|
||||||
IdentitySuffix string
|
IdentitySuffix string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (opt *RingOptions) init() {
|
func (opt *RingOptions) init() {
|
||||||
|
@ -166,8 +166,8 @@ func (opt *RingOptions) clientOptions() *Options {
|
||||||
TLSConfig: opt.TLSConfig,
|
TLSConfig: opt.TLSConfig,
|
||||||
Limiter: opt.Limiter,
|
Limiter: opt.Limiter,
|
||||||
|
|
||||||
DisableIndentity: opt.DisableIndentity,
|
DisableIdentity: opt.DisableIdentity,
|
||||||
IdentitySuffix: opt.IdentitySuffix,
|
IdentitySuffix: opt.IdentitySuffix,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,8 +80,8 @@ type FailoverOptions struct {
|
||||||
|
|
||||||
TLSConfig *tls.Config
|
TLSConfig *tls.Config
|
||||||
|
|
||||||
DisableIndentity bool
|
DisableIdentity bool
|
||||||
IdentitySuffix string
|
IdentitySuffix string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (opt *FailoverOptions) clientOptions() *Options {
|
func (opt *FailoverOptions) clientOptions() *Options {
|
||||||
|
@ -117,8 +117,8 @@ func (opt *FailoverOptions) clientOptions() *Options {
|
||||||
|
|
||||||
TLSConfig: opt.TLSConfig,
|
TLSConfig: opt.TLSConfig,
|
||||||
|
|
||||||
DisableIndentity: opt.DisableIndentity,
|
DisableIdentity: opt.DisableIdentity,
|
||||||
IdentitySuffix: opt.IdentitySuffix,
|
IdentitySuffix: opt.IdentitySuffix,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
16
universal.go
16
universal.go
|
@ -66,8 +66,8 @@ type UniversalOptions struct {
|
||||||
|
|
||||||
MasterName string
|
MasterName string
|
||||||
|
|
||||||
DisableIndentity bool
|
DisableIdentity bool
|
||||||
IdentitySuffix string
|
IdentitySuffix string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cluster returns cluster options created from the universal options.
|
// Cluster returns cluster options created from the universal options.
|
||||||
|
@ -112,8 +112,8 @@ func (o *UniversalOptions) Cluster() *ClusterOptions {
|
||||||
|
|
||||||
TLSConfig: o.TLSConfig,
|
TLSConfig: o.TLSConfig,
|
||||||
|
|
||||||
DisableIndentity: o.DisableIndentity,
|
DisableIdentity: o.DisableIdentity,
|
||||||
IdentitySuffix: o.IdentitySuffix,
|
IdentitySuffix: o.IdentitySuffix,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,8 +158,8 @@ func (o *UniversalOptions) Failover() *FailoverOptions {
|
||||||
|
|
||||||
TLSConfig: o.TLSConfig,
|
TLSConfig: o.TLSConfig,
|
||||||
|
|
||||||
DisableIndentity: o.DisableIndentity,
|
DisableIdentity: o.DisableIdentity,
|
||||||
IdentitySuffix: o.IdentitySuffix,
|
IdentitySuffix: o.IdentitySuffix,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,8 +201,8 @@ func (o *UniversalOptions) Simple() *Options {
|
||||||
|
|
||||||
TLSConfig: o.TLSConfig,
|
TLSConfig: o.TLSConfig,
|
||||||
|
|
||||||
DisableIndentity: o.DisableIndentity,
|
DisableIdentity: o.DisableIdentity,
|
||||||
IdentitySuffix: o.IdentitySuffix,
|
IdentitySuffix: o.IdentitySuffix,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue