Documentation
¶
Index ¶
- Constants
- type Config
- type Manager
- func (m *Manager) CheckStatus(ctx context.Context, encodedExecutionID string) (taskcommon.TaskStatus, error)
- func (m *Manager) Execute(ctx context.Context, req *task.ExecutionRequest) (*task.ExecutionResponse, error)
- func (m *Manager) Start(ctx context.Context) error
- func (m *Manager) Stop(ctx context.Context) error
- func (m *Manager) TerminateTask(ctx context.Context, encodedExecutionID string, reason string) error
- func (m *Manager) Type() taskcommon.ExecutorType
Constants ¶
const (
WorkflowQueue = "rla-tasks"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ClientConf temporal.Config
WorkerOptions map[string]worker.Options
// ComponentManagerRegistry is the registry containing initialized component managers.
ComponentManagerRegistry *componentmanager.Registry
}
Config holds all configuration required to build a Temporal-backed executor. WorkerOptions maps Temporal task-queue names to per-queue worker settings; each key results in a dedicated worker started by Build.
func (*Config) Build ¶
func (c *Config) Build( ctx context.Context, updater task.TaskStatusUpdater, ) (executor.Executor, error)
Build creates the Temporal executor: it wires the status updater and component manager registry into the activity layer, then starts the Temporal clients and workers for each configured queue. On success the caller must eventually call Stop() to release the Temporal client connections — typically via defer, regardless of whether Start() succeeds.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the Temporal implementation of executor.Executor. It owns two Temporal clients (publisher for workflow submission and status queries, subscriber for worker registration) and one worker per configured task queue.
func (*Manager) CheckStatus ¶
func (m *Manager) CheckStatus( ctx context.Context, encodedExecutionID string, ) (taskcommon.TaskStatus, error)
CheckStatus decodes the execution ID and queries Temporal for the current workflow execution status, mapping it to a TaskStatus.
func (*Manager) Execute ¶ added in v1.4.0
func (m *Manager) Execute( ctx context.Context, req *task.ExecutionRequest, ) (*task.ExecutionResponse, error)
Execute dispatches the task to the Temporal workflow registered for its OperationType. All Temporal mechanics (client, options, workflow submission) are contained here — nothing engine-specific crosses the Executor boundary.
func (*Manager) Start ¶
Start begins polling for workflow and activity tasks on all configured queues.
func (*Manager) Stop ¶
Stop is the full teardown for a Manager created by Build: it stops all workers (safe to call even if Start was never called or failed partway) and closes the Temporal client connections.
func (*Manager) TerminateTask ¶
func (m *Manager) TerminateTask( ctx context.Context, encodedExecutionID string, reason string, ) error
TerminateTask terminates the Temporal workflow backing the given execution ID.
func (*Manager) Type ¶
func (m *Manager) Type() taskcommon.ExecutorType
Type returns ExecutorTypeTemporal, identifying this executor implementation.