pub struct Command {
pub command_id: String,
pub execution_id: i64,
pub step: String,
pub tool_kind: String,
pub input: Value,
pub render_context: HashMap<String, Value>,
pub attempts: u32,
}Expand description
One command the worker will dispatch to a tool.
The shape mirrors the Python-side noetl.command row + envelope
- render-context map. Keep field naming aligned with the wire format so JSON serde round-trips both directions.
Fields§
§command_id: StringStable identifier for this command. Worker uses the
snowflake id from noetl.command; future sources (HTTP poll,
local-mode mock) may use UUIDs.
execution_id: i64Execution this command belongs to. i64 mirrors the
Python noetl.command.execution_id bigint column and the
BridgeContext.execution_id field in the cli’s tools_bridge.
step: StringStep name from the playbook (e.g. "fetch_calendar").
tool_kind: StringTool kind that dispatch will route to (e.g. "http",
"postgres", "rhai"). Matches noetl-tools’ registry kind.
input: ValueTool-specific input payload (the ToolConfig.config JSON
passed to noetl_tools::registry::Tool::execute).
render_context: HashMap<String, Value>Variables already rendered against the merged step context
(workload + vars + step results). Tools read this through
noetl_tools::context::ExecutionContext.variables.
R-1.2 PR-2d-1: added so the worker’s
Command.render_context() method maps cleanly onto this
field.
attempts: u32Number of times this command has been attempted (incremented by the control plane on each redelivery). Used by the dispatcher for backoff and giving-up decisions.
R-1.2 PR-2d-1: added so retry policy decisions can flow through the trait.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more