Expand description
Node-local side-effect channel fired by the Raft apply wrapper.
The Raft state machine apply is pure/deterministic — every replica must
reach the same SecretsState on the same op sequence. Filesystem and
network effects that should happen on every node when a particular op
applies cannot live inside SecretsState::apply itself. Instead the
apply wrapper (the closure handed to the openraft RaftStateMachine)
inspects the op post-apply and fires the corresponding handle here;
the daemon owns watcher tasks that await each handle and execute the
local effect (idempotently).
New ops needing per-node effects should add a tokio::sync::Notify
field plus matching fire_… / wait_… methods rather than fanning
out into per-op types — the handle is a long-lived Arc shared with
the apply wrapper and the daemon’s watcher tasks.
Structs§
- Node
Side Effects - Node-local side-effect channel.