node

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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

type ValkeyNode struct {
	corev1.Pod
	// contains filtered or unexported fields
}

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) IsConnected

func (n *ValkeyNode) IsConnected() bool

IsConnected

func (*ValkeyNode) IsContainerReady

func (n *ValkeyNode) IsContainerReady() bool

IsContainerReady

func (*ValkeyNode) IsJoined

func (n *ValkeyNode) IsJoined() bool

IsJoined

func (*ValkeyNode) IsMasterFailed

func (n *ValkeyNode) IsMasterFailed() bool

IsMasterFailed

func (*ValkeyNode) IsMasterLinkUp

func (n *ValkeyNode) IsMasterLinkUp() bool

master_link_status is up

func (*ValkeyNode) IsReady

func (n *ValkeyNode) IsReady() bool

IsReady

func (*ValkeyNode) IsTerminating

func (n *ValkeyNode) IsTerminating() bool

IsTerminating

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) Query

func (n *ValkeyNode) Query(ctx context.Context, cmd string, args ...any) (any, error)

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

func (n *ValkeyNode) SetACLUser(ctx context.Context, username string, passwords []string, rules string) (any, error)

func (*ValkeyNode) Setup

func (n *ValkeyNode) Setup(ctx context.Context, margs ...[]any) (err error)

Setup only return the last command error

func (*ValkeyNode) Slots

func (n *ValkeyNode) Slots() *slot.Slots

Slots

func (*ValkeyNode) Status

func (n *ValkeyNode) Status() corev1.PodPhase

Status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL