Skip to content

Commit

Permalink
add CredentialsProvider to ClusterOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
johnduhart committed Dec 18, 2023
1 parent 5665b0f commit bd3cf62
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions osscluster.go
Expand Up @@ -62,9 +62,10 @@ type ClusterOptions struct {

OnConnect func(ctx context.Context, cn *Conn) error

Protocol int
Username string
Password string
Protocol int
Username string
Password string
CredentialsProvider func() (username string, password string)

MaxRetries int
MinRetryBackoff time.Duration
Expand Down Expand Up @@ -269,9 +270,10 @@ func (opt *ClusterOptions) clientOptions() *Options {
Dialer: opt.Dialer,
OnConnect: opt.OnConnect,

Protocol: opt.Protocol,
Username: opt.Username,
Password: opt.Password,
Protocol: opt.Protocol,
Username: opt.Username,
Password: opt.Password,
CredentialsProvider: opt.CredentialsProvider,

MaxRetries: opt.MaxRetries,
MinRetryBackoff: opt.MinRetryBackoff,
Expand Down

0 comments on commit bd3cf62

Please sign in to comment.