Skip to main content

Module state

Module state 

Source
Expand description

Branch-scoped run state.

Port of the ctx.state surface used by nodes (append / set / get). The trait is async because production backs it with Redis; this crate ships an in-memory implementation good for tests, single-process runs, and as the reference semantics (sliding-window append, TTL expiry).

R6: nodes scope keys by "<branch_id>." prefix before calling these — the store itself is prefix-agnostic.

Structs§

MemoryState
In-memory State. Cheap to share behind an Arc.
NamespacedState
A namespaced view over a shared state backend. Use one namespace per workflow instance so identical branch/key names cannot collide.

Traits§

State
Branch-scoped durable key/value state with TTL.