Documentation
¶
Index ¶
- func LoadValkeyClusterShards(ctx context.Context, client clientset.ClientSet, cluster types.ClusterInstance, ...) ([]types.ClusterShard, error)
- func NewValkeyClusterShard(ctx context.Context, client clientset.ClientSet, cluster types.ClusterInstance, ...) (types.ClusterShard, error)
- type ValkeyCluster
- func (c *ValkeyCluster) Arch() core.Arch
- func (c *ValkeyCluster) Definition() *v1alpha1.Cluster
- func (c *ValkeyCluster) IsACLAppliedToAll() bool
- func (c *ValkeyCluster) IsACLUserExists() bool
- func (c *ValkeyCluster) IsInService() bool
- func (c *ValkeyCluster) IsReady() bool
- func (c *ValkeyCluster) IsResourceFullfilled(ctx context.Context) (bool, error)
- func (c *ValkeyCluster) Issuer() *certmetav1.ObjectReference
- func (c *ValkeyCluster) LoadUsers(ctx context.Context)
- func (c *ValkeyCluster) Logger() logr.Logger
- func (c *ValkeyCluster) Masters() []types.ValkeyNode
- func (c *ValkeyCluster) NamespacedName() client.ObjectKey
- func (c *ValkeyCluster) Nodes() []types.ValkeyNode
- func (c *ValkeyCluster) RawNodes(ctx context.Context) ([]corev1.Pod, error)
- func (c *ValkeyCluster) Refresh(ctx context.Context) error
- func (c *ValkeyCluster) Restart(ctx context.Context, annotationKeyVal ...string) error
- func (c *ValkeyCluster) RewriteShards(ctx context.Context, shards []*v1alpha1.ClusterShards) error
- func (c *ValkeyCluster) SendEventf(eventtype, reason, messageFmt string, args ...any)
- func (c *ValkeyCluster) Shards() []types.ClusterShard
- func (c *ValkeyCluster) Status() *v1alpha1.ClusterStatus
- func (c *ValkeyCluster) TLS() *tls.Config
- func (c *ValkeyCluster) TLSConfig() *tls.Config
- func (c *ValkeyCluster) UpdateStatus(ctx context.Context, st types.InstanceStatus, message string) error
- func (c *ValkeyCluster) Users() (us types.Users)
- func (c *ValkeyCluster) Version() version.ValkeyVersion
- type ValkeyClusterShard
- func (s *ValkeyClusterShard) Definition() *appv1.StatefulSet
- func (s *ValkeyClusterShard) Index() int
- func (s *ValkeyClusterShard) IsImporting() bool
- func (s *ValkeyClusterShard) IsMigrating() bool
- func (s *ValkeyClusterShard) IsReady() bool
- func (s *ValkeyClusterShard) Master() types.ValkeyNode
- func (s *ValkeyClusterShard) NamespacedName() apitypes.NamespacedName
- func (s *ValkeyClusterShard) Nodes() []types.ValkeyNode
- func (s *ValkeyClusterShard) Refresh(ctx context.Context) error
- func (s *ValkeyClusterShard) Replicas() []types.ValkeyNode
- func (s *ValkeyClusterShard) Restart(ctx context.Context, annotationKeyVal ...string) error
- func (s *ValkeyClusterShard) Slots() *slot.Slots
- func (s *ValkeyClusterShard) Status() *appv1.StatefulSetStatus
- func (s *ValkeyClusterShard) Version() version.ValkeyVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadValkeyClusterShards ¶
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 ¶
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) IsResourceFullfilled ¶
func (c *ValkeyCluster) IsResourceFullfilled(ctx context.Context) (bool, error)
func (*ValkeyCluster) Issuer ¶
func (c *ValkeyCluster) Issuer() *certmetav1.ObjectReference
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) 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) 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)
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) Status ¶
func (s *ValkeyClusterShard) Status() *appv1.StatefulSetStatus
func (*ValkeyClusterShard) Version ¶
func (s *ValkeyClusterShard) Version() version.ValkeyVersion
Version
Click to show internal directories.
Click to hide internal directories.