Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache 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 ExecutionResult

type ExecutionResult struct {
	// New state of the workflow instance
	State core.WorkflowInstanceState

	// Events executed during the tastk execution
	Executed []*history.Event

	// Activities that were scheduled
	ActivityEvents []*history.Event

	// Timers that were scheduled
	TimerEvents []*history.Event

	// Events for other workflow instances
	WorkflowEvents []*history.WorkflowEvent
}

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,
	maxHistorySize int64,
) (WorkflowExecutor, error)

type WorkflowHistoryProvider

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