Documentation ¶
Index ¶
- func DispatchMasters(cluster *redisutil.Cluster, nodes redisutil.Nodes, nbMaster int32) (redisutil.Nodes, redisutil.Nodes, redisutil.Nodes, error)
- func PlaceMasters(cluster *redisutil.Cluster, currentMaster redisutil.Nodes, ...) (redisutil.Nodes, bool, error)
- func PlaceSlaves(cluster *redisutil.Cluster, masters, oldSlaves, newSlaves redisutil.Nodes, ...) (map[string]redisutil.Nodes, bool)
- type Ctx
- func (c *Ctx) AllocSlots(admin redisutil.IAdmin, newMasterNodes redisutil.Nodes) error
- func (c *Ctx) AttachingSlavesToMaster(admin redisutil.IAdmin) error
- func (c *Ctx) DispatchMasters() error
- func (c *Ctx) DispatchSlotToNewMasters(admin redisutil.IAdmin, ...) error
- func (c *Ctx) GetCurrentMasters() redisutil.Nodes
- func (c *Ctx) GetNewMasters() redisutil.Nodes
- func (c *Ctx) GetSlaves() map[string]redisutil.Nodes
- func (c *Ctx) GetStatefulsetNodes() map[string]redisutil.Nodes
- func (c *Ctx) PlaceMasters(ssName string) *redisutil.Node
- func (c *Ctx) PlaceSlaves() error
- func (c *Ctx) RebalancedCluster(admin redisutil.IAdmin, newMasterNodes redisutil.Nodes) error
- type MovedNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DispatchMasters ¶
func DispatchMasters(cluster *redisutil.Cluster, nodes redisutil.Nodes, nbMaster int32) (redisutil.Nodes, redisutil.Nodes, redisutil.Nodes, error)
DispatchMasters used to select nodes with master roles
func PlaceMasters ¶
func PlaceMasters(cluster *redisutil.Cluster, currentMaster redisutil.Nodes, allPossibleMasters redisutil.Nodes, nbMaster int32) (redisutil.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 ¶
type Ctx ¶
type Ctx struct {
// contains filtered or unexported fields
}
func (*Ctx) AllocSlots ¶
func (*Ctx) AttachingSlavesToMaster ¶
AttachingSlavesToMaster used to attach slaves to there masters
func (*Ctx) DispatchMasters ¶
func (*Ctx) DispatchSlotToNewMasters ¶
func (c *Ctx) DispatchSlotToNewMasters(admin redisutil.IAdmin, newMasterNodes, currentMasterNodes, allMasterNodes redisutil.Nodes) error
DispatchSlotToNewMasters used to dispatch Slot to the new master nodes
func (*Ctx) GetCurrentMasters ¶
func (*Ctx) GetNewMasters ¶
func (*Ctx) PlaceSlaves ¶
Click to show internal directories.
Click to hide internal directories.