backupcontroller

package
Version: v1.12.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// OpenEBSIOCSPIID is the environment variable specified in pod.
	// It holds the UID of the CSPI
	OpenEBSIOCSPIID string = "OPENEBS_IO_CSPI_ID"
)

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 IsPendingStatus

func IsPendingStatus(bkp *apis.CStorBackup) bool

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

func IsRightCStorPoolInstanceMgmt

func IsRightCStorPoolInstanceMgmt(bkp *apis.CStorBackup) bool

IsRightCStorPoolInstanceMgmt 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 instance of cStor Backup controller

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
t or T : Toggle theme light dark auto
y or Y : Canonical URL