package
0.0.0-20230113161954-24f4e428d81e
Repository: https://github.com/ibm/operator-for-redis-cluster.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AddSlots return a new list of slots after adding some slots in it, duplicates are removed.
BuildSlotSlice return a slice of all slots between this range.
Contains returns true if a node slice contains a node.
DecodeNodeInfos decode from the cmd output the Redis nodes info.
DecodeNodeStartTime decode from the cmd output the Redis instance info.
DecodeSlot parses a string representation of a slot slot.
DecodeSlotRange decode from a string a RangeSlot each entry can have 4 representations: * single slot: ex: 42 * slot range: ex: 42-52 * migrating slot: ex: [42->-67ed2db8d677e59ec4a4cefb06858cf2a1a89fa1] * importing slot: ex: [42-<-67ed2db8d677e59ec4a4cefb06858cf2a1a89fa1].
IsInconsistentError returns true if the error is due to cluster inconsistencies.
IsNodeNotFoundedError returns true if the current error is a NodeNotFoundedError.
IsPartialError returns true if the error is due to partial data recovery.
LessByID compare 2 Nodes with there ID.
MoreByID compare 2 Nodes with there ID.
NewAdmin returns new AdminInterface instance at the same time it connects to all Redis Nodes thanks to the address list.
NewAdminConnections returns and instance of AdminConnectionsInterface.
NewClient build a client connection and connect to a redis address.
NewCluster builds and returns new Cluster instance.
NewClusterInfos returns an instance of ClusterInfos.
NewClusterInfosError returns an instance of cluster infos error.
NewDefaultNode builds and returns new defaultNode instance.
NewNode builds and returns new Node instance.
NewNodeInfos returns an instance of NodeInfo.
NewRedisAdmin builds and returns new Admin from the list of pods.
RemoveSlots return a new list of slot where a list of slots have been removed, doesn't work if duplicates.
SlotRangesFromSlots return a slice of slot ranges from a slice of slots.

# Constants

ClusterInfoConsistent status of the cluster info: nodeinfos is complete and consistent between nodes.
ClusterInfoInconsistent status of the cluster info: nodeinfos is not consistent between nodes.
ClusterInfoPartial status of the cluster info: data is not complete (some nodes didn't respond).
ClusterInfoUnset status of the cluster info: no data set.
DefaultRedisPort define the default redis port.
ErrNotFound cannot find a node to connect to.
HashMaxSlots numbers or redis slots used for key hashing as slots start at 0, total number of slots is HashMaxSlots+1.
NodeStatusFail Node is in FAIL state.
NodeStatusHandshake untrusted node, we are handshaking.
NodeStatusNoAddr no address known for this node.
NodeStatusNoFlags no flags at all.
NodeStatusPFail Node is in PFAIL state.
RedisLinkStateConnected redis connection status connected.
RedisLinkStateDisconnected redis connection status disconnected.
ResetHard HARD mode for RESET command.
ResetSoft SOFT mode for RESET command.

# Variables

IsPrimaryWithNoSlot anonymous function for searching Primary Node with no slot.
IsPrimaryWithSlot anonymous function for searching Primary Node withslot.
IsReplica anonymous function for searching Replica Node.

# Structs

Admin wraps redis cluster admin logic.
AdminConnections connection map for redis cluster currently the admin connection is not threadSafe since it is only use in the Events thread.
AdminOptions optional options for redis admin.
Client structure representing a client connection to redis.
Cluster represents a Redis Cluster.
ClusterActionsInfo stores information about the current action on the Cluster.
ClusterInfos represents the node infos for all nodes of the cluster.
ClusterInfosError error type for redis cluster infos access.
ImportingSlot represents an importing slot (slot + importing from node id).
MigratingSlot represents a migrating slot (slot + migrating to node id).
Node represents a Redis Node.
NodeInfos representation of a node info, i.e.
OwnerWithStatus represents a node owner and the way it sees the slot.
SlotRange represent a Range of slots.

# Interfaces

AdminConnectionsInterface interface representing the map of admin connections to redis cluster nodes.
AdminInterface redis cluster admin interface.
ClientInterface redis client interface.

# Type aliases

ClusterInconsistencies structure representing inconsistencies in the cluster.
ConfigSignature Represents the slots of each node.
Error used to represent an error.
FindNodeFunc function for finding a Node it is use as input for GetNodeByFunc and GetNodesByFunc.
Nodes represent a Node slice.
OwneshipView map representing who owns a slot and who sees it.
Slot represent a Redis Cluster slot.
SlotSlice attaches the methods of sort.Interface to []string, sorting in increasing order.