Documentation ¶
Index ¶
Constants ¶
View Source
const ( KBOpsActionNameLabelKey = "opsrequest.kubeblocks.io/action-name" KBEnvOpsName = "KB_OPS_NAME" KbEnvOpsNamespace = "KB_OPS_NAMESPACE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionContext ¶
type ActionContext struct { ReqCtx intctrlutil.RequestCtx Client client.Client Action *appsv1alpha1.OpsAction }
type ActionStatus ¶
type ActionStatus struct { IsCompleted bool ExistFailure bool // return the action tasks(required). ActionTasks []appsv1alpha1.ActionTask }
func NewActiontatus ¶
func NewActiontatus() *ActionStatus
type ExecAction ¶
type ExecAction struct { OpsRequest *appsv1alpha1.OpsRequest Cluster *appsv1alpha1.Cluster OpsDef *appsv1alpha1.OpsDefinition CustomCompOps *appsv1alpha1.CustomOpsComponent Comp *appsv1alpha1.ClusterComponentSpec // contains filtered or unexported fields }
func NewExecAction ¶
func NewExecAction(opsRequest *appsv1alpha1.OpsRequest, cluster *appsv1alpha1.Cluster, opsDef *appsv1alpha1.OpsDefinition, customCompOps *appsv1alpha1.CustomOpsComponent, comp *appsv1alpha1.ClusterComponentSpec, progressDetail appsv1alpha1.ProgressStatusDetail) *ExecAction
func (*ExecAction) CheckStatus ¶
func (e *ExecAction) CheckStatus(actionCtx ActionContext) (*ActionStatus, error)
func (*ExecAction) Execute ¶
func (e *ExecAction) Execute(actionCtx ActionContext) (*ActionStatus, error)
type OpsAction ¶
type OpsAction interface { // Execute executes the action. Execute(actionCtx ActionContext) (*ActionStatus, error) // CheckStatus checks the action status. CheckStatus(actionCtx ActionContext) (*ActionStatus, error) }
type WorkloadAction ¶
type WorkloadAction struct { OpsRequest *appsv1alpha1.OpsRequest Cluster *appsv1alpha1.Cluster OpsDef *appsv1alpha1.OpsDefinition CustomCompOps *appsv1alpha1.CustomOpsComponent Comp *appsv1alpha1.ClusterComponentSpec // contains filtered or unexported fields }
func NewWorkloadAction ¶
func NewWorkloadAction(opsRequest *appsv1alpha1.OpsRequest, cluster *appsv1alpha1.Cluster, opsDef *appsv1alpha1.OpsDefinition, customCompOps *appsv1alpha1.CustomOpsComponent, comp *appsv1alpha1.ClusterComponentSpec, progressDetail appsv1alpha1.ProgressStatusDetail) *WorkloadAction
func (*WorkloadAction) CheckStatus ¶
func (w *WorkloadAction) CheckStatus(actionCtx ActionContext) (*ActionStatus, error)
func (*WorkloadAction) Execute ¶
func (w *WorkloadAction) Execute(actionCtx ActionContext) (*ActionStatus, error)
Click to show internal directories.
Click to hide internal directories.