Documentation ¶
Index ¶
- func BuildClusterKey(ns, cluster string) string
- func CloseRedisClients()
- func ClusterNodesCmd(ctx context.Context, node *metadata.NodeInfo) (string, error)
- func DetectClusterNode(ctx context.Context, node *metadata.NodeInfo) error
- func GenerateNodeID() string
- func GetRedisClient(ctx context.Context, node *metadata.NodeInfo) (*redis.Client, error)
- func IsDomain(domain string) bool
- func IsHostPort(s string) bool
- func IsIP(ip string) bool
- func IsPort(port string) bool
- func IsUniqueSlice(list interface{}) bool
- func PingCmd(ctx context.Context, node *metadata.NodeInfo) error
- func RandString(length int) string
- func SyncClusterInfo2Node(ctx context.Context, node *metadata.NodeInfo, clusterStr string, ver int64) error
- type ClientInfo
- type ClusterInfo
- type KeySpaceInfo
- type MasterReplicationInfo
- type MemoryInfo
- type NodeInfo
- type ServerInfo
- type SlaveReplicationInfo
- type StatesInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildClusterKey ¶
func CloseRedisClients ¶
func CloseRedisClients()
func ClusterNodesCmd ¶
func DetectClusterNode ¶ added in v0.2.0
func GenerateNodeID ¶
func GenerateNodeID() string
func GetRedisClient ¶
func IsHostPort ¶ added in v0.2.0
func IsUniqueSlice ¶ added in v0.2.0
func IsUniqueSlice(list interface{}) bool
func RandString ¶
Types ¶
type ClientInfo ¶
type ClusterInfo ¶
type ClusterInfo struct { ClusterState bool ClusterSlotsAssigned int ClusterSlotsOK int ClusterSlotsPFail int ClusterSlotsFail int ClusterKnownNodes int ClusterSize int ClusterCurrentEpoch int64 ClusterMyEpoch int64 MigratingSlot int ImportingSlot int DestinationNode string MigratingState string ImportingState string }
func ClusterInfoCmd ¶
type KeySpaceInfo ¶
type MasterReplicationInfo ¶
type MemoryInfo ¶
type NodeInfo ¶
type NodeInfo struct { Server ServerInfo Client ClientInfo Mem MemoryInfo States StatesInfo SlaveReplication SlaveReplicationInfo MasterReplication MasterReplicationInfo KeySpace KeySpaceInfo }
type ServerInfo ¶
type SlaveReplicationInfo ¶
type StatesInfo ¶
type StatesInfo struct { TotalConnectionsReceived string TotalCommandsProcessed string InstantaneousOps string TotalNetInputBytes string TotalNetOutputBytes string InstantaneousInputKbps string InstantaneousOutputKbps string SyncFull string SyncPartialOk string SyncPartialErr string PubsubChannels string PubsubPatterns string }
Click to show internal directories.
Click to hide internal directories.