1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

Add NewFailoverClusterClient

This commit is contained in:
Ehsan Afzali
2020-09-09 15:27:17 +03:00
committed by Vladimir Mihailenco
parent b273d2bf57
commit 6c85ee767a
6 changed files with 190 additions and 43 deletions

View File

@ -911,7 +911,7 @@ var _ = Describe("ClusterClient", func() {
failover = true
opt = redisClusterOptions()
opt.ClusterSlots = func() ([]redis.ClusterSlot, error) {
opt.ClusterSlots = func(ctx context.Context) ([]redis.ClusterSlot, error) {
slots := []redis.ClusterSlot{{
Start: 0,
End: 4999,
@ -965,7 +965,7 @@ var _ = Describe("ClusterClient", func() {
opt = redisClusterOptions()
opt.RouteRandomly = true
opt.ClusterSlots = func() ([]redis.ClusterSlot, error) {
opt.ClusterSlots = func(ctx context.Context) ([]redis.ClusterSlot, error) {
slots := []redis.ClusterSlot{{
Start: 0,
End: 4999,