Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SlotCount ¶
func SlotCount(slotRanges []*ClusterSlotRange) int
func SlotCounts ¶
func ToStatusClusterNode ¶
func ToStatusClusterNode(cn ClusterNode) cachev1alpha1.ValkeyClusterNode
Types ¶
type ClusterNode ¶
type ClusterNode struct {
Pod string
IP string
Hostname string
ID string
MasterNodeID string
Flags []string
SlotRanges []*ClusterSlotRange
}
func ParseClusterNode ¶
func ParseClusterNode(clusterNodesTxt string) (*ClusterNode, error)
func ParseClusterNodes ¶
func ParseClusterNodes(clusterNodesTxt string) ([]*ClusterNode, error)
func ParseClusterNodesExludeSelf ¶
func ParseClusterNodesExludeSelf(clusterNodesTxt string) ([]*ClusterNode, error)
func (*ClusterNode) HasSlots ¶
func (c *ClusterNode) HasSlots() bool
func (*ClusterNode) IsMaster ¶
func (c *ClusterNode) IsMaster() bool
func (*ClusterNode) SlotCount ¶
func (c *ClusterNode) SlotCount() int
func (*ClusterNode) String ¶
func (c *ClusterNode) String() string
type ClusterSlotRange ¶
func SlotRanges ¶
func SlotRanges(numShards int) []*ClusterSlotRange
func (*ClusterSlotRange) String ¶
func (c *ClusterSlotRange) String() string
type ReplicationInfo ¶ added in v0.0.36
type ReplicationInfo struct {
Role string
MasterLinkStatus string
MasterSyncInProgress int
MasterReplOffset int64
SlaveReplOffset int64
}
ReplicationInfo holds parsed fields from INFO REPLICATION output.
func ParseInfoReplication ¶ added in v0.0.36
func ParseInfoReplication(infoTxt string) ReplicationInfo
ParseInfoReplication parses the output of INFO REPLICATION into a ReplicationInfo struct. The valkey-go client may prepend "txt:" to the response and uses \r\n line endings.
Click to show internal directories.
Click to hide internal directories.