Repository navigation
Replies: 1 comment
|
There are two cases, depending on what you are running. Real Redis Cluster. Standalone servers with your own topology source (Consul, ZooKeeper). Use rdb := redis.NewClusterClient(&redis.ClusterOptions{
ClusterSlots: func(ctx context.Context) ([]redis.ClusterSlot, error) {
// Read the nodes from Consul here.
return []redis.ClusterSlot{{
Start: 0,
End: 16383,
Nodes: []redis.ClusterNode{{Addr: "10.0.0.1:6379"}, {Addr: "10.0.0.2:6379"}},
}}, nil
},
})The first node in |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
NewClusterClient has an Addrs param to set a static ip:port list. Are there any method or param in SDK to update ip:port list by service discovery, just like consul?
All reactions