rediscluster

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 25 Imported by: 2

Documentation

Index

Constants

View Source
const ReconcileTime = 60 * time.Second

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new RedisCluster Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func FlagSet

func FlagSet() *pflag.FlagSet

Types

type ReconcileRedisCluster

type ReconcileRedisCluster struct {
	// contains filtered or unexported fields
}

ReconcileRedisCluster reconciles a RedisCluster object

func (*ReconcileRedisCluster) Reconcile

func (r *ReconcileRedisCluster) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a RedisCluster object and makes changes based on the state read and what is in the RedisCluster.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

type RedisClusterHandler

type RedisClusterHandler struct {
	// contains filtered or unexported fields
}

RedisClusterHandler is the RedisCluster handler. This handler will create the required resources that a RedisCluster needs.

func (*RedisClusterHandler) CheckAndHeal

func (r *RedisClusterHandler) CheckAndHeal(meta *clustercache.Meta) error

CheckAndHeal Check the health of the cluster and heal, Waiting Number of ready redis is equal as the set on the RedisCluster spec Waiting Number of ready sentinel is equal as the set on the RedisCluster spec Check only one master Number of redis master is 1 All redis slaves have the same master Set Custom Redis config All sentinels points to the same redis master Sentinel has not death nodes Sentinel knows the correct slave number

func (*RedisClusterHandler) Do

Do will ensure the RedisCluster is in the expected state and update the RedisCluster status.

func (*RedisClusterHandler) Ensure

Ensure the RedisCluster's components are correct.

Jump to

Keyboard shortcuts

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