Documentation ¶
Index ¶
- func AttachingSlavesToMaster(cluster *redis.Cluster, admin redis.AdminInterface, ...) error
- func ClassifyNodesByRole(nodes redis.Nodes) (masters, slaves, nones redis.Nodes)
- func DispatchMasters(cluster *redis.Cluster, nodes redis.Nodes, nbMaster int32, ...) (redis.Nodes, redis.Nodes, redis.Nodes, error)
- func DispatchSlave(cluster *redis.Cluster, nodes redis.Nodes, replicationLevel int32, ...) error
- func DispatchSlaveByMaster(futurMasterNodes, currentSlaveNodes, futurSlaveNodes redis.Nodes, ...) error
- func DispatchSlavesToNewMasters(newMasterNodesSlice, oldSlaveNodesSlice, newSlaveNodesSlice redis.Nodes, ...) error
- func DispatchSlotToNewMasters(cluster *redis.Cluster, admin redis.AdminInterface, ...) error
- func PlaceMasters(cluster *redis.Cluster, currentMaster redis.Nodes, ...) (redis.Nodes, bool, error)
- func PlaceSlaves(cluster *redis.Cluster, masters, oldSlaves, newSlaves redis.Nodes, ...) (map[string]redis.Nodes, bool)
- func SelectMastersToReplace(currentOldMaster, currentNewMasters, newNoneNodes redis.Nodes, ...) (selectedMasters redis.Nodes, newSelectedMasters redis.Nodes, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachingSlavesToMaster ¶
func AttachingSlavesToMaster(cluster *redis.Cluster, admin redis.AdminInterface, slavesByMaster map[string]redis.Nodes) error
AttachingSlavesToMaster used to attach slaves to there masters
func ClassifyNodesByRole ¶
ClassifyNodesByRole use to classify the Nodes by roles
func DispatchMasters ¶
func DispatchMasters(cluster *redis.Cluster, nodes redis.Nodes, nbMaster int32, admin redis.AdminInterface) (redis.Nodes, redis.Nodes, redis.Nodes, error)
DispatchMasters used to select nodes with master roles
func DispatchSlave ¶
func DispatchSlave(cluster *redis.Cluster, nodes redis.Nodes, replicationLevel int32, admin redis.AdminInterface) error
DispatchSlave aim is to dispatch the available redis to slave of the current masters
func DispatchSlaveByMaster ¶
func DispatchSlaveByMaster(futurMasterNodes, currentSlaveNodes, futurSlaveNodes redis.Nodes, replicationLevel int32, admin redis.AdminInterface) error
DispatchSlaveByMaster use to dispatch available Nodes as slave to Master
func DispatchSlavesToNewMasters ¶
func DispatchSlavesToNewMasters(newMasterNodesSlice, oldSlaveNodesSlice, newSlaveNodesSlice redis.Nodes, replicationLevel int32, admin redis.AdminInterface) error
DispatchSlavesToNewMasters use to dispatch available Nodes as slave to Master in the case of rolling update
func DispatchSlotToNewMasters ¶
func DispatchSlotToNewMasters(cluster *redis.Cluster, admin redis.AdminInterface, newMasterNodes, currentMasterNodes, allMasterNodes redis.Nodes) error
DispatchSlotToNewMasters used to dispatch Slot to the new master nodes
func PlaceMasters ¶
func PlaceMasters(cluster *redis.Cluster, currentMaster redis.Nodes, allPossibleMasters redis.Nodes, nbMaster int32) (redis.Nodes, bool, error)
PlaceMasters used to select Redis Node knowing on which VM they are running in order to spread as possible the masters on different VMs. Improvement: Use Kube Node labeling instead of the "NodeName", (availability zone and so)
Types ¶
This section is empty.