1
0

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:
renovate
2020-05-21 08:56:39 +00:00
committed by konrad
parent cc47d11792
commit b0948a37d4
20 changed files with 96 additions and 12 deletions

View File

@ -56,6 +56,9 @@ type RingOptions struct {
// See https://arxiv.org/abs/1406.2294 for reference
HashReplicas int
// NewClient creates a shard client with provided name and options.
NewClient func(name string, opt *Options) *Client
// Optional hook that is called when a new shard is created.
OnNewShard func(*Client)
@ -390,7 +393,12 @@ func NewRing(opt *RingOptions) *Ring {
func newRingShard(opt *RingOptions, name, addr string) *Client {
clopt := opt.clientOptions(name)
clopt.Addr = addr
shard := NewClient(clopt)
var shard *Client
if opt.NewClient != nil {
shard = opt.NewClient(name, clopt)
} else {
shard = NewClient(clopt)
}
if opt.OnNewShard != nil {
opt.OnNewShard(shard)
}