Documentation ¶
Index ¶
- type AdaptedBackupItemAction
- type AdaptedV1RestartableBackupItemAction
- func (r *AdaptedV1RestartableBackupItemAction) AppliesTo() (velero.ResourceSelector, error)
- func (r *AdaptedV1RestartableBackupItemAction) Cancel(operationID string, backup *api.Backup) error
- func (r *AdaptedV1RestartableBackupItemAction) Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, ...)
- func (r *AdaptedV1RestartableBackupItemAction) Name() string
- func (r *AdaptedV1RestartableBackupItemAction) Progress(operationID string, backup *api.Backup) (velero.OperationProgress, error)
- type RestartableBackupItemAction
- func (r *RestartableBackupItemAction) AppliesTo() (velero.ResourceSelector, error)
- func (r *RestartableBackupItemAction) Cancel(operationID string, backup *api.Backup) error
- func (r *RestartableBackupItemAction) Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, ...)
- func (r *RestartableBackupItemAction) Name() string
- func (r *RestartableBackupItemAction) Progress(operationID string, backup *api.Backup) (velero.OperationProgress, error)
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 ¶
func (r *AdaptedV1RestartableBackupItemAction) AppliesTo() (velero.ResourceSelector, error)
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 ¶
func (r *AdaptedV1RestartableBackupItemAction) Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, []velero.ResourceIdentifier, error)
Execute delegates to the v1 Execute call, returning an empty operationID.
func (*AdaptedV1RestartableBackupItemAction) Name ¶
func (r *AdaptedV1RestartableBackupItemAction) Name() string
Name restarts the plugin's name.
func (*AdaptedV1RestartableBackupItemAction) Progress ¶
func (r *AdaptedV1RestartableBackupItemAction) Progress(operationID string, backup *api.Backup) (velero.OperationProgress, error)
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 }
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 ¶
func (r *RestartableBackupItemAction) AppliesTo() (velero.ResourceSelector, error)
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 ¶
func (r *RestartableBackupItemAction) Execute(item runtime.Unstructured, backup *api.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, []velero.ResourceIdentifier, error)
Execute restarts the plugin's process if needed, then delegates the call.
func (*RestartableBackupItemAction) Name ¶
func (r *RestartableBackupItemAction) Name() string
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.