redisfailover

package
v1.22.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, k8sService k8s.Services, redisClient redis.Client, mClient metrics.Instrumenter, kooperMetricsRecorder kmetrics.Recorder, logger log.Logger) operator.Operator

New will create an operator that is responsible of managing all the required stuff to create redis failovers.

Types

type Config

type Config struct {
	ListenAddress string
	MetricsPath   string
}

Config is the configuration for the redis operator.

type RedisFailoverHandler

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

RedisFailoverHandler is the Redis Failover handler. This handler will create the required resources that a RF needs.

func NewRedisFailoverHandler

func NewRedisFailoverHandler(config Config, rfService rfservice.RedisFailoverClient, rfChecker rfservice.RedisFailoverCheck, rfHealer rfservice.RedisFailoverHeal, k8sservice k8s.Service, mClient metrics.Instrumenter, logger log.Logger) *RedisFailoverHandler

NewRedisFailoverHandler returns a new RF handler

func (*RedisFailoverHandler) Add

Add will ensure the redis failover is in the expected state.

func (*RedisFailoverHandler) CheckAndHeal

CheckAndHeal runs verifcation checks to ensure the RedisFailover is in an expected and healthy state. If the checks do not match up to expectations, an attempt will be made to "heal" the RedisFailover into a healthy state.

func (*RedisFailoverHandler) Delete

func (r *RedisFailoverHandler) Delete(_ context.Context, name string) error

Delete handles the deletion of a RF.

func (*RedisFailoverHandler) Ensure

Ensure is called to ensure all of the resources associated with a RedisFailover are created

func (*RedisFailoverHandler) UpdateRedisesPods

func (r *RedisFailoverHandler) UpdateRedisesPods(rf *redisfailoverv1.RedisFailover) error

UpdateRedisesPods if the running version of pods are equal to the statefulset one

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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