Documentation ¶
Index ¶
- func LoadDeploymentRedisSentinelNodes(ctx context.Context, client kubernetes.ClientSet, obj metav1.Object, ...) ([]redis.RedisSentinelNode, error)
- func LoadRedisSentinelNodes(ctx context.Context, client kubernetes.ClientSet, sts metav1.Object, ...) ([]redis.RedisSentinelNode, error)
- func NewRedisSentinelNode(ctx context.Context, client kubernetes.ClientSet, obj metav1.Object, ...) (redis.RedisSentinelNode, error)
- type RedisSentinel
- func (s *RedisSentinel) Arch() redis.RedisArch
- func (s *RedisSentinel) Definition() *databasesv1.RedisSentinel
- func (s *RedisSentinel) GetPassword() (string, error)
- func (s *RedisSentinel) IsACLApplied() bool
- func (s *RedisSentinel) IsACLAppliedToAll() bool
- func (s *RedisSentinel) IsACLUserExists() bool
- func (s *RedisSentinel) IsInService() bool
- func (s *RedisSentinel) IsReady() bool
- func (s *RedisSentinel) IsResourceFullfilled(ctx context.Context) (bool, error)
- func (c *RedisSentinel) Logger() logr.Logger
- func (s *RedisSentinel) NamespacedName() client.ObjectKey
- func (s *RedisSentinel) Nodes() []redis.RedisSentinelNode
- func (s *RedisSentinel) RawNodes(ctx context.Context) ([]corev1.Pod, error)
- func (s *RedisSentinel) Refresh(ctx context.Context) error
- func (s *RedisSentinel) Replication() types.RedisSentinelReplication
- func (s *RedisSentinel) Restart(ctx context.Context, annotationKeyVal ...string) error
- func (s *RedisSentinel) Selector() map[string]string
- func (c *RedisSentinel) SendEventf(eventtype, reason, messageFmt string, args ...interface{})
- func (s *RedisSentinel) TLSConfig() *tls.Config
- func (s *RedisSentinel) UpdateStatus(ctx context.Context, st types.InstanceStatus, msg string) error
- func (s *RedisSentinel) Users() acl.Users
- func (s *RedisSentinel) Version() redis.RedisVersion
- type RedisSentinelNode
- func (n *RedisSentinelNode) Brothers(ctx context.Context, name string) (ret []*rediscli.SentinelMonitorNode, err error)
- func (n *RedisSentinelNode) Config() map[string]string
- func (n *RedisSentinelNode) ContainerStatus() *corev1.ContainerStatus
- func (n *RedisSentinelNode) CurrentVersion() redis.RedisVersion
- func (n *RedisSentinelNode) DefaultIP() net.IP
- func (n *RedisSentinelNode) DefaultInternalIP() net.IP
- func (n *RedisSentinelNode) Definition() *corev1.Pod
- func (n *RedisSentinelNode) IPs() []net.IP
- func (n *RedisSentinelNode) Index() int
- func (n *RedisSentinelNode) Info() rediscli.RedisInfo
- func (n *RedisSentinelNode) InternalPort() int
- func (n *RedisSentinelNode) IsACLApplied() bool
- func (n *RedisSentinelNode) IsContainerReady() bool
- func (n *RedisSentinelNode) IsReady() bool
- func (n *RedisSentinelNode) IsTerminating() bool
- func (n *RedisSentinelNode) MonitoringClusters(ctx context.Context) (clusters []string, err error)
- func (n *RedisSentinelNode) MonitoringNodes(ctx context.Context, name string) (master *rediscli.SentinelMonitorNode, replicas []*rediscli.SentinelMonitorNode, ...)
- func (n *RedisSentinelNode) NodeIP() net.IP
- func (n *RedisSentinelNode) Port() int
- func (n *RedisSentinelNode) Query(ctx context.Context, cmd string, args ...any) (any, error)
- func (n *RedisSentinelNode) Refresh(ctx context.Context) (err error)
- func (n *RedisSentinelNode) SetMonitor(ctx context.Context, name, ip, port, user, password, quorum string) error
- func (n *RedisSentinelNode) Setup(ctx context.Context, margs ...[]any) (err error)
- func (n *RedisSentinelNode) Status() corev1.PodPhase
- type RedisSentinelReplication
- func (s *RedisSentinelReplication) Definition() *appv1.StatefulSet
- func (s *RedisSentinelReplication) IsReady() bool
- func (s *RedisSentinelReplication) NamespacedName() client.ObjectKey
- func (s *RedisSentinelReplication) Nodes() []redis.RedisSentinelNode
- func (s *RedisSentinelReplication) Refresh(ctx context.Context) error
- func (s *RedisSentinelReplication) Restart(ctx context.Context, annotationKeyVal ...string) error
- func (s *RedisSentinelReplication) Status() *appv1.StatefulSetStatus
- func (s *RedisSentinelReplication) Version() redis.RedisVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadRedisSentinelNodes ¶
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) 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 ¶
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 (n *RedisSentinelNode) Info() rediscli.RedisInfo
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) 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) 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
type RedisSentinelReplication ¶
type RedisSentinelReplication struct { appv1.StatefulSet // contains filtered or unexported fields }
func NewRedisSentinelReplication ¶
func NewRedisSentinelReplication(ctx context.Context, client clientset.ClientSet, inst types.RedisSentinelInstance, logger logr.Logger) (*RedisSentinelReplication, error)
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 (s *RedisSentinelReplication) Nodes() []redis.RedisSentinelNode
func (*RedisSentinelReplication) Refresh ¶
func (s *RedisSentinelReplication) Refresh(ctx context.Context) error
func (*RedisSentinelReplication) Restart ¶
func (s *RedisSentinelReplication) Restart(ctx context.Context, annotationKeyVal ...string) error
func (*RedisSentinelReplication) Status ¶
func (s *RedisSentinelReplication) Status() *appv1.StatefulSetStatus
func (*RedisSentinelReplication) Version ¶
func (s *RedisSentinelReplication) Version() redis.RedisVersion
Click to show internal directories.
Click to hide internal directories.