Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
JobCreateName returns a "Create job" name for a given backup.
func JobDeleteName ¶
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.