v2

package
v1.11.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptedBackupItemAction

type AdaptedBackupItemAction struct {
	Kind common.PluginKind

	// Get returns a restartable BackupItemAction for the given name and process, wrapping if necessary
	GetRestartable func(name string, restartableProcess process.RestartableProcess) biav2.BackupItemAction
}

AdaptedBackupItemAction is a v1 BackupItemAction adapted to implement the v2 API

func AdaptedBackupItemActions

func AdaptedBackupItemActions() []AdaptedBackupItemAction

type AdaptedV1RestartableBackupItemAction

type AdaptedV1RestartableBackupItemAction struct {
	V1Restartable *biav1cli.RestartableBackupItemAction
}

func NewAdaptedV1RestartableBackupItemAction

func NewAdaptedV1RestartableBackupItemAction(v1Restartable *biav1cli.RestartableBackupItemAction) *AdaptedV1RestartableBackupItemAction

NewAdaptedV1RestartableBackupItemAction returns a new v1 RestartableBackupItemAction adapted to v2

func (*AdaptedV1RestartableBackupItemAction) AppliesTo

AppliesTo delegates to the v1 AppliesTo call.

func (*AdaptedV1RestartableBackupItemAction) Cancel

func (r *AdaptedV1RestartableBackupItemAction) Cancel(operationID string, backup *api.Backup) error

Cancel just returns without error since v1 plugins don't implement it.

func (*AdaptedV1RestartableBackupItemAction) Execute

Execute delegates to the v1 Execute call, returning an empty operationID.

func (*AdaptedV1RestartableBackupItemAction) Name

Name restarts the plugin's name.

func (*AdaptedV1RestartableBackupItemAction) Progress

Progress returns with an error since v1 plugins will never return an operationID, which means that any operationID passed in here will be invalid.

type RestartableBackupItemAction

type RestartableBackupItemAction struct {
	Key                 process.KindAndName
	SharedPluginProcess process.RestartableProcess
}

restartableBackupItemAction is a backup item action for a given implementation (such as "pod"). It is associated with a restartableProcess, which may be shared and used to run multiple plugins. At the beginning of each method call, the restartableBackupItemAction asks its restartableProcess to restart itself if needed (e.g. if the process terminated for any reason), then it proceeds with the actual call.

func NewRestartableBackupItemAction

func NewRestartableBackupItemAction(name string, sharedPluginProcess process.RestartableProcess) *RestartableBackupItemAction

NewRestartableBackupItemAction returns a new RestartableBackupItemAction.

func (*RestartableBackupItemAction) AppliesTo

AppliesTo restarts the plugin's process if needed, then delegates the call.

func (*RestartableBackupItemAction) Cancel

func (r *RestartableBackupItemAction) Cancel(operationID string, backup *api.Backup) error

Cancel restarts the plugin's process if needed, then delegates the call.

func (*RestartableBackupItemAction) Execute

Execute restarts the plugin's process if needed, then delegates the call.

func (*RestartableBackupItemAction) Name

Name returns the plugin's name.

func (*RestartableBackupItemAction) Progress

func (r *RestartableBackupItemAction) Progress(operationID string, backup *api.Backup) (velero.OperationProgress, error)

Progress restarts the plugin's process if needed, then delegates the call.

Jump to

Keyboard shortcuts

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