Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConcurrentLimitExceed error = errors.New("Concurrent number exceeds")
var FSBRCreator = newFileSystemBR
Functions ¶
This section is empty.
Types ¶
type AccessPoint ¶
type AccessPoint struct { ByPath string VolMode uploader.PersistentVolumeMode }
AccessPoint represents an access point that has been exposed to a data path instance
type AsyncBR ¶
type AsyncBR interface { // Init initializes an asynchronous data path instance Init(ctx context.Context, bslName string, sourceNamespace string, uploaderType string, repositoryType string, repoIdentifier string, repositoryEnsurer *repository.Ensurer, credentialGetter *credentials.CredentialGetter) error // StartBackup starts an asynchronous data path instance for backup StartBackup(source AccessPoint, realSource string, parentSnapshot string, forceFull bool, tags map[string]string) error // StartRestore starts an asynchronous data path instance for restore StartRestore(snapshotID string, target AccessPoint) error // Cancel cancels an asynchronous data path instance Cancel() // Close closes an asynchronous data path instance Close(ctx context.Context) }
AsyncBR is the interface for asynchronous data path methods
type BackupResult ¶
type BackupResult struct { SnapshotID string EmptySnapshot bool Source AccessPoint }
BackupResult represents the result of a backup
type Callbacks ¶
type Callbacks struct { OnCompleted func(context.Context, string, string, Result) OnFailed func(context.Context, string, string, error) OnCancelled func(context.Context, string, string) OnProgress func(context.Context, string, string, *uploader.Progress) }
Callbacks defines the collection of callbacks during backup/restore
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
NewManager creates the data path manager to manage concurrent data path instances
func (*Manager) CreateFileSystemBR ¶
func (m *Manager) CreateFileSystemBR(jobName string, requestorType string, ctx context.Context, client client.Client, namespace string, callbacks Callbacks, log logrus.FieldLogger) (AsyncBR, error)
CreateFileSystemBR creates a new file system backup/restore data path instance
func (*Manager) GetAsyncBR ¶
GetAsyncBR returns the file system backup/restore data path instance for the specified job name
func (*Manager) RemoveAsyncBR ¶
RemoveAsyncBR removes a file system backup/restore data path instance
type RestoreResult ¶
type RestoreResult struct {
Target AccessPoint
}
RestoreResult represents the result of a restore
type Result ¶
type Result struct { Backup BackupResult Restore RestoreResult }
Result represents the result of a backup/restore