sentinel

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: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDeploymentValkeySentinelNodes

func LoadDeploymentValkeySentinelNodes(ctx context.Context, client kubernetes.ClientSet, obj metav1.Object, newUser *user.User, logger logr.Logger) ([]types.SentinelNode, error)

func LoadValkeySentinelNodes

func LoadValkeySentinelNodes(ctx context.Context, client kubernetes.ClientSet, sts metav1.Object, newUser *user.User, logger logr.Logger) ([]types.SentinelNode, error)

func NewValkeySentinelNode

func NewValkeySentinelNode(ctx context.Context, client kubernetes.ClientSet, obj metav1.Object, pod *corev1.Pod, newUser *user.User, logger logr.Logger) (types.SentinelNode, error)

Types

type ValkeySentinel

type ValkeySentinel struct {
	v1alpha1.Sentinel
	// contains filtered or unexported fields
}

func NewSentinel

func NewSentinel(ctx context.Context, cliset clientset.ClientSet, eventRecorder record.EventRecorder, def *v1alpha1.Sentinel, logger logr.Logger) (*ValkeySentinel, error)

func (*ValkeySentinel) Arch

func (s *ValkeySentinel) Arch() core.Arch

func (*ValkeySentinel) Clusters

func (s *ValkeySentinel) Clusters(ctx context.Context) (ret []string, err error)

Clusters loads the clusters which this sentinel is monitoring

func (*ValkeySentinel) Definition

func (s *ValkeySentinel) Definition() *v1alpha1.Sentinel

func (*ValkeySentinel) GetPassword

func (s *ValkeySentinel) GetPassword() (string, error)

func (*ValkeySentinel) IsACLApplied

func (s *ValkeySentinel) IsACLApplied() bool

func (*ValkeySentinel) IsACLAppliedToAll

func (s *ValkeySentinel) IsACLAppliedToAll() bool

func (*ValkeySentinel) IsACLUserExists

func (s *ValkeySentinel) IsACLUserExists() bool

func (*ValkeySentinel) IsInService

func (s *ValkeySentinel) IsInService() bool

func (*ValkeySentinel) IsReady

func (s *ValkeySentinel) IsReady() bool

func (*ValkeySentinel) IsResourceFullfilled

func (s *ValkeySentinel) IsResourceFullfilled(ctx context.Context) (bool, error)

func (*ValkeySentinel) Issuer

func (*ValkeySentinel) Logger

func (c *ValkeySentinel) Logger() logr.Logger

func (*ValkeySentinel) NamespacedName

func (s *ValkeySentinel) NamespacedName() client.ObjectKey

func (*ValkeySentinel) Nodes

func (s *ValkeySentinel) Nodes() []types.SentinelNode

func (*ValkeySentinel) RawNodes

func (s *ValkeySentinel) RawNodes(ctx context.Context) ([]corev1.Pod, error)

func (*ValkeySentinel) Refresh

func (s *ValkeySentinel) Refresh(ctx context.Context) error

func (*ValkeySentinel) Replication

func (s *ValkeySentinel) Replication() types.SentinelReplication

func (*ValkeySentinel) Restart

func (s *ValkeySentinel) Restart(ctx context.Context, annotationKeyVal ...string) error

func (*ValkeySentinel) Selector

func (s *ValkeySentinel) Selector() map[string]string

Deprecated

func (*ValkeySentinel) SendEventf

func (c *ValkeySentinel) SendEventf(eventtype, reason, messageFmt string, args ...any)

func (*ValkeySentinel) TLSConfig

func (s *ValkeySentinel) TLSConfig() *tls.Config

func (*ValkeySentinel) UpdateStatus

func (s *ValkeySentinel) UpdateStatus(ctx context.Context, st types.InstanceStatus, msg string) error

func (*ValkeySentinel) Users

func (s *ValkeySentinel) Users() types.Users

func (*ValkeySentinel) Version

func (s *ValkeySentinel) Version() version.ValkeyVersion

type ValkeySentinelNode

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

func (*ValkeySentinelNode) Brothers

func (n *ValkeySentinelNode) Brothers(ctx context.Context, name string) (ret []*vkcli.SentinelMonitorNode, err error)

func (*ValkeySentinelNode) Config

func (n *ValkeySentinelNode) Config() map[string]string

func (*ValkeySentinelNode) ContainerStatus

func (n *ValkeySentinelNode) ContainerStatus() *corev1.ContainerStatus

ContainerStatus

func (*ValkeySentinelNode) CurrentVersion

func (n *ValkeySentinelNode) CurrentVersion() version.ValkeyVersion

func (*ValkeySentinelNode) DefaultIP

func (n *ValkeySentinelNode) DefaultIP() net.IP

func (*ValkeySentinelNode) DefaultInternalIP

func (n *ValkeySentinelNode) DefaultInternalIP() net.IP

func (*ValkeySentinelNode) Definition

func (n *ValkeySentinelNode) Definition() *corev1.Pod

func (*ValkeySentinelNode) IPs

func (n *ValkeySentinelNode) IPs() []net.IP

func (*ValkeySentinelNode) Index

func (n *ValkeySentinelNode) Index() int

Index returns the index of the related pod

func (*ValkeySentinelNode) Info

func (n *ValkeySentinelNode) Info() vkcli.NodeInfo

func (*ValkeySentinelNode) InternalPort

func (n *ValkeySentinelNode) InternalPort() int

func (*ValkeySentinelNode) IsACLApplied

func (n *ValkeySentinelNode) IsACLApplied() bool

func (*ValkeySentinelNode) IsContainerReady

func (n *ValkeySentinelNode) IsContainerReady() bool

IsContainerReady

func (*ValkeySentinelNode) IsReady

func (n *ValkeySentinelNode) IsReady() bool

IsReady

func (*ValkeySentinelNode) IsTerminating

func (n *ValkeySentinelNode) IsTerminating() bool

IsTerminating

func (*ValkeySentinelNode) MonitoringClusters

func (n *ValkeySentinelNode) MonitoringClusters(ctx context.Context) (clusters []string, err error)

func (*ValkeySentinelNode) MonitoringNodes

func (n *ValkeySentinelNode) MonitoringNodes(ctx context.Context, name string) (master *vkcli.SentinelMonitorNode,
	replicas []*vkcli.SentinelMonitorNode, err error)

func (*ValkeySentinelNode) NodeIP

func (n *ValkeySentinelNode) NodeIP() net.IP

func (*ValkeySentinelNode) Port

func (n *ValkeySentinelNode) Port() int

func (*ValkeySentinelNode) Query

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

func (*ValkeySentinelNode) Refresh

func (n *ValkeySentinelNode) Refresh(ctx context.Context) (err error)

Refresh not concurrency safe

func (*ValkeySentinelNode) SetMonitor

func (n *ValkeySentinelNode) SetMonitor(ctx context.Context, name, ip, port, user, password, quorum string) error

func (*ValkeySentinelNode) Setup

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

Setup only return the last command error

func (*ValkeySentinelNode) Status

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

Status

type ValkeySentinelReplication

type ValkeySentinelReplication struct {
	appv1.StatefulSet
	// contains filtered or unexported fields
}

func NewValkeySentinelReplication

func NewValkeySentinelReplication(ctx context.Context, client clientset.ClientSet, inst types.SentinelInstance, logger logr.Logger) (*ValkeySentinelReplication, error)

func (*ValkeySentinelReplication) Definition

func (s *ValkeySentinelReplication) Definition() *appv1.StatefulSet

func (*ValkeySentinelReplication) IsReady

func (s *ValkeySentinelReplication) IsReady() bool

func (*ValkeySentinelReplication) NamespacedName

func (s *ValkeySentinelReplication) NamespacedName() client.ObjectKey

func (*ValkeySentinelReplication) Nodes

func (*ValkeySentinelReplication) Refresh

func (*ValkeySentinelReplication) Restart

func (s *ValkeySentinelReplication) Restart(ctx context.Context, annotationKeyVal ...string) error

func (*ValkeySentinelReplication) Status

func (*ValkeySentinelReplication) Version

Jump to

Keyboard shortcuts

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