backup

package
v1.6.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlInterface

type ControlInterface interface {
	// UpdateBackup implements the control logic for backup job and backup clean job's creation, deletion
	UpdateBackup(backup *v1alpha1.Backup) error
	// UpdateStatus updates the status for a Backup, include condition and status info
	UpdateStatus(backup *v1alpha1.Backup, condition *v1alpha1.BackupCondition, newStatus *controller.BackupUpdateStatus) error
}

ControlInterface implements the control logic for updating Backup It is implemented as an interface to allow for extensions that provide different semantics. Currently, there is only one implementation.

func NewDefaultBackupControl

func NewDefaultBackupControl(
	cli versioned.Interface,
	backupManager backup.BackupManager) ControlInterface

NewDefaultBackupControl returns a new instance of the default implementation BackupControlInterface that implements the documented semantics for Backup.

type Controller

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

Controller controls backup.

func NewController

func NewController(deps *controller.Dependencies) *Controller

NewController creates a backup controller.

func (*Controller) Name added in v1.4.5

func (c *Controller) Name() string

Name returns backup controller name.

func (*Controller) Run

func (c *Controller) Run(workers int, stopCh <-chan struct{})

Run runs the backup controller.

type FakeBackupControl

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

FakeBackupControl is a fake BackupControlInterface

func NewFakeBackupControl

func NewFakeBackupControl(backupInformer informers.BackupInformer) *FakeBackupControl

NewFakeBackupControl returns a FakeBackupControl

func (*FakeBackupControl) SetUpdateBackupError

func (c *FakeBackupControl) SetUpdateBackupError(err error, after int)

SetUpdateBackupError sets the error attributes of updateBackupTracker

func (*FakeBackupControl) UpdateBackup

func (c *FakeBackupControl) UpdateBackup(backup *v1alpha1.Backup) error

UpdateBackup adds the backup to BackupIndexer

func (*FakeBackupControl) UpdateStatus added in v1.4.4

func (c *FakeBackupControl) UpdateStatus(_ *v1alpha1.Backup, condition *v1alpha1.BackupCondition, newStatus *controller.BackupUpdateStatus) error

UpdateStatus updates the status for a Backup, include condition and status info

Jump to

Keyboard shortcuts

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