Documentation
¶
Index ¶
- type AdaptedRestoreItemAction
- type AdaptedV1RestartableRestoreItemAction
- func (r *AdaptedV1RestartableRestoreItemAction) AppliesTo() (velero.ResourceSelector, error)
- func (r *AdaptedV1RestartableRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *api.Restore) (bool, error)
- func (r *AdaptedV1RestartableRestoreItemAction) Cancel(operationID string, restore *api.Restore) error
- func (r *AdaptedV1RestartableRestoreItemAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
- func (r *AdaptedV1RestartableRestoreItemAction) Name() string
- func (r *AdaptedV1RestartableRestoreItemAction) Progress(operationID string, restore *api.Restore) (velero.OperationProgress, error)
- type RestartableRestoreItemAction
- func (r RestartableRestoreItemAction) AppliesTo() (velero.ResourceSelector, error)
- func (r *RestartableRestoreItemAction) AreAdditionalItemsReady(additionalItems []velero.ResourceIdentifier, restore *api.Restore) (bool, error)
- func (r *RestartableRestoreItemAction) Cancel(operationID string, restore *api.Restore) error
- func (r *RestartableRestoreItemAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
- func (r *RestartableRestoreItemAction) Name() string
- func (r *RestartableRestoreItemAction) Progress(operationID string, restore *api.Restore) (velero.OperationProgress, error)
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 ¶
func (r *AdaptedV1RestartableRestoreItemAction) AppliesTo() (velero.ResourceSelector, error)
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 ¶
func (r *AdaptedV1RestartableRestoreItemAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute delegates to the v1 Execute call, returning an empty operationID.
func (*AdaptedV1RestartableRestoreItemAction) Name ¶
func (r *AdaptedV1RestartableRestoreItemAction) Name() string
Name restarts the plugin's name.
func (*AdaptedV1RestartableRestoreItemAction) Progress ¶
func (r *AdaptedV1RestartableRestoreItemAction) Progress(operationID string, restore *api.Restore) (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 RestartableRestoreItemAction ¶
type RestartableRestoreItemAction struct { Key process.KindAndName }
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 ¶
func (r RestartableRestoreItemAction) AppliesTo() (velero.ResourceSelector, error)
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 ¶
func (r *RestartableRestoreItemAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute restarts the plugin's process if needed, then delegates the call.
func (*RestartableRestoreItemAction) Name ¶
func (r *RestartableRestoreItemAction) Name() string
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.