Update module go-redis/redis/v7 to v7.3.0 (#565)
Update module go-redis/redis/v7 to v7.3.0 Reviewed-on: https://kolaente.dev/vikunja/api/pulls/565
This commit is contained in:
11
vendor/github.com/go-redis/redis/v7/cluster.go
generated
vendored
11
vendor/github.com/go-redis/redis/v7/cluster.go
generated
vendored
@ -57,6 +57,7 @@ type ClusterOptions struct {
|
||||
|
||||
OnConnect func(*Conn) error
|
||||
|
||||
Username string
|
||||
Password string
|
||||
|
||||
MaxRetries int
|
||||
@ -67,6 +68,9 @@ type ClusterOptions struct {
|
||||
ReadTimeout time.Duration
|
||||
WriteTimeout time.Duration
|
||||
|
||||
// NewClient creates a cluster node client with provided name and options.
|
||||
NewClient func(opt *Options) *Client
|
||||
|
||||
// PoolSize applies per cluster node and not for the whole cluster.
|
||||
PoolSize int
|
||||
MinIdleConns int
|
||||
@ -118,6 +122,10 @@ func (opt *ClusterOptions) init() {
|
||||
case 0:
|
||||
opt.MaxRetryBackoff = 512 * time.Millisecond
|
||||
}
|
||||
|
||||
if opt.NewClient == nil {
|
||||
opt.NewClient = NewClient
|
||||
}
|
||||
}
|
||||
|
||||
func (opt *ClusterOptions) clientOptions() *Options {
|
||||
@ -130,6 +138,7 @@ func (opt *ClusterOptions) clientOptions() *Options {
|
||||
MaxRetries: opt.MaxRetries,
|
||||
MinRetryBackoff: opt.MinRetryBackoff,
|
||||
MaxRetryBackoff: opt.MaxRetryBackoff,
|
||||
Username: opt.Username,
|
||||
Password: opt.Password,
|
||||
readOnly: opt.ReadOnly,
|
||||
|
||||
@ -162,7 +171,7 @@ func newClusterNode(clOpt *ClusterOptions, addr string) *clusterNode {
|
||||
opt := clOpt.clientOptions()
|
||||
opt.Addr = addr
|
||||
node := clusterNode{
|
||||
Client: NewClient(opt),
|
||||
Client: clOpt.NewClient(opt),
|
||||
}
|
||||
|
||||
node.latency = math.MaxUint32
|
||||
|
Reference in New Issue
Block a user