cluster

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 LoadValkeyClusterShards

func LoadValkeyClusterShards(ctx context.Context, client clientset.ClientSet, cluster types.ClusterInstance, logger logr.Logger) ([]types.ClusterShard, error)

func NewValkeyClusterShard

func NewValkeyClusterShard(ctx context.Context, client clientset.ClientSet, cluster types.ClusterInstance, sts *appv1.StatefulSet, logger logr.Logger) (types.ClusterShard, error)

NewValkeyClusterShard

Types

type ValkeyCluster

type ValkeyCluster struct {
	v1alpha1.Cluster
	// contains filtered or unexported fields
}

func NewCluster

func NewCluster(ctx context.Context, k8sClient clientset.ClientSet, eventRecorder record.EventRecorder, def *v1alpha1.Cluster, logger logr.Logger) (*ValkeyCluster, error)

NewValkeyCluster

func (*ValkeyCluster) Arch

func (c *ValkeyCluster) Arch() core.Arch

func (*ValkeyCluster) Definition

func (c *ValkeyCluster) Definition() *v1alpha1.Cluster

Definition

func (*ValkeyCluster) IsACLAppliedToAll

func (c *ValkeyCluster) IsACLAppliedToAll() bool

func (*ValkeyCluster) IsACLUserExists

func (c *ValkeyCluster) IsACLUserExists() bool

func (*ValkeyCluster) IsInService

func (c *ValkeyCluster) IsInService() bool

IsInService

func (*ValkeyCluster) IsReady

func (c *ValkeyCluster) IsReady() bool

IsReady

func (*ValkeyCluster) IsResourceFullfilled

func (c *ValkeyCluster) IsResourceFullfilled(ctx context.Context) (bool, error)

func (*ValkeyCluster) Issuer

func (*ValkeyCluster) LoadUsers

func (c *ValkeyCluster) LoadUsers(ctx context.Context)

func (*ValkeyCluster) Logger

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

func (*ValkeyCluster) Masters

func (c *ValkeyCluster) Masters() []types.ValkeyNode

func (*ValkeyCluster) NamespacedName

func (c *ValkeyCluster) NamespacedName() client.ObjectKey

func (*ValkeyCluster) Nodes

func (c *ValkeyCluster) Nodes() []types.ValkeyNode

func (*ValkeyCluster) RawNodes

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

func (*ValkeyCluster) Refresh

func (c *ValkeyCluster) Refresh(ctx context.Context) error

Refresh refresh users, shards

func (*ValkeyCluster) Restart

func (c *ValkeyCluster) Restart(ctx context.Context, annotationKeyVal ...string) error

ctx

func (*ValkeyCluster) RewriteShards

func (c *ValkeyCluster) RewriteShards(ctx context.Context, shards []*v1alpha1.ClusterShards) error

RewriteShards

func (*ValkeyCluster) SendEventf

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

func (*ValkeyCluster) Shards

func (c *ValkeyCluster) Shards() []types.ClusterShard

func (*ValkeyCluster) Status

func (c *ValkeyCluster) Status() *v1alpha1.ClusterStatus

Status return the status of the cluster

func (*ValkeyCluster) TLS

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

TLS

func (*ValkeyCluster) TLSConfig

func (c *ValkeyCluster) TLSConfig() *tls.Config

func (*ValkeyCluster) UpdateStatus

func (c *ValkeyCluster) UpdateStatus(ctx context.Context, st types.InstanceStatus, message string) error

func (*ValkeyCluster) Users

func (c *ValkeyCluster) Users() (us types.Users)

func (*ValkeyCluster) Version

func (c *ValkeyCluster) Version() version.ValkeyVersion

Version

type ValkeyClusterShard

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

ValkeyClusterShard

func (*ValkeyClusterShard) Definition

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

func (*ValkeyClusterShard) Index

func (s *ValkeyClusterShard) Index() int

Index valkey shard index. so the statefulset name must match ^<prefix>-<name>-[0-9]+$ format

func (*ValkeyClusterShard) IsImporting

func (s *ValkeyClusterShard) IsImporting() bool

IsImporting

func (*ValkeyClusterShard) IsMigrating

func (s *ValkeyClusterShard) IsMigrating() bool

IsMigrating

func (*ValkeyClusterShard) IsReady

func (s *ValkeyClusterShard) IsReady() bool

func (*ValkeyClusterShard) Master

func (s *ValkeyClusterShard) Master() types.ValkeyNode

Master for nodes not join the cluster, it's role is also master

func (*ValkeyClusterShard) NamespacedName

func (s *ValkeyClusterShard) NamespacedName() apitypes.NamespacedName

func (*ValkeyClusterShard) Nodes

func (s *ValkeyClusterShard) Nodes() []types.ValkeyNode

Nodes returns all the nodes of this slots

func (*ValkeyClusterShard) Refresh

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

Refresh

func (*ValkeyClusterShard) Replicas

func (s *ValkeyClusterShard) Replicas() []types.ValkeyNode

func (*ValkeyClusterShard) Restart

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

Restart

func (*ValkeyClusterShard) Slots

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

Slots

func (*ValkeyClusterShard) Status

func (*ValkeyClusterShard) Version

Version

Jump to

Keyboard shortcuts

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