executor

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Start(ctx context.Context) error
	Stop(ctx context.Context) error
	Type() common.ExecutorType
	// Execute dispatches a task to the appropriate handler based on
	// req.Info.OperationType. The operation payload must be pre-serialized
	// into req.Info.OperationInfo before calling.
	Execute(ctx context.Context, req *task.ExecutionRequest) (*task.ExecutionResponse, error)
	CheckStatus(ctx context.Context, executionID string) (common.TaskStatus, error)
	TerminateTask(ctx context.Context, executionID string, reason string) error
}

Executor is the engine-agnostic interface for executing tasks. Implementations hide all engine-specific details (Temporal, local, mock) from the task manager.

func New

func New(
	ctx context.Context,
	executorConfig ExecutorConfig,
	updater task.TaskStatusUpdater,
) (Executor, error)

New validates the config and builds the Executor, wiring updater so the engine can report task status changes without importing store packages.

type ExecutorConfig

type ExecutorConfig interface {
	Validate() error
	// Build constructs the Executor. updater receives task status transitions
	// from the execution engine back to the store. It must not be nil.
	Build(ctx context.Context, updater task.TaskStatusUpdater) (Executor, error)
}

ExecutorConfig is implemented by engine-specific configuration structs. Build is called once at startup to construct the live Executor.

Directories

Path Synopsis
temporalworkflow

Jump to

Keyboard shortcuts

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