apimachinery: kubedb.dev/apimachinery/pkg/controller/snapshot Index | Files

package snapshot

import "kubedb.dev/apimachinery/pkg/controller/snapshot"

Index

Package Files

controller.go cron.go snapshot.go workqueue.go

type Controller Uses

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

func NewController Uses

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 Uses

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 Uses

func (c *Controller) EnsureCustomResourceDefinitions() error

func (*Controller) InitInformer Uses

func (c *Controller) InitInformer() (cache.SharedIndexInformer, cache.SharedIndexInformer)

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 Uses

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 Uses

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

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

Package snapshot imports 36 packages (graph) and is imported by 23 packages. Updated 2019-07-20. Refresh now. Tools for package owners.