persistence

package
v0.0.0-...-c1b1270 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

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 BackupInfo

type BackupInfo struct {
	Name string
	Metadata,
	Contents,
	Log,
	BackupResults,
	PodVolumeBackups,
	VolumeSnapshots,
	BackupItemOperations,
	BackupResourceList,
	CSIVolumeSnapshots,
	CSIVolumeSnapshotContents,
	CSIVolumeSnapshotClasses,
	BackupVolumeInfo io.Reader
}

type BackupStore

type BackupStore interface {
	IsValid() error

	ListBackups() ([]string, error)

	PutBackup(info BackupInfo) error
	PutBackupMetadata(backup string, backupMetadata io.Reader) error
	PutBackupItemOperations(backup string, backupItemOperations io.Reader) error
	PutBackupContents(backup string, backupContents io.Reader) error
	GetBackupMetadata(name string) (*velerov1api.Backup, error)
	GetBackupItemOperations(name string) ([]*itemoperation.BackupOperation, error)
	GetBackupVolumeSnapshots(name string) ([]*volume.Snapshot, error)
	GetPodVolumeBackups(name string) ([]*velerov1api.PodVolumeBackup, error)
	GetBackupContents(name string) (io.ReadCloser, error)
	GetCSIVolumeSnapshots(name string) ([]*snapshotv1api.VolumeSnapshot, error)
	GetCSIVolumeSnapshotContents(name string) ([]*snapshotv1api.VolumeSnapshotContent, error)
	GetCSIVolumeSnapshotClasses(name string) ([]*snapshotv1api.VolumeSnapshotClass, error)
	PutBackupVolumeInfos(name string, volumeInfo io.Reader) error
	GetBackupVolumeInfos(name string) ([]*volume.BackupVolumeInfo, error)
	GetRestoreResults(name string) (map[string]results.Result, error)

	// BackupExists checks if the backup metadata file exists in object storage.
	BackupExists(bucket, backupName string) (bool, error)

	DeleteBackup(name string) error

	PutRestoreLog(backup, restore string, log io.Reader) error
	PutRestoreResults(backup, restore string, results io.Reader) error
	PutRestoredResourceList(restore string, results io.Reader) error
	PutRestoreItemOperations(restore string, restoreItemOperations io.Reader) error
	GetRestoreItemOperations(name string) ([]*itemoperation.RestoreOperation, error)
	PutRestoreVolumeInfo(restore string, volumeInfo io.Reader) error
	DeleteRestore(name string) error
	GetRestoredResourceList(name string) (map[string][]string, error)

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

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

type BucketData

type BucketData map[string][]byte

type ObjectBackupStoreGetter

type ObjectBackupStoreGetter interface {
	Get(location *velerov1api.BackupStorageLocation, objectStoreGetter ObjectStoreGetter, logger logrus.FieldLogger) (BackupStore, error)
}

ObjectBackupStoreGetter is a type that can get a velero.BackupStore for a given BackupStorageLocation and ObjectStore.

func NewObjectBackupStoreGetter

func NewObjectBackupStoreGetter(credentialStore credentials.FileStore) ObjectBackupStoreGetter

NewObjectBackupStoreGetter returns a ObjectBackupStoreGetter that can get a velero.BackupStore.

type ObjectStoreGetter

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

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

type ObjectStoreLayout

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

ObjectStoreLayout defines how Velero'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