repository

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 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 ConfigManager added in v1.18.0

type ConfigManager interface {
	// DefaultMaintenanceFrequency returns the default maintenance frequency from the specific repo
	DefaultMaintenanceFrequency(string) (time.Duration, error)

	// ClientSideCacheLimit returns the max cache size required on client side
	ClientSideCacheLimit(string, map[string]string) (int64, error)
}

ConfigProvider defines the methods to get configurations of a backup repository

func NewConfigManager added in v1.18.0

func NewConfigManager(
	log logrus.FieldLogger,
) ConfigManager

NewConfigManager create a new repository config manager.

type Manager

type Manager interface {
	// InitRepo initializes a repo with the specified name and identifier.
	InitRepo(repo *velerov1api.BackupRepository) error

	// ConnectToRepo tries to connect to the specified repo, and returns an error if it fails.
	// This is intended to be used to ensure that the repo exists/can be authenticated to.
	ConnectToRepo(repo *velerov1api.BackupRepository) error

	// PrepareRepo tries to connect to the specific repo first, if it fails because of the
	// repo is not initialized, it turns to initialize the repo
	PrepareRepo(repo *velerov1api.BackupRepository) error

	// PruneRepo deletes unused data from a repo.
	PruneRepo(repo *velerov1api.BackupRepository) error

	// UnlockRepo removes stale locks from a repo.
	UnlockRepo(repo *velerov1api.BackupRepository) error

	// Forget removes a snapshot from the list of
	// available snapshots in a repo.
	Forget(context.Context, *velerov1api.BackupRepository, string) error

	// BatchForget removes a list of snapshots from the list of
	// available snapshots in a repo.
	BatchForget(context.Context, *velerov1api.BackupRepository, []string) []error

	// DefaultMaintenanceFrequency returns the default maintenance frequency from the specific repo
	DefaultMaintenanceFrequency(*velerov1api.BackupRepository) (time.Duration, error)

	// ClientSideCacheLimit returns the max cache size required on client side
	ClientSideCacheLimit(*velerov1api.BackupRepository) (int64, error)
}

Manager manages backup repositories.

func NewManager

func NewManager(
	namespace string,
	client client.Client,
	repoLocker *repository.RepoLocker,
	credentialFileStore credentials.FileStore,
	credentialSecretStore credentials.SecretStore,
	log logrus.FieldLogger,
) Manager

NewManager create a new repository manager.

Jump to

Keyboard shortcuts

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