Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // NodeAddr is the address of the Redis node (e.g. 127.0.0.1:7070). NodeAddr string // Client is is a go-redis Client. Client *redis.Client }
Client is a wrapper around an inner go-redis client.
func (*Client) GetClusterInfo ¶
func (*Client) GetPrimaryNodes ¶
func (*Client) GetPrimaryWithLeastReplicas ¶
func (*Client) GetReplicaNodes ¶
func (*Client) IsNew ¶
IsNew returns 'true' if the contents of 'CLUSTER INFO' match those expected of a node that has never been joined a cluster. 'cluster_state' will be 'fail' as a minumum of 3 nodes is required. 'cluster_known_nodes' will be '1' (self) since it's never been introduced to other nodes. 'cluster_slots_count' and cluster_size' will both be '0' since slots are only assigned as part of the inital clustering or during cluster rebalancing. If any of these fields holds a different value, 'false' is returned.
Click to show internal directories.
Click to hide internal directories.