package
0.1.1
Repository: https://github.com/jaehanbyun/redis-operator.git
Documentation: pkg.go.dev

# Functions

AddMasterToCluster adds a new master node to the Redis cluster and rebalances the slots.
AddReplicaToMaster adds a replica node to the specified master node in the cluster.
CheckClusterConfigurationAgreement verifies if all Redis cluster nodes share the same configuration epoch.
ConfigureRedisClient sets up and returns a Redis client connected to the specified Redis server.
CreateClusterCommand generates a Redis cluster creation command with the addresses of given master nodes.
CreateMasterPod creates a Redis master Pod with the given port.
CreateReplicaPod creates a Redis replica Pod attached to the specified master node.
DeleteRedisPod deletes the specified Redis Pod from the cluster.
ExtractPortFromPodName extracts the port number from a Pod's name.
No description provided by the author
FixCluster fixes the cluster.
GenerateAnnotations returns a list of annotations for prometheus metrics.
GenerateLabels returns a set of labels for the given info.
GenerateRedisClusterAsOwner returns a list of OwnerReferences for the given RedisCluster resource.
GenerateRedisPodDef generates a Pod definition for a Redis instance.
GenerateRedisProbe returns Liveness and Readiness probes.
GetClusterNodesInfo returns information about all nodes in a Cluster by executing "cluster nodes" command via redis-cli.
GetMastersToRemove selects a list of master node IDs to be removed from the cluster.
GetNextAvailablePort returns the next available port.
GetPodNameByNodeID searches the Pod name associated with a given Redis node ID.
GetRedisNodeID returns the node ID of a Redis server.
GetRedisServerAddress returns the full address (IP and port) of the Redis server.
GetRedisServerIP returns the IP address of the Redis server.
No description provided by the author
GetReplicasToRemoveFromMaster selects replica node IDs attached to a specific master node for removal from the cluster.
HandleClusterInitialization handles the initialization of the Redis cluster.
No description provided by the author
HandleMasterScaling handles scaling up or down the master nodes in the Redis cluster.
HandleReplicaScaling handles scaling up or down the replica nodes in the Redis cluster.
IsPodRunning checks if the specified Pod is running and the container is ready.
RebalanceCluster rebalances the cluster.
RemoveNodeFromCluster removes a node from the Redis cluster using its NodeID.
RemoveReplicasOfMaster removes all replicas associated with the specified master from the Redis cluster.
ReShardRedisCluster reshards slots from one master to another in the Redis cluster.
RunRedisCLI executes a Redis CLI command on the Redis pod and returns the command output.
ScaleDownMasters scales down the master nodes in the Redis cluster.
ScaleDownReplicas scales down the replica nodes in the Redis cluster.
ScaleUpMasters scales up the master nodes in the Redis cluster.
ScaleUpReplicas scales up the replica nodes in the Redis cluster.
SetupRedisCluster sets up the initial cluster with master pods.
UpdateClusterStatus updates the RedisCluster's MasterMap and ReplicaMap by querying the current Redis cluster nodes.
UpdatePodLabelWithRedisID updates the Pod's labels to include the Redis node ID.
WaitForClusterStabilization checks if all Redis cluster nodes agree on the configuration.
WaitForNodeRole waits until the specified node transitions to the expected role (e.g., "slave" or "master").
WaitForPodReady waits until the specified Pod is in the Running state and its containers are ready.
WaitForSlotMigration waits for slot migration to complete.

# Structs

No description provided by the author