workflow

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWorkflow

func NewWorkflow(workflowFn reflect.Value) *workflow

Types

type ExecutionResult added in v0.0.5

type ExecutionResult struct {
	State          core.WorkflowInstanceState
	Executed       []*history.Event
	ActivityEvents []*history.Event
	TimerEvents    []*history.Event
	WorkflowEvents []history.WorkflowEvent
}

type ExecutorCache added in v0.4.1

type ExecutorCache interface {
	Store(ctx context.Context, instance *core.WorkflowInstance, workflow WorkflowExecutor) error
	Evict(ctx context.Context, instance *core.WorkflowInstance) error
	Get(ctx context.Context, instance *core.WorkflowInstance) (WorkflowExecutor, bool, error)
	StartEviction(ctx context.Context)
}

type WorkflowExecutor

type WorkflowExecutor interface {
	ExecuteTask(ctx context.Context, t *backend.WorkflowTask) (*ExecutionResult, error)

	Close()
}

func NewExecutor

func NewExecutor(
	logger *slog.Logger,
	tracer trace.Tracer,
	registry *registry.Registry,
	cv converter.Converter,
	propagators []wf.ContextPropagator,
	historyProvider WorkflowHistoryProvider,
	instance *core.WorkflowInstance,
	metadata *metadata.WorkflowMetadata,
	clock clock.Clock,
) (WorkflowExecutor, error)

type WorkflowHistoryProvider added in v0.0.9

type WorkflowHistoryProvider interface {
	GetWorkflowInstanceHistory(ctx context.Context, instance *core.WorkflowInstance, lastSequenceID *int64) ([]*history.Event, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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