backup

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// EtcdEndpoints specifies the endpoints of an etcd cluster.
	// When multiple endpoints are given, the backup operator retrieves
	// the backup from the endpoint that has the most up-to-date state.
	// The given endpoints must belong to the same etcd cluster.
	EtcdEndpoints []string

	// ConfigMapNameForTracing is the name of the ConfigMap where
	// the path to the last successful ABS backup is saved.
	ConfigMapNameForTracing string
}

Config holds Executor configuration

type Executor

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

Executor executes the backup process of etcd database

func NewExecutor

func NewExecutor(cfg Config, absSecretName, absContainerName string, etcdBackupCli etcdOpClient.EtcdBackupInterface, nsScopedLister etcdOpLister.EtcdBackupNamespaceLister, log logrus.FieldLogger) *Executor

NewExecutor returns new instance of Executor

func (*Executor) SingleBackup

func (e *Executor) SingleBackup(stopCh <-chan struct{}, blobPrefix string) (*SingleBackupOutput, error)

SingleBackup executes backup process for given etcd-cluster and waits for its status

type RecordedExecutor

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

RecordedExecutor saves in k8s ConfigMap path to the backup file when backup process ends without errors.

func NewRecordedExecutor

func NewRecordedExecutor(underlying singleBackupExecutor, cfgMapName string, cfgMapCli configMapClient) *RecordedExecutor

NewRecordedExecutor returns new instance of RecordedExecutor

func (*RecordedExecutor) SingleBackup

func (r *RecordedExecutor) SingleBackup(stopCh <-chan struct{}, blobPrefix string) (*SingleBackupOutput, error)

SingleBackup executes underlying SingleBackup method and if process ends without errors then path to the backup file is save in k8s ConfigMap BEWARE: It can return own error when it cannot save information to ConfigMap.

type SingleBackupOutput

type SingleBackupOutput struct {
	ABSBackupPath string
}

SingleBackupOutput contains all information which will be returned from SingleBackup function

Directories

Path Synopsis
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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