persistence

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: Apache-2.0 Imports: 16 Imported by: 16

Documentation

Index

Constants

View Source
const DownloadURLTTL = 10 * time.Minute

DownloadURLTTL is how long a download URL is valid for.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupStore

type BackupStore interface {
	IsValid() error
	GetRevision() (string, error)

	ListBackups() ([]string, error)

	PutBackup(name string, metadata, contents, log, volumeSnapshots io.Reader) error
	GetBackupMetadata(name string) (*arkv1api.Backup, error)
	GetBackupVolumeSnapshots(name string) ([]*volume.Snapshot, error)
	GetBackupContents(name string) (io.ReadCloser, error)
	DeleteBackup(name string) error

	PutRestoreLog(backup, restore string, log io.Reader) error
	PutRestoreResults(backup, restore string, results io.Reader) error
	DeleteRestore(name string) error

	GetDownloadURL(target arkv1api.DownloadTarget) (string, error)
}

BackupStore defines operations for creating, retrieving, and deleting Ark backup and restore data in/from a persistent backup store.

func NewObjectBackupStore

func NewObjectBackupStore(location *arkv1api.BackupStorageLocation, objectStoreGetter ObjectStoreGetter, logger logrus.FieldLogger) (BackupStore, error)

type ObjectStoreGetter

type ObjectStoreGetter interface {
	GetObjectStore(provider string) (cloudprovider.ObjectStore, error)
}

ObjectStoreGetter is a type that can get a cloudprovider.ObjectStore from a provider name.

type ObjectStoreLayout

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

ObjectStoreLayout defines how Ark's persisted files map to keys in an object storage bucket.

func NewObjectStoreLayout

func NewObjectStoreLayout(prefix string) *ObjectStoreLayout

func (*ObjectStoreLayout) GetResticDir

func (l *ObjectStoreLayout) GetResticDir() string

GetResticDir returns the full prefix representing the restic directory within an object storage bucket containing a backup store.

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