Skip to main content

Crate chronon_executor

Crate chronon_executor 

Source
Expand description

Script registry lookup, context build, and async run lifecycle.

Resolves registered script handlers, builds execution context from stored actor JSON, and dispatches async runs with lifecycle events back to the runtime.

§Documentation map

§Concern → API

ConcernAPI
Invoke + capture logsexecute_scriptExecuteScriptOutcome
Async dispatchExecutor::spawn_run
Lifecycle to runtimeExecutorEvent (includes CapturedLogs)

§Notes

Executor::spawn_run uses run-level params_json, not job defaults. Missing scripts surface as ChrononError::ScriptNotFound. Concurrent spawn_run work is capped by a semaphore (CHRONON_EXECUTOR_CONCURRENCY, default 4); lifecycle events use a bounded channel (CHRONON_EVENT_CHANNEL_CAPACITY, default 1024).

Structs§

ExecuteScriptOutcome
Outcome of execute_script: handler result plus captured tracing text.
ExecuteScriptRequest
Inputs for a single script execution attempt.
Executor
Executor for running registered scripts against scheduled jobs.
ScriptDescriptor
Descriptor for a registered script.
ScriptDescriptorRef
Borrowed view of a registered script suitable for invocation.
ScriptRegistry
In-memory script registry with optional link-time inventory discovery.

Enums§

ExecutorEvent
Event sent from the executor to the runtime for run status updates.

Constants§

DEFAULT_EVENT_CHANNEL_CAPACITY
Default capacity for the executor → runtime lifecycle event channel.
DEFAULT_EXECUTOR_CONCURRENCY
Default max in-flight Executor::spawn_run tasks.

Functions§

event_channel_capacity_from_env
Reads CHRONON_EVENT_CHANNEL_CAPACITY (default DEFAULT_EVENT_CHANNEL_CAPACITY).
execute_script
Execute a script and capture tracing output for the run record.
executor_concurrency_from_env
Reads CHRONON_EXECUTOR_CONCURRENCY (default DEFAULT_EXECUTOR_CONCURRENCY).

Type Aliases§

InvokeFn
Type alias for the script invocation function.