backupcontroller

package
v1.11.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDestroyEvent

func IsDestroyEvent(bkp *apis.CStorBackup) bool

IsDestroyEvent is to check if the call is for backup destroy.

func IsDoneStatus

func IsDoneStatus(bkp *apis.CStorBackup) bool

IsDoneStatus is to check if the backup is completed or not

func IsFailedStatus

func IsFailedStatus(bkp *apis.CStorBackup) bool

IsFailedStatus is to check if the backup is failed or not

func IsInProgressStatus

func IsInProgressStatus(bkp *apis.CStorBackup) bool

IsInProgressStatus is to check if the backup is in in-progress state.

func IsInitStatus

func IsInitStatus(bkp *apis.CStorBackup) bool

IsInitStatus is to check if the backup is in init state.

func IsOnlyStatusChange

func IsOnlyStatusChange(oldbkp, newbkp *apis.CStorBackup) bool

IsOnlyStatusChange is to check the only status change of CStorBackup object.

func IsPendingStatus

func IsPendingStatus(bkp *apis.CStorBackup) bool

IsPendingStatus is to check if the backup is in a pending state.

func IsRightCStorPoolMgmt

func IsRightCStorPoolMgmt(bkp *apis.CStorBackup) bool

IsRightCStorPoolMgmt is to check if the backup request is for this cstor-pool or not.

Types

type BackupController

type BackupController struct {

	// BackupSynced is used for caches sync to get populated
	BackupSynced cache.InformerSynced
	// contains filtered or unexported fields
}

BackupController is the controller implementation for CStorBackup resources.

func NewCStorBackupController

func NewCStorBackupController(
	kubeclientset kubernetes.Interface,
	clientset clientset.Interface,
	kubeInformerFactory kubeinformers.SharedInformerFactory,
	cStorInformerFactory informers.SharedInformerFactory) *BackupController

NewCStorBackupController returns a new cStor Backup controller instance

func (*BackupController) Run

func (c *BackupController) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

Jump to

Keyboard shortcuts

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