Documentation
¶
Index ¶
Constants ¶
View Source
const (
// ContextKeyMetadata is key that refer to application metadata.
ContextKeyMetadata = "metadata__"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeneratorOptions ¶ added in v1.1.1
type GeneratorOptions struct {
ID string
PrePhase common.WorkflowStepPhase
StepConvertor func(step v1beta1.WorkflowStep) (v1beta1.WorkflowStep, error)
}
GeneratorOptions is the options for generate task.
type TaskDiscover ¶
type TaskDiscover interface {
GetTaskGenerator(ctx context.Context, name string) (TaskGenerator, error)
}
TaskDiscover is the interface to obtain the TaskGenerator。
type TaskGenerator ¶
type TaskGenerator func(wfStep v1beta1.WorkflowStep, options *GeneratorOptions) (TaskRunner, error)
TaskGenerator will generate taskRunner.
type TaskPostStopHook ¶ added in v1.1.1
type TaskPostStopHook func(ctx wfContext.Context, taskValue *value.Value, step v1beta1.WorkflowStep, phase common.WorkflowStepPhase) error
TaskPostStopHook run after task execution.
type TaskPreStartHook ¶ added in v1.1.1
type TaskPreStartHook func(ctx wfContext.Context, paramValue *value.Value, step v1beta1.WorkflowStep) error
TaskPreStartHook run before task execution.
type TaskRunOptions ¶ added in v1.1.1
type TaskRunOptions struct {
Data *value.Value
PreStartHooks []TaskPreStartHook
PostStopHooks []TaskPostStopHook
GetTracer func(id string, step v1beta1.WorkflowStep) monitorCtx.Context
RunSteps func(isDag bool, runners ...TaskRunner) (*common.WorkflowStatus, error)
}
TaskRunOptions is the options for task run.
type TaskRunner ¶
type TaskRunner interface {
Name() string
Pending(ctx wfContext.Context) bool
Run(ctx wfContext.Context, options *TaskRunOptions) (common.WorkflowStepStatus, *Operation, error)
}
TaskRunner is a task runner.
Click to show internal directories.
Click to hide internal directories.