plugin

package
v0.0.0-...-2594471 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pointer

func Pointer[T any](v T) *T

Types

type RestorePluginV2

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

RestorePluginV2 is a restore item action plugin for Velero.

func NewRestorePluginV2

func NewRestorePluginV2(log logrus.FieldLogger) *RestorePluginV2

NewRestorePluginV2 instantiates a v2 RestorePlugin.

func (*RestorePluginV2) AppliesTo

func (p *RestorePluginV2) AppliesTo() (velero.ResourceSelector, error)

AppliesTo returns information about which resources this action should be invoked for. The IncludedResources and ExcludedResources slices can include both resources and resources with group names. These work: "ingresses", "ingresses.extensions". A RestoreItemAction's Execute function will only be invoked on items that match the returned selector. A zero-valued ResourceSelector matches all resources.

func (*RestorePluginV2) AreAdditionalItemsReady

func (p *RestorePluginV2) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *v1.Restore) (bool, error)

func (*RestorePluginV2) Cancel

func (p *RestorePluginV2) Cancel(operationID string, restore *v1.Restore) error

func (*RestorePluginV2) Execute

Execute allows the RestorePlugin to perform arbitrary logic with the item being restored, in this case, suspending the CronJob being restored.

func (*RestorePluginV2) Name

func (p *RestorePluginV2) Name() string

Name is required to implement the interface, but the Velero pod does not delegate this method -- it's used to tell velero what name it was registered under. The plugin implementation must define it, but it will never actually be called.

func (*RestorePluginV2) Progress

Jump to

Keyboard shortcuts

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