Documentation
¶
Index ¶
- func LoadRedisClusterShards(ctx context.Context, client clientset.ClientSet, ...) ([]types.RedisClusterShard, error)
- func NewRedisClusterShard(ctx context.Context, client clientset.ClientSet, ...) (types.RedisClusterShard, error)
- type RedisCluster
- func (c *RedisCluster) Arch() redis.RedisArch
- func (c *RedisCluster) Definition() *clusterv1.DistributedRedisCluster
- func (c *RedisCluster) IsACLAppliedToAll() bool
- func (c *RedisCluster) IsACLUserExists() bool
- func (c *RedisCluster) IsInService() bool
- func (c *RedisCluster) IsReady() bool
- func (c *RedisCluster) IsResourceFullfilled(ctx context.Context) (bool, error)
- func (c *RedisCluster) LoadRedisUsers(ctx context.Context)
- func (c *RedisCluster) Logger() logr.Logger
- func (c *RedisCluster) Masters() []redis.RedisNode
- func (c *RedisCluster) NamespacedName() client.ObjectKey
- func (c *RedisCluster) Nodes() []redis.RedisNode
- func (c *RedisCluster) RawNodes(ctx context.Context) ([]corev1.Pod, error)
- func (c *RedisCluster) Refresh(ctx context.Context) error
- func (c *RedisCluster) Restart(ctx context.Context, annotationKeyVal ...string) error
- func (c *RedisCluster) RewriteShards(ctx context.Context, shards []*clusterv1.ClusterShards) error
- func (c *RedisCluster) SendEventf(eventtype, reason, messageFmt string, args ...interface{})
- func (c *RedisCluster) Shards() []types.RedisClusterShard
- func (c *RedisCluster) Status() *clusterv1.DistributedRedisClusterStatus
- func (c *RedisCluster) TLS() *tls.Config
- func (c *RedisCluster) TLSConfig() *tls.Config
- func (c *RedisCluster) UpdateStatus(ctx context.Context, st types.InstanceStatus, message string) error
- func (c *RedisCluster) Users() (us acl.Users)
- func (c *RedisCluster) Version() redis.RedisVersion
- type RedisClusterShard
- func (s *RedisClusterShard) Definition() *appv1.StatefulSet
- func (s *RedisClusterShard) Index() int
- func (s *RedisClusterShard) IsImporting() bool
- func (s *RedisClusterShard) IsMigrating() bool
- func (s *RedisClusterShard) IsReady() bool
- func (s *RedisClusterShard) Master() redis.RedisNode
- func (s *RedisClusterShard) NamespacedName() apitypes.NamespacedName
- func (s *RedisClusterShard) Nodes() []redis.RedisNode
- func (s *RedisClusterShard) Refresh(ctx context.Context) error
- func (s *RedisClusterShard) Replicas() []redis.RedisNode
- func (s *RedisClusterShard) Restart(ctx context.Context, annotationKeyVal ...string) error
- func (s *RedisClusterShard) Slots() *slot.Slots
- func (s *RedisClusterShard) Status() *appv1.StatefulSetStatus
- func (s *RedisClusterShard) Version() redis.RedisVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadRedisClusterShards ¶
func NewRedisClusterShard ¶
func NewRedisClusterShard(ctx context.Context, client clientset.ClientSet, cluster types.RedisClusterInstance, sts *appv1.StatefulSet, logger logr.Logger) (types.RedisClusterShard, error)
NewRedisClusterShard
Types ¶
type RedisCluster ¶
type RedisCluster struct { clusterv1.DistributedRedisCluster // contains filtered or unexported fields }
func NewRedisCluster ¶
func NewRedisCluster(ctx context.Context, k8sClient clientset.ClientSet, eventRecorder record.EventRecorder, def *clusterv1.DistributedRedisCluster, logger logr.Logger) (*RedisCluster, error)
NewRedisCluster
func (*RedisCluster) Arch ¶
func (c *RedisCluster) Arch() redis.RedisArch
func (*RedisCluster) Definition ¶
func (c *RedisCluster) Definition() *clusterv1.DistributedRedisCluster
Definition
func (*RedisCluster) IsACLAppliedToAll ¶
func (c *RedisCluster) IsACLAppliedToAll() bool
func (*RedisCluster) IsACLUserExists ¶
func (c *RedisCluster) IsACLUserExists() bool
func (*RedisCluster) IsResourceFullfilled ¶
func (c *RedisCluster) IsResourceFullfilled(ctx context.Context) (bool, error)
func (*RedisCluster) LoadRedisUsers ¶
func (c *RedisCluster) LoadRedisUsers(ctx context.Context)
func (*RedisCluster) Logger ¶
func (c *RedisCluster) Logger() logr.Logger
func (*RedisCluster) Masters ¶
func (c *RedisCluster) Masters() []redis.RedisNode
func (*RedisCluster) NamespacedName ¶
func (c *RedisCluster) NamespacedName() client.ObjectKey
func (*RedisCluster) Nodes ¶
func (c *RedisCluster) Nodes() []redis.RedisNode
func (*RedisCluster) Refresh ¶
func (c *RedisCluster) Refresh(ctx context.Context) error
Refresh refresh users, shards
func (*RedisCluster) Restart ¶
func (c *RedisCluster) Restart(ctx context.Context, annotationKeyVal ...string) error
ctx
func (*RedisCluster) RewriteShards ¶
func (c *RedisCluster) RewriteShards(ctx context.Context, shards []*clusterv1.ClusterShards) error
RewriteShards
func (*RedisCluster) SendEventf ¶
func (c *RedisCluster) SendEventf(eventtype, reason, messageFmt string, args ...interface{})
func (*RedisCluster) Shards ¶
func (c *RedisCluster) Shards() []types.RedisClusterShard
func (*RedisCluster) Status ¶
func (c *RedisCluster) Status() *clusterv1.DistributedRedisClusterStatus
Status return the status of the cluster
func (*RedisCluster) TLSConfig ¶
func (c *RedisCluster) TLSConfig() *tls.Config
func (*RedisCluster) UpdateStatus ¶
func (c *RedisCluster) UpdateStatus(ctx context.Context, st types.InstanceStatus, message string) error
func (*RedisCluster) Users ¶
func (c *RedisCluster) Users() (us acl.Users)
type RedisClusterShard ¶
type RedisClusterShard struct { appv1.StatefulSet // contains filtered or unexported fields }
RedisClusterShard
func (*RedisClusterShard) Definition ¶
func (s *RedisClusterShard) Definition() *appv1.StatefulSet
func (*RedisClusterShard) Index ¶
func (s *RedisClusterShard) Index() int
Index redis shard index. so the statefulset name must match ^drc-<name>-[0-9]+$ format
func (*RedisClusterShard) IsReady ¶
func (s *RedisClusterShard) IsReady() bool
func (*RedisClusterShard) Master ¶
func (s *RedisClusterShard) Master() redis.RedisNode
Master for nodes not join the cluster, it's role is also master
func (*RedisClusterShard) NamespacedName ¶
func (s *RedisClusterShard) NamespacedName() apitypes.NamespacedName
func (*RedisClusterShard) Nodes ¶
func (s *RedisClusterShard) Nodes() []redis.RedisNode
Nodes returns all the nodes of this slots
func (*RedisClusterShard) Refresh ¶
func (s *RedisClusterShard) Refresh(ctx context.Context) error
Refresh
func (*RedisClusterShard) Replicas ¶
func (s *RedisClusterShard) Replicas() []redis.RedisNode
func (*RedisClusterShard) Restart ¶
func (s *RedisClusterShard) Restart(ctx context.Context, annotationKeyVal ...string) error
Restart
func (*RedisClusterShard) Status ¶
func (s *RedisClusterShard) Status() *appv1.StatefulSetStatus
func (*RedisClusterShard) Version ¶
func (s *RedisClusterShard) Version() redis.RedisVersion
Version
Click to show internal directories.
Click to hide internal directories.