baas

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: BSD-3-Clause Imports: 19 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) 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 {
	// EnsurePodTerminator will ensure that the pod terminator is running and working.
	EnsureBackup(pt *backupv1alpha1.Backup) error
	// DeletePodTerminator will stop and delete the pod terminator.
	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