forked from mirror/redis
Merge pull request #1456 from dmitsh/ds-sentinel-password
add Sentinel password to UniversalOptions
This commit is contained in:
commit
6115a783e1
12
universal.go
12
universal.go
|
@ -23,8 +23,9 @@ type UniversalOptions struct {
|
||||||
Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
|
Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
|
||||||
OnConnect func(ctx context.Context, cn *Conn) error
|
OnConnect func(ctx context.Context, cn *Conn) error
|
||||||
|
|
||||||
Username string
|
Username string
|
||||||
Password string
|
Password string
|
||||||
|
SentinelPassword string
|
||||||
|
|
||||||
MaxRetries int
|
MaxRetries int
|
||||||
MinRetryBackoff time.Duration
|
MinRetryBackoff time.Duration
|
||||||
|
@ -105,9 +106,10 @@ func (o *UniversalOptions) Failover() *FailoverOptions {
|
||||||
Dialer: o.Dialer,
|
Dialer: o.Dialer,
|
||||||
OnConnect: o.OnConnect,
|
OnConnect: o.OnConnect,
|
||||||
|
|
||||||
DB: o.DB,
|
DB: o.DB,
|
||||||
Username: o.Username,
|
Username: o.Username,
|
||||||
Password: o.Password,
|
Password: o.Password,
|
||||||
|
SentinelPassword: o.SentinelPassword,
|
||||||
|
|
||||||
MaxRetries: o.MaxRetries,
|
MaxRetries: o.MaxRetries,
|
||||||
MinRetryBackoff: o.MinRetryBackoff,
|
MinRetryBackoff: o.MinRetryBackoff,
|
||||||
|
|
Loading…
Reference in New Issue