custom

package
v0.9.2-beta.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

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 (*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 (*WorkloadAction) CheckStatus

func (w *WorkloadAction) CheckStatus(actionCtx ActionContext) (*ActionStatus, error)

func (*WorkloadAction) Execute

func (w *WorkloadAction) Execute(actionCtx ActionContext) (*ActionStatus, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL