backup

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2017 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPodCommandExecutor added in v0.5.0

func NewPodCommandExecutor(restClientConfig *rest.Config, restClient poster) podCommandExecutor

NewPodCommandExecutor creates a new podCommandExecutor.

Types

type Action

type Action interface {
	// Execute allows the Action to perform arbitrary logic with the item being backed up and the
	// backup itself. Implementations may return additional ResourceIdentifiers that indicate specific
	// items that also need to be backed up.
	Execute(log *logrus.Entry, item runtime.Unstructured, backup *api.Backup) ([]ResourceIdentifier, error)
}

Action is an actor that performs an operation on an individual item being backed up.

func NewBackupPVAction added in v0.5.0

func NewBackupPVAction() Action

func NewVolumeSnapshotAction

func NewVolumeSnapshotAction(snapshotService cloudprovider.SnapshotService) (Action, error)

type Backupper

type Backupper interface {
	// Backup takes a backup using the specification in the api.Backup and writes backup and log data
	// to the given writers.
	Backup(backup *api.Backup, backupFile, logFile io.Writer) error
}

Backupper performs backups.

func NewKubernetesBackupper

func NewKubernetesBackupper(
	discoveryHelper discovery.Helper,
	dynamicFactory client.DynamicFactory,
	actions map[string]Action,
	podCommandExecutor podCommandExecutor,
) (Backupper, error)

NewKubernetesBackupper creates a new kubernetesBackupper.

type ItemBackupper added in v0.5.0

type ItemBackupper interface {
	// contains filtered or unexported methods
}

type ResourceIdentifier added in v0.5.0

type ResourceIdentifier struct {
	schema.GroupResource
	Namespace string
	Name      string
}

ResourceIdentifier describes a single item by its group, resource, namespace, and name.

Jump to

Keyboard shortcuts

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