Skip to content

Commit

Permalink
add CredentialsProvider to ClusterOptions (#2791)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnduhart authored Feb 14, 2024
1 parent 21ed15b commit 516abe8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions osscluster.go
Original file line number Diff line number Diff line change
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 @@ -271,9 +272,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 516abe8

Please sign in to comment.