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 *opsv1alpha1.OpsAction }
type ActionStatus ¶
type ActionStatus struct { IsCompleted bool ExistFailure bool // return the action tasks(required). ActionTasks []opsv1alpha1.ActionTask }
func NewActiontatus ¶
func NewActiontatus() *ActionStatus
type ExecAction ¶
type ExecAction struct { OpsRequest *opsv1alpha1.OpsRequest Cluster *appsv1.Cluster OpsDef *opsv1alpha1.OpsDefinition CustomCompOps *opsv1alpha1.CustomOpsComponent Comp *appsv1.ClusterComponentSpec // contains filtered or unexported fields }
func NewExecAction ¶
func NewExecAction(opsRequest *opsv1alpha1.OpsRequest, cluster *appsv1.Cluster, opsDef *opsv1alpha1.OpsDefinition, customCompOps *opsv1alpha1.CustomOpsComponent, comp *appsv1.ClusterComponentSpec, progressDetail opsv1alpha1.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 *opsv1alpha1.OpsRequest Cluster *appsv1.Cluster OpsDef *opsv1alpha1.OpsDefinition CustomCompOps *opsv1alpha1.CustomOpsComponent Comp *appsv1.ClusterComponentSpec // contains filtered or unexported fields }
func NewWorkloadAction ¶
func NewWorkloadAction(opsRequest *opsv1alpha1.OpsRequest, cluster *appsv1.Cluster, opsDef *opsv1alpha1.OpsDefinition, customCompOps *opsv1alpha1.CustomOpsComponent, comp *appsv1.ClusterComponentSpec, progressDetail opsv1alpha1.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.