v2

package
v1.12.0-rc.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdaptedRestoreItemAction

type AdaptedRestoreItemAction struct {
	Kind common.PluginKind

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

AdaptedRestoreItemAction is a v1 RestoreItemAction adapted to implement the v2 API

func AdaptedRestoreItemActions

func AdaptedRestoreItemActions() []AdaptedRestoreItemAction

type AdaptedV1RestartableRestoreItemAction

type AdaptedV1RestartableRestoreItemAction struct {
	V1Restartable *riav1cli.RestartableRestoreItemAction
}

func NewAdaptedV1RestartableRestoreItemAction

func NewAdaptedV1RestartableRestoreItemAction(v1Restartable *riav1cli.RestartableRestoreItemAction) *AdaptedV1RestartableRestoreItemAction

NewAdaptedV1RestartableRestoreItemAction returns a new v1 RestartableRestoreItemAction adapted to v2

func (*AdaptedV1RestartableRestoreItemAction) AppliesTo

AppliesTo delegates to the v1 AppliesTo call.

func (*AdaptedV1RestartableRestoreItemAction) AreAdditionalItemsReady

func (r *AdaptedV1RestartableRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *api.Restore) (bool, error)

AreAdditionalItemsReady just returns true since v1 plugins don't wait for items.

func (*AdaptedV1RestartableRestoreItemAction) Cancel

func (r *AdaptedV1RestartableRestoreItemAction) Cancel(operationID string, restore *api.Restore) error

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

func (*AdaptedV1RestartableRestoreItemAction) Execute

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

func (*AdaptedV1RestartableRestoreItemAction) Name

Name restarts the plugin's name.

func (*AdaptedV1RestartableRestoreItemAction) 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 RestartableRestoreItemAction

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

RestartableRestoreItemAction is a restore 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 RestartableRestoreItemAction 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 NewRestartableRestoreItemAction

func NewRestartableRestoreItemAction(name string, sharedPluginProcess process.RestartableProcess) *RestartableRestoreItemAction

NewRestartableRestoreItemAction returns a new RestartableRestoreItemAction.

func (RestartableRestoreItemAction) AppliesTo

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

func (*RestartableRestoreItemAction) AreAdditionalItemsReady

func (r *RestartableRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *api.Restore) (bool, error)

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

func (*RestartableRestoreItemAction) Cancel

func (r *RestartableRestoreItemAction) Cancel(operationID string, restore *api.Restore) error

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

func (*RestartableRestoreItemAction) Execute

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

func (*RestartableRestoreItemAction) Name

Name returns the plugin's name.

func (*RestartableRestoreItemAction) Progress

func (r *RestartableRestoreItemAction) Progress(operationID string, restore *api.Restore) (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