backupinstance

package
v0.0.0-...-87ef7df Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FuncMap = template.FuncMap{
	"PVCName":       backupschedule.PVCName,
	"JobCreateName": JobCreateName,
	"JobDeleteName": JobDeleteName,
}

FuncMap can be used to execute templates with the helper functions from the Backup Instance operator.

Functions

func JobCreateName

func JobCreateName(backupName string) string

JobCreateName returns a "Create job" name for a given backup.

func JobDeleteName

func JobDeleteName(backupName string) string

JobDeleteName returns a "Delete job" name for a given backup.

Types

type FakeBackupInstanceOperator

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

FakeBackupInstanceOperator may be used in tests as a backup instance operator. It implements all operator functions as simply returning an fail set via SetError.

func NewFakeBackupInstanceOperator

func NewFakeBackupInstanceOperator() *FakeBackupInstanceOperator

NewFakeBackupInstanceOperator returns new operator that does nothing.

func (*FakeBackupInstanceOperator) CreateBackup

func (c *FakeBackupInstanceOperator) CreateBackup(backup *crv1.MySQLBackupInstance) error

CreateBackup simulates creating a backup. Returns error set via SetError.

func (*FakeBackupInstanceOperator) DeleteBackup

func (c *FakeBackupInstanceOperator) DeleteBackup(backup *crv1.MySQLBackupInstance) error

DeleteBackup simulates deleting a backup. Returns error set via SetError.

func (*FakeBackupInstanceOperator) SetError

func (c *FakeBackupInstanceOperator) SetError(err error)

SetError can be used to simulate operator failures.

type Operator

type Operator interface {
	CreateBackup(backup *crv1.MySQLBackupInstance) error
	DeleteBackup(backup *crv1.MySQLBackupInstance) error
}

Operator represents an object to manipulate Backup custom resources.

func NewBackupInstanceOperator

func NewBackupInstanceOperator(clientset versioned.Interface, kubeClientset kubernetes.Interface) Operator

NewBackupInstanceOperator returns a new Operator.

Jump to

Keyboard shortcuts

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