custom

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: AGPL-3.0 Imports: 20 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 *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 (*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 (*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