sentinel

package
v0.0.0-...-3430a5a Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadDeploymentRedisSentinelNodes

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

func LoadRedisSentinelNodes

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

func NewRedisSentinelNode

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

Types

type RedisSentinel

type RedisSentinel struct {
	databasesv1.RedisSentinel
	// contains filtered or unexported fields
}

func NewRedisSentinel

func NewRedisSentinel(ctx context.Context, cliset clientset.ClientSet, eventRecorder record.EventRecorder, def *databasesv1.RedisSentinel, logger logr.Logger) (*RedisSentinel, error)

func (*RedisSentinel) Arch

func (s *RedisSentinel) Arch() redis.RedisArch

func (*RedisSentinel) Definition

func (s *RedisSentinel) Definition() *databasesv1.RedisSentinel

func (*RedisSentinel) GetPassword

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

func (*RedisSentinel) IsACLApplied

func (s *RedisSentinel) IsACLApplied() bool

func (*RedisSentinel) IsACLAppliedToAll

func (s *RedisSentinel) IsACLAppliedToAll() bool

func (*RedisSentinel) IsACLUserExists

func (s *RedisSentinel) IsACLUserExists() bool

func (*RedisSentinel) IsInService

func (s *RedisSentinel) IsInService() bool

func (*RedisSentinel) IsReady

func (s *RedisSentinel) IsReady() bool

func (*RedisSentinel) IsResourceFullfilled

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

func (*RedisSentinel) Logger

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

func (*RedisSentinel) NamespacedName

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

func (*RedisSentinel) Nodes

func (s *RedisSentinel) Nodes() []redis.RedisSentinelNode

func (*RedisSentinel) RawNodes

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

func (*RedisSentinel) Refresh

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

func (*RedisSentinel) Replication

func (s *RedisSentinel) Replication() types.RedisSentinelReplication

func (*RedisSentinel) Restart

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

func (*RedisSentinel) Selector

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

func (*RedisSentinel) SendEventf

func (c *RedisSentinel) SendEventf(eventtype, reason, messageFmt string, args ...interface{})

func (*RedisSentinel) TLSConfig

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

func (*RedisSentinel) UpdateStatus

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

func (*RedisSentinel) Users

func (s *RedisSentinel) Users() acl.Users

TODO: implement acl when redis 5.0 deprecated and import redis 8 or valkey 8

func (*RedisSentinel) Version

func (s *RedisSentinel) Version() redis.RedisVersion

type RedisSentinelNode

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

func (*RedisSentinelNode) Brothers

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

func (*RedisSentinelNode) Config

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

func (*RedisSentinelNode) ContainerStatus

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

ContainerStatus

func (*RedisSentinelNode) CurrentVersion

func (n *RedisSentinelNode) CurrentVersion() redis.RedisVersion

func (*RedisSentinelNode) DefaultIP

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

func (*RedisSentinelNode) DefaultInternalIP

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

func (*RedisSentinelNode) Definition

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

func (*RedisSentinelNode) IPs

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

func (*RedisSentinelNode) Index

func (n *RedisSentinelNode) Index() int

Index returns the index of the related pod

func (*RedisSentinelNode) Info

func (*RedisSentinelNode) InternalPort

func (n *RedisSentinelNode) InternalPort() int

func (*RedisSentinelNode) IsACLApplied

func (n *RedisSentinelNode) IsACLApplied() bool

func (*RedisSentinelNode) IsContainerReady

func (n *RedisSentinelNode) IsContainerReady() bool

IsContainerReady

func (*RedisSentinelNode) IsReady

func (n *RedisSentinelNode) IsReady() bool

IsReady

func (*RedisSentinelNode) IsTerminating

func (n *RedisSentinelNode) IsTerminating() bool

IsTerminating

func (*RedisSentinelNode) MonitoringClusters

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

func (*RedisSentinelNode) MonitoringNodes

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

func (*RedisSentinelNode) NodeIP

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

func (*RedisSentinelNode) Port

func (n *RedisSentinelNode) Port() int

func (*RedisSentinelNode) Query

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

func (*RedisSentinelNode) Refresh

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

Refresh not concurrency safe

func (*RedisSentinelNode) SetMonitor

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

func (*RedisSentinelNode) Setup

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

Setup only return the last command error

func (*RedisSentinelNode) Status

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

Status

type RedisSentinelReplication

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

func (*RedisSentinelReplication) Definition

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

func (*RedisSentinelReplication) IsReady

func (s *RedisSentinelReplication) IsReady() bool

func (*RedisSentinelReplication) NamespacedName

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

func (*RedisSentinelReplication) Nodes

func (*RedisSentinelReplication) Refresh

func (*RedisSentinelReplication) Restart

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

func (*RedisSentinelReplication) Status

func (*RedisSentinelReplication) Version

Jump to

Keyboard shortcuts

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