snapshot

package
v0.0.0-...-d10261a Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	*amc.Controller
	amc.Config
	// contains filtered or unexported fields
}

func NewController

func NewController(
	controller *amc.Controller,
	snapshotter amc.Snapshotter,
	config amc.Config,
	tweakListOptions func(*metav1.ListOptions),
	eventRecorder record.EventRecorder,
) *Controller

NewController creates a new Controller

func (*Controller) AddEventHandlerFunc

func (c *Controller) AddEventHandlerFunc(selector labels.Selector) (*queue.Worker, *queue.Worker)

AddEventHandlerFunc adds EventHandler func. Before calling this, controller.Informer needs to be initialized Return type: Snapshot queue as 1st parameter and Job.Queue as 2nd.

func (*Controller) EnsureCustomResourceDefinitions

func (c *Controller) EnsureCustomResourceDefinitions() error

func (*Controller) InitInformer

InitInformer ensures snapshot watcher and returns queue.Worker. So, it is possible to start queue.run from other package/repositories Return type: snapshotInformer, JobInformer

type CronControllerInterface

type CronControllerInterface interface {
	StartCron()
	// ScheduleBackup takes parameter DB-runtime object, DB.scheduleSpec.BackupSchedule and DB-Version-Catalog
	ScheduleBackup(db runtime.Object, scheduleSpec *api.BackupScheduleSpec, catalog runtime.Object) error
	StopBackupScheduling(metav1.ObjectMeta)
	StopCron()
}

func NewCronController

func NewCronController(client kubernetes.Interface, extClient cs.Interface, dc dynamic.Interface) CronControllerInterface

NewCronController returns CronControllerInterface. Need to call StartCron() method to start Cron.

Jump to

Keyboard shortcuts

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