pub enum HookEvent<'a> {
BeforeStep {
step_name: &'a str,
metadata: &'a OperationMetadata,
params: &'a Parameters,
iter_context: Option<&'a IterContext<'a>>,
},
AfterStep {
step_name: &'a str,
metadata: &'a OperationMetadata,
params: &'a Parameters,
operation_outputs: &'a Store<StoreEntry>,
global_outputs: &'a Store<StoreEntry>,
iter_context: Option<&'a IterContext<'a>>,
},
BeforeIteration {
iter_context: &'a IterContext<'a>,
},
AfterIteration {
iter_context: &'a IterContext<'a>,
},
BeforeReturns {
return_name: &'a str,
params: &'a Parameters,
},
AfterReturns {
return_name: &'a str,
params: &'a Parameters,
outputs: &'a Store<StoreEntry>,
},
GuardPassed {
guard_name: &'a str,
},
GuardFailed {
guard_name: &'a str,
},
Complete,
Error {
error: &'a OperationError,
},
}Expand description
A structured event fired during pipeline execution.
HookEvent is the input to every Hook callback. The variants
mirror the runtime’s timeline: Before* events fire immediately
before the associated action, After* events fire immediately
after, and Complete / Error
bracket the end of the run. The borrowed references let hooks
inspect step metadata, parameters, and outputs without cloning.
Variants§
BeforeStep
Fires immediately before a step’s operation runs. Parameters have been resolved but no outputs have been staged yet.
Fields
metadata: &'a OperationMetadataThe operation’s static metadata.
params: &'a ParametersThe unresolved parameters as declared at draft time.
iter_context: Option<&'a IterContext<'a>>Present when the step is nested inside an iteration.
AfterStep
Fires immediately after a step’s operation runs. Operation outputs and global outputs are staged but not yet merged into the runtime store.
Fields
metadata: &'a OperationMetadataThe operation’s static metadata.
params: &'a ParametersThe unresolved parameters.
operation_outputs: &'a Store<StoreEntry>Outputs scoped to the operation only (not merged into the runtime store).
global_outputs: &'a Store<StoreEntry>Outputs about to be merged into the runtime store.
iter_context: Option<&'a IterContext<'a>>Present when the step is nested inside an iteration.
BeforeIteration
Fires before each iteration body executes.
Fields
iter_context: &'a IterContext<'a>The current iteration’s context.
AfterIteration
Fires after each iteration body finishes.
Fields
iter_context: &'a IterContext<'a>The current iteration’s context.
BeforeReturns
Fires before a return block resolves its parameters.
Fields
params: &'a ParametersThe unresolved parameters.
AfterReturns
Fires after a return block resolves its parameters.
Fields
params: &'a ParametersThe unresolved parameters.
outputs: &'a Store<StoreEntry>The returns store with the resolved values.
GuardPassed
Fires when a guard’s boolean source evaluates to true. The guard body is about to execute.
GuardFailed
Fires when a guard’s boolean source evaluates to false. The guard body is skipped.
Complete
Fires once at the end of a successful run, after all return blocks have resolved.
Error
Fires once when the worker thread produces an error. The pipeline is about to fail.
Fields
error: &'a OperationErrorThe error the worker is propagating.