Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action interface { // Execute executes the action. Execute(ctx Context) (*dpv1alpha1.ActionStatus, error) // GetName returns the Name of the action. GetName() string // Type returns the type of the action. Type() dpv1alpha1.ActionType }
type CreateVolumeSnapshotAction ¶
type CreateVolumeSnapshotAction struct { // Name is the Name of the action. Name string // Owner is the owner of the volume snapshot. Owner client.Object // ObjectMeta is the metadata of the volume snapshot. ObjectMeta metav1.ObjectMeta // PersistentVolumeClaimWrappers is the list of persistent volume claims wrapper to snapshot. PersistentVolumeClaimWrappers []PersistentVolumeClaimWrapper }
CreateVolumeSnapshotAction is an action that creates the volume snapshot.
func (*CreateVolumeSnapshotAction) Execute ¶
func (c *CreateVolumeSnapshotAction) Execute(ctx Context) (*dpv1alpha1.ActionStatus, error)
func (*CreateVolumeSnapshotAction) GetName ¶
func (c *CreateVolumeSnapshotAction) GetName() string
func (*CreateVolumeSnapshotAction) Type ¶
func (c *CreateVolumeSnapshotAction) Type() dpv1alpha1.ActionType
type ExecAction ¶
type ExecAction struct { JobAction // PodName is the Name of the pod to execute the command on. PodName string // Namespace is the Namespace of the pod to execute the command on. Namespace string // Command is the command to execute. Command []string // Container is the container to execute the command on. Container string // ServiceAccountName is the service account to use to build the job object. ServiceAccountName string // Timeout is the timeout for the command. Timeout metav1.Duration }
ExecAction is an action that executes a command on a pod. This action will create a job to execute the command.
func (*ExecAction) Execute ¶
func (e *ExecAction) Execute(ctx Context) (*dpv1alpha1.ActionStatus, error)
type JobAction ¶
type JobAction struct { // Name is the Name of the action. Name string // Owner is the owner of the job. Owner client.Object // ObjectMeta is the metadata of the job. ObjectMeta metav1.ObjectMeta PodSpec *corev1.PodSpec // BackOffLimit is the number of retries before considering a JobAction as failed. BackOffLimit *int32 }
JobAction is an action that creates a batch job.
func (*JobAction) Execute ¶
func (j *JobAction) Execute(ctx Context) (*dpv1alpha1.ActionStatus, error)
func (*JobAction) Type ¶
func (j *JobAction) Type() dpv1alpha1.ActionType
type PersistentVolumeClaimWrapper ¶
type PersistentVolumeClaimWrapper struct { VolumeName string PersistentVolumeClaim corev1.PersistentVolumeClaim }
func NewPersistentVolumeClaimWrapper ¶
func NewPersistentVolumeClaimWrapper(pvc corev1.PersistentVolumeClaim, volumeName string) PersistentVolumeClaimWrapper
Click to show internal directories.
Click to hide internal directories.