implement_wfengine

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const EventsReasonFormat = "WF_%s"
View Source
const WorkFlowJobConfigMapTag = "flowJobsDomain"

Variables

This section is empty.

Functions

func CreateDefaultWfMetaLoader

func CreateDefaultWfMetaLoader(resourceType string) (wfengine.WfMetaLoader, error)

func CreateDefaultWorkflowHook

func CreateDefaultWorkflowHook(wfRuntime *wfengine.WfRuntime) (wfengine.WfHook, error)

func GetDefaultMementoStorageFactory

func GetDefaultMementoStorageFactory(
	resourceType string,
	enableEvent bool,
) wfengine.CreateMementoStorageFunc

Types

type DefaultHistoryRecorder

type DefaultHistoryRecorder struct {
	// contains filtered or unexported fields
}

func CreateDefaultHistoryRecorder

func CreateDefaultHistoryRecorder(resourceType string, logger logr.Logger, logDir string) *DefaultHistoryRecorder

func (*DefaultHistoryRecorder) WriteWorkflowStepLog

func (r *DefaultHistoryRecorder) WriteWorkflowStepLog(flow *wfengine.WfRuntime, step *wfengine.StepRuntime, stepType StepType)

type DefaultMementoStorage

type DefaultMementoStorage struct {
	// contains filtered or unexported fields
}

func (*DefaultMementoStorage) LoadMementoMap

func (s *DefaultMementoStorage) LoadMementoMap(careTakerName string) (map[string]string, error)

func (*DefaultMementoStorage) Save

func (s *DefaultMementoStorage) Save(mementoKey, mementoContent string) error

工作流运行过程中保存运行时信息

type DefaultRecover

type DefaultRecover struct {
}

func CreateDefaultRecover

func CreateDefaultRecover() *DefaultRecover

func (*DefaultRecover) CancelResourceRecover

func (*DefaultRecover) CancelResourceRecover(resource statemachine.StateResource, conf map[define.WFConfKey]string) error

func (*DefaultRecover) GetResourceRecoverInfo

func (*DefaultRecover) GetResourceRecoverInfo(resource statemachine.StateResource, conf map[define.WFConfKey]string) (recover bool, preStatus statemachine.State)

func (*DefaultRecover) SaveResourceInterruptInfo

func (*DefaultRecover) SaveResourceInterruptInfo(resource statemachine.StateResource, conf map[define.WFConfKey]string, reason, message, prevWf string) error

type DefaultWfMetaLoader

type DefaultWfMetaLoader struct {
	// contains filtered or unexported fields
}

func (*DefaultWfMetaLoader) GetAllFlowMeta

func (l *DefaultWfMetaLoader) GetAllFlowMeta(workFlowMetaDir string) (map[string]*wfengine.FlowMeta, map[string]*wfengine.StepGroupMeta, error)

type DefaultWorkflowHook

type DefaultWorkflowHook struct {
	// contains filtered or unexported fields
}

func (DefaultWorkflowHook) OnStepCompleted

func (wfh DefaultWorkflowHook) OnStepCompleted(step *wfengine.StepRuntime) error

流程步骤执行后运行

func (DefaultWorkflowHook) OnStepInit

func (wfh DefaultWorkflowHook) OnStepInit(step *wfengine.StepRuntime) error

流程步骤执行前运行

func (DefaultWorkflowHook) OnStepWaiting

func (wfh DefaultWorkflowHook) OnStepWaiting(step *wfengine.StepRuntime) error

流程步骤执行前运行

func (DefaultWorkflowHook) OnWfCompleted

func (wfh DefaultWorkflowHook) OnWfCompleted() error

流程结束时执行

func (DefaultWorkflowHook) OnWfInit

func (wfh DefaultWorkflowHook) OnWfInit() error

流程初始化钩子

func (DefaultWorkflowHook) OnWfInterrupt

func (wfh DefaultWorkflowHook) OnWfInterrupt(err *define.InterruptError) error

流程中断时执行

type StepType

type StepType string
const (
	WorkFlowStart     StepType = "WorkFlowStart"
	WorkFlowInterrupt StepType = "WorkFlowInterrupt"
	WorkFlowCompleted StepType = "WorkFlowCompleted"
	StepInited        StepType = "StepInited"
	StepWaiting       StepType = "StepWaiting"
	StepError         StepType = "StepError"
	StepCompleted     StepType = "StepCompleted"
)

type WorkflowStep

type WorkflowStep struct {
	ResourceName string            `json:"resource_name"`
	Namespace    string            `json:"namespace"`
	WorkflowID   string            `json:"workflow_id"`
	StepID       string            `json:"step_id"`
	FlowName     string            `json:"flow_name"`
	StepName     string            `json:"step_name"`
	Type         StepType          `json:"type"`
	StartTime    string            `json:"start_time"`
	EndTime      string            `json:"end_time"`
	Step         int               `json:"step"`
	StepCount    int               `json:"step_count"`
	Retry        int               `json:"retry"`
	Error        string            `json:"error"`
	ExtraCtx     map[string]string `json:"extra_ctx"`
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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