controllers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronScheduler added in v0.2.0

type CronScheduler interface {
	AddFunc(spec string, cmd func()) (cron.EntryID, error)
	Remove(id cron.EntryID)
}

type EtcdBackupReconciler

type EtcdBackupReconciler struct {
	client.Client
	Log logr.Logger

	// An absolute path to a directory which will contain backups that have not yet been pushed to their destination.
	TempDir string
}

EtcdBackupReconciler reconciles a EtcdBackup object

func (*EtcdBackupReconciler) Reconcile

func (r *EtcdBackupReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*EtcdBackupReconciler) SetupWithManager

func (r *EtcdBackupReconciler) SetupWithManager(mgr ctrl.Manager) error

type EtcdBackupScheduleReconciler

type EtcdBackupScheduleReconciler struct {
	client.Client
	Log logr.Logger

	// CronHandler is able to schedule cronjobs to occur at given times.
	CronHandler CronScheduler

	// Schedules holds a mapping of resources to the object responsible for scheduling the backup to be taken.
	Schedules *ScheduleMap
}

EtcdBackupScheduleReconciler reconciles a EtcdBackupSchedule object

func (*EtcdBackupScheduleReconciler) Reconcile

func (*EtcdBackupScheduleReconciler) SetupWithManager

func (r *EtcdBackupScheduleReconciler) SetupWithManager(mgr ctrl.Manager) error

type EtcdClusterReconciler

type EtcdClusterReconciler struct {
	client.Client
	Log      logr.Logger
	Recorder record.EventRecorder
	Etcd     etcd.APIBuilder
}

EtcdClusterReconciler reconciles a EtcdCluster object

func (*EtcdClusterReconciler) Reconcile

func (r *EtcdClusterReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

func (*EtcdClusterReconciler) SetupWithManager

func (r *EtcdClusterReconciler) SetupWithManager(mgr ctrl.Manager) error

type EtcdPeerReconciler

type EtcdPeerReconciler struct {
	client.Client
	Log  logr.Logger
	Etcd etcd.APIBuilder
}

EtcdPeerReconciler reconciles a EtcdPeer object

func (*EtcdPeerReconciler) Reconcile

func (r *EtcdPeerReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reterr error)

func (*EtcdPeerReconciler) SetupWithManager

func (r *EtcdPeerReconciler) SetupWithManager(mgr ctrl.Manager) error

type MembersByName added in v0.2.0

type MembersByName []etcdclient.Member

MembersByName provides a sort.Sort interface for etcdClient.Member.Name

func (MembersByName) Len added in v0.2.0

func (a MembersByName) Len() int

func (MembersByName) Less added in v0.2.0

func (a MembersByName) Less(i, j int) bool

func (MembersByName) Swap added in v0.2.0

func (a MembersByName) Swap(i, j int)

type PeerPVCDeleter added in v0.2.0

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

PeerPVCDeleter deletes the PVC for an EtcdPeer and removes the PVC deletion finalizer.

func (*PeerPVCDeleter) Execute added in v0.2.0

func (o *PeerPVCDeleter) Execute(ctx context.Context) error

Execute performs the deletiong and finalizer removal

type Schedule added in v0.2.0

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

type ScheduleMap added in v0.2.0

type ScheduleMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

ScheduleMap is a thread-safe mapping of backup schedules.

func NewScheduleMap added in v0.2.0

func NewScheduleMap() *ScheduleMap

func (*ScheduleMap) Delete added in v0.2.0

func (s *ScheduleMap) Delete(key string)

func (*ScheduleMap) Read added in v0.2.0

func (s *ScheduleMap) Read(key string) (Schedule, bool)

func (*ScheduleMap) Write added in v0.2.0

func (s *ScheduleMap) Write(key string, value Schedule)

Jump to

Keyboard shortcuts

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