Documentation ¶
Index ¶
Constants ¶
View Source
const ACLFileLoadDuration time.Duration = time.Millisecond * 500
Defines the time it takes for Redis to load the new config
View Source
const ACLFilePropagationDuration time.Duration = time.Millisecond * 5000
Defines how long it takes for the ACL configmap to be reloaded by the kubelet and visible in the volume mount
Variables ¶
View Source
var EMPTY struct{}
Functions ¶
This section is empty.
Types ¶
type FollowerNode ¶
type LeaderNode ¶
type NodeNumbers ¶
type NodeNumbers [2]string // 0: node number, 1: leader number
type RedisClusterReconciler ¶
type RedisClusterReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme RedisCLI *rediscli.RedisCLI State RedisClusterState }
func (*RedisClusterReconciler) NewRedisClusterView ¶
func (r *RedisClusterReconciler) NewRedisClusterView(redisCluster *dbv1.RedisCluster) (*RedisClusterView, error)
func (*RedisClusterReconciler) SetupWithManager ¶
func (r *RedisClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
type RedisClusterState ¶
type RedisClusterState string
const ( // NotExists: the RedisCluster custom resource has just been created NotExists RedisClusterState = "NotExists" // InitializingCluster: ConfigMap, Service resources are created; the leader // pods are created and clusterized InitializingCluster RedisClusterState = "InitializingCluster" // InitializingFollowers: followers are added to the cluster InitializingFollowers RedisClusterState = "InitializingFollowers" // Ready: cluster is up & running as expected Ready RedisClusterState = "Ready" // Recovering: one ore note nodes are in fail state and are being recreated Recovering RedisClusterState = "Recovering" // Updating: the cluster is in the middle of a rolling update Updating RedisClusterState = "Updating" )
type RedisClusterView ¶
type RedisClusterView []LeaderNode
Representation of a cluster, each element contains information about a leader
func (*RedisClusterView) HealthyNodeIPs ¶
func (r *RedisClusterView) HealthyNodeIPs() []string
Returns a list with all the IPs of the Redis nodes that are healthy A nod eis healthy if Redis can be reached and is in cluster mode
func (*RedisClusterView) IPs ¶
func (v *RedisClusterView) IPs() []string
Returns a list with all the IPs of the Redis nodes
func (*RedisClusterView) Sort ¶
func (v *RedisClusterView) Sort()
In-place sort of a cluster view - ascending alphabetical order by node number
func (*RedisClusterView) String ¶
func (v *RedisClusterView) String() string
type RedisConfigReconciler ¶
type RedisConfigReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme RedisCLI *rediscli.RedisCLI }
func (*RedisConfigReconciler) SetupWithManager ¶
func (r *RedisConfigReconciler) SetupWithManager(mgr ctrl.Manager) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.