cluster

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 LoadRedisClusterShards

func LoadRedisClusterShards(ctx context.Context, client clientset.ClientSet, cluster types.RedisClusterInstance, logger logr.Logger) ([]types.RedisClusterShard, error)

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

Definition

func (*RedisCluster) IsACLAppliedToAll

func (c *RedisCluster) IsACLAppliedToAll() bool

func (*RedisCluster) IsACLUserExists

func (c *RedisCluster) IsACLUserExists() bool

func (*RedisCluster) IsInService

func (c *RedisCluster) IsInService() bool

IsInService

func (*RedisCluster) IsReady

func (c *RedisCluster) IsReady() bool

IsReady

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

func (c *RedisCluster) RawNodes(ctx context.Context) ([]corev1.Pod, error)

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

Status return the status of the cluster

func (*RedisCluster) TLS

func (c *RedisCluster) TLS() *tls.Config

TLS

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)

func (*RedisCluster) Version

func (c *RedisCluster) Version() redis.RedisVersion

Version

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

func (s *RedisClusterShard) IsImporting() bool

IsImporting

func (*RedisClusterShard) IsMigrating

func (s *RedisClusterShard) IsMigrating() bool

IsMigrating

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

func (s *RedisClusterShard) Slots() *slot.Slots

Slots

func (*RedisClusterShard) Status

func (*RedisClusterShard) Version

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

Version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳