Merge pull request #1456 from dmitsh/ds-sentinel-password

add Sentinel password to UniversalOptions
This commit is contained in:
Vladimir Mihailenco 2020-09-01 09:28:36 +03:00 committed by GitHub
commit 6115a783e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -23,8 +23,9 @@ type UniversalOptions struct {
Dialer func(ctx context.Context, network, addr string) (net.Conn, error)
OnConnect func(ctx context.Context, cn *Conn) error
Username string
Password string
Username string
Password string
SentinelPassword string
MaxRetries int
MinRetryBackoff time.Duration
@ -105,9 +106,10 @@ func (o *UniversalOptions) Failover() *FailoverOptions {
Dialer: o.Dialer,
OnConnect: o.OnConnect,
DB: o.DB,
Username: o.Username,
Password: o.Password,
DB: o.DB,
Username: o.Username,
Password: o.Password,
SentinelPassword: o.SentinelPassword,
MaxRetries: o.MaxRetries,
MinRetryBackoff: o.MinRetryBackoff,