mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
add streamingcredentialsprovider in options
This commit is contained in:
@ -14,6 +14,7 @@ import (
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/redis/go-redis/v9/auth"
|
||||
"github.com/redis/go-redis/v9/internal"
|
||||
"github.com/redis/go-redis/v9/internal/hashtag"
|
||||
"github.com/redis/go-redis/v9/internal/pool"
|
||||
@ -66,11 +67,12 @@ type ClusterOptions struct {
|
||||
|
||||
OnConnect func(ctx context.Context, cn *Conn) error
|
||||
|
||||
Protocol int
|
||||
Username string
|
||||
Password string
|
||||
CredentialsProvider func() (username string, password string)
|
||||
CredentialsProviderContext func(ctx context.Context) (username string, password string, err error)
|
||||
Protocol int
|
||||
Username string
|
||||
Password string
|
||||
CredentialsProvider func() (username string, password string)
|
||||
CredentialsProviderContext func(ctx context.Context) (username string, password string, err error)
|
||||
StreamingCredentialsProvider auth.StreamingCredentialsProvider
|
||||
|
||||
MaxRetries int
|
||||
MinRetryBackoff time.Duration
|
||||
@ -291,11 +293,12 @@ func (opt *ClusterOptions) clientOptions() *Options {
|
||||
Dialer: opt.Dialer,
|
||||
OnConnect: opt.OnConnect,
|
||||
|
||||
Protocol: opt.Protocol,
|
||||
Username: opt.Username,
|
||||
Password: opt.Password,
|
||||
CredentialsProvider: opt.CredentialsProvider,
|
||||
CredentialsProviderContext: opt.CredentialsProviderContext,
|
||||
Protocol: opt.Protocol,
|
||||
Username: opt.Username,
|
||||
Password: opt.Password,
|
||||
CredentialsProvider: opt.CredentialsProvider,
|
||||
CredentialsProviderContext: opt.CredentialsProviderContext,
|
||||
StreamingCredentialsProvider: opt.StreamingCredentialsProvider,
|
||||
|
||||
MaxRetries: opt.MaxRetries,
|
||||
MinRetryBackoff: opt.MinRetryBackoff,
|
||||
|
Reference in New Issue
Block a user