mirror of
https://github.com/redis/go-redis.git
synced 2025-04-17 20:17:02 +03:00
add CredentialsProvider to ClusterOptions (#2791)
This commit is contained in:
parent
21ed15bbed
commit
516abe867d
@ -62,9 +62,10 @@ type ClusterOptions struct {
|
|||||||
|
|
||||||
OnConnect func(ctx context.Context, cn *Conn) error
|
OnConnect func(ctx context.Context, cn *Conn) error
|
||||||
|
|
||||||
Protocol int
|
Protocol int
|
||||||
Username string
|
Username string
|
||||||
Password string
|
Password string
|
||||||
|
CredentialsProvider func() (username string, password string)
|
||||||
|
|
||||||
MaxRetries int
|
MaxRetries int
|
||||||
MinRetryBackoff time.Duration
|
MinRetryBackoff time.Duration
|
||||||
@ -271,9 +272,10 @@ func (opt *ClusterOptions) clientOptions() *Options {
|
|||||||
Dialer: opt.Dialer,
|
Dialer: opt.Dialer,
|
||||||
OnConnect: opt.OnConnect,
|
OnConnect: opt.OnConnect,
|
||||||
|
|
||||||
Protocol: opt.Protocol,
|
Protocol: opt.Protocol,
|
||||||
Username: opt.Username,
|
Username: opt.Username,
|
||||||
Password: opt.Password,
|
Password: opt.Password,
|
||||||
|
CredentialsProvider: opt.CredentialsProvider,
|
||||||
|
|
||||||
MaxRetries: opt.MaxRetries,
|
MaxRetries: opt.MaxRetries,
|
||||||
MinRetryBackoff: opt.MinRetryBackoff,
|
MinRetryBackoff: opt.MinRetryBackoff,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user