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.
Click to show internal directories.
Click to hide internal directories.