executor

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DisableRecorder optimize workflow by disable recorder
	DisableRecorder = false
	// StepStatusCache cache the step status
	StepStatusCache sync.Map
)

Functions

func InitializeWorkflowInstance

func InitializeWorkflowInstance(instance *types.WorkflowInstance)

InitializeWorkflowInstance init workflow instance

Types

type Option added in v0.6.2

type Option interface {
	ApplyTo(*workflowExecutor)
}

Option is the option of executor

func WithStatusPatcher added in v0.6.2

func WithStatusPatcher(patcher types.StatusPatcher) Option

WithStatusPatcher set the status patcher

type WorkflowExecutor

type WorkflowExecutor interface {
	// ExecuteSteps executes the steps
	ExecuteRunners(ctx monitorContext.Context, taskRunners []types.TaskRunner) (state v1alpha1.WorkflowRunPhase, err error)

	// GetBackoffWaitTime returns the wait time for next retry.
	GetBackoffWaitTime() time.Duration

	GetSuspendBackoffWaitTime() time.Duration
}

WorkflowExecutor is used to execute the workflow steps

func New

func New(instance *types.WorkflowInstance, options ...Option) WorkflowExecutor

New returns a Workflow Executor implementation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳