baas

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2018 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Baas

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

Baas will ensure that the backups are running accordingly.

func NewBaas

func NewBaas(k8sCli kubernetes.Interface, baasCLI baas8scli.Interface, logger log.Logger) *Baas

NewBaas returns a new baas.

func (*Baas) DeleteBackup

func (b *Baas) DeleteBackup(name string) error

DeleteBackup satisfies Syncer interface.

func (*Baas) EnsureBackup

func (b *Baas) EnsureBackup(backup *backupv1alpha1.Backup) error

EnsureBackup satisfies Syncer interface.

type Backupper

type Backupper interface {
	Stop() error
	SameSpec(baas *backupv1alpha1.Backup) bool
	Start() error
}

Backupper is an interface that a backup service has to satisfy

func NewPVCBackupper

func NewPVCBackupper(
	backup *backupv1alpha1.Backup,
	k8sCLI kubernetes.Interface,
	baasCLI baas8scli.Interface,
	log log.Logger,
	cron *cron.Cron,
	metrics *operatorMetrics,
	clusterWideState clusterWideState) Backupper

NewPVCBackupper returns a new PVCBackupper

type PVCBackupper

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

PVCBackupper implements the Backupper interface

func (*PVCBackupper) SameSpec

func (p *PVCBackupper) SameSpec(baas *backupv1alpha1.Backup) bool

SameSpec checks if the Backup Spec was changed

func (*PVCBackupper) Start

func (p *PVCBackupper) Start() error

Start registeres the schedule for an instance of this resource

func (*PVCBackupper) Stop

func (p *PVCBackupper) Stop() error

Stop stops the backup schedule

type Syncer

type Syncer interface {
	// EnsureBackup will ensure that the backup schedule is correctly registered
	EnsureBackup(pt *backupv1alpha1.Backup) error
	// DeleteBackup will stop and delete the schedule. Kubernetes will handle
	// the deletion of all child items.
	DeleteBackup(name string) error
}

Syncer is the interface that each Baas implementation has to satisfy.

Jump to

Keyboard shortcuts

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