Documentation
¶
Index ¶
- func LoadNodes(ctx context.Context, client kubernetes.ClientSet, sts *appv1.StatefulSet, ...) ([]types.ValkeyNode, error)
- func NewValkeyNode(ctx context.Context, client kubernetes.ClientSet, sts *appv1.StatefulSet, ...) (types.ValkeyNode, error)
- type ValkeyNode
- func (n *ValkeyNode) ClusterInfo() vkcli.ClusterNodeInfo
- func (n *ValkeyNode) Config() map[string]string
- func (n *ValkeyNode) ConfigedMasterIP() string
- func (n *ValkeyNode) ConfigedMasterPort() string
- func (n *ValkeyNode) ContainerStatus() *corev1.ContainerStatus
- func (n *ValkeyNode) CurrentVersion() version.ValkeyVersion
- func (n *ValkeyNode) DefaultIP() net.IP
- func (n *ValkeyNode) DefaultInternalIP() net.IP
- func (n *ValkeyNode) Definition() *corev1.Pod
- func (n *ValkeyNode) GetPod() *corev1.Pod
- func (n *ValkeyNode) ID() string
- func (n *ValkeyNode) IPort() int
- func (n *ValkeyNode) IPs() []net.IP
- func (n *ValkeyNode) Index() int
- func (n *ValkeyNode) Info() vkcli.NodeInfo
- func (n *ValkeyNode) InternalIPort() int
- func (n *ValkeyNode) InternalPort() int
- func (n *ValkeyNode) IsACLApplied() bool
- func (n *ValkeyNode) IsConnected() bool
- func (n *ValkeyNode) IsContainerReady() bool
- func (n *ValkeyNode) IsJoined() bool
- func (n *ValkeyNode) IsMasterFailed() bool
- func (n *ValkeyNode) IsMasterLinkUp() bool
- func (n *ValkeyNode) IsReady() bool
- func (n *ValkeyNode) IsTerminating() bool
- func (n *ValkeyNode) MasterID() string
- func (n *ValkeyNode) NodeIP() net.IP
- func (n *ValkeyNode) Port() int
- func (n *ValkeyNode) Query(ctx context.Context, cmd string, args ...any) (any, error)
- func (n *ValkeyNode) Refresh(ctx context.Context) (err error)
- func (n *ValkeyNode) ReplicaOf(ctx context.Context, ip, port string) error
- func (n *ValkeyNode) Role() core.NodeRole
- func (n *ValkeyNode) SetACLUser(ctx context.Context, username string, passwords []string, rules string) (any, error)
- func (n *ValkeyNode) Setup(ctx context.Context, margs ...[]any) (err error)
- func (n *ValkeyNode) Slots() *slot.Slots
- func (n *ValkeyNode) Status() corev1.PodPhase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadNodes ¶
func LoadNodes(ctx context.Context, client kubernetes.ClientSet, sts *appv1.StatefulSet, newUser *user.User, logger logr.Logger) ([]types.ValkeyNode, error)
LoadNodes
func NewValkeyNode ¶
func NewValkeyNode(ctx context.Context, client kubernetes.ClientSet, sts *appv1.StatefulSet, pod *corev1.Pod, newUser *user.User, logger logr.Logger) (types.ValkeyNode, error)
NewValkeyNode
Types ¶
type ValkeyNode ¶
func (*ValkeyNode) ClusterInfo ¶
func (n *ValkeyNode) ClusterInfo() vkcli.ClusterNodeInfo
func (*ValkeyNode) Config ¶
func (n *ValkeyNode) Config() map[string]string
func (*ValkeyNode) ConfigedMasterIP ¶
func (n *ValkeyNode) ConfigedMasterIP() string
func (*ValkeyNode) ConfigedMasterPort ¶
func (n *ValkeyNode) ConfigedMasterPort() string
func (*ValkeyNode) ContainerStatus ¶
func (n *ValkeyNode) ContainerStatus() *corev1.ContainerStatus
ContainerStatus
func (*ValkeyNode) CurrentVersion ¶
func (n *ValkeyNode) CurrentVersion() version.ValkeyVersion
func (*ValkeyNode) DefaultIP ¶
func (n *ValkeyNode) DefaultIP() net.IP
func (*ValkeyNode) DefaultInternalIP ¶
func (n *ValkeyNode) DefaultInternalIP() net.IP
func (*ValkeyNode) Definition ¶
func (n *ValkeyNode) Definition() *corev1.Pod
func (*ValkeyNode) GetPod ¶
func (n *ValkeyNode) GetPod() *corev1.Pod
func (*ValkeyNode) ID ¶
func (n *ValkeyNode) ID() string
ID get cluster id
TODO: if it's possible generate a const id, use this id as cluster id
func (*ValkeyNode) IPort ¶
func (n *ValkeyNode) IPort() int
func (*ValkeyNode) IPs ¶
func (n *ValkeyNode) IPs() []net.IP
func (*ValkeyNode) Index ¶
func (n *ValkeyNode) Index() int
Index returns the index of the related pod
func (*ValkeyNode) Info ¶
func (n *ValkeyNode) Info() vkcli.NodeInfo
func (*ValkeyNode) InternalIPort ¶
func (n *ValkeyNode) InternalIPort() int
func (*ValkeyNode) InternalPort ¶
func (n *ValkeyNode) InternalPort() int
func (*ValkeyNode) IsACLApplied ¶
func (n *ValkeyNode) IsACLApplied() bool
func (*ValkeyNode) IsMasterLinkUp ¶
func (n *ValkeyNode) IsMasterLinkUp() bool
master_link_status is up
func (*ValkeyNode) MasterID ¶
func (n *ValkeyNode) MasterID() string
func (*ValkeyNode) NodeIP ¶
func (n *ValkeyNode) NodeIP() net.IP
func (*ValkeyNode) Port ¶
func (n *ValkeyNode) Port() int
func (*ValkeyNode) Refresh ¶
func (n *ValkeyNode) Refresh(ctx context.Context) (err error)
Refresh not concurrency safe
func (*ValkeyNode) ReplicaOf ¶
func (n *ValkeyNode) ReplicaOf(ctx context.Context, ip, port string) error
func (*ValkeyNode) Role ¶
func (n *ValkeyNode) Role() core.NodeRole
func (*ValkeyNode) SetACLUser ¶
Click to show internal directories.
Click to hide internal directories.