Struct SopDriverRegistry
pub struct SopDriverRegistry { /* private fields */ }Expand description
Spawn a background task that drives a resumed SOP action to its next
blocking or terminal state. Gate-clearing surfaces without an ambient agent
turn (HTTP decide, WS approvals, manual dashboard runs) land here:
ExecuteStep runs through a fresh agent loop under the step’s resolved
agent, DeterministicStep routes through the engine’s headless
deterministic driver, and every other action is already parked or terminal.
Returns the driver’s task handle. A caller whose config and engine belong
to a bounded lifetime (the daemon’s SOP maintenance tick, which is rebuilt on
reload) must keep it and drain or cancel the driver when that lifetime ends;
otherwise the driver keeps running against superseded configuration. Callers
with no such boundary drop it to detach.
A daemon generation’s set of headless driver handles, plus whether that
generation has finalized it.
Registration and finalization race by construction: an approval can resolve on a connection task whose listener has already stopped accepting, so a driver can be produced after the drain has taken the set. A bare vector accepts that handle into a collection nobody drains again, and the driver runs on under superseded config and permissions — the exact escape the generation boundary exists to prevent. Closing the set makes the late registration fail instead.
Implementations§
Source§impl SopDriverRegistry
impl SopDriverRegistry
Sourcepub fn close_and_take(&mut self) -> Vec<JoinHandle<()>>
pub fn close_and_take(&mut self) -> Vec<JoinHandle<()>>
Take every tracked handle and close the set. Taking and closing are one operation deliberately: a caller that took the handles without closing would leave later registrations landing in a set it no longer drains.
Sourcepub fn close_and_take_owned(&mut self) -> Vec<RegisteredSopDriver>
pub fn close_and_take_owned(&mut self) -> Vec<RegisteredSopDriver>
Self::close_and_take, keeping each driver’s run. The teardown that
may have to abort a driver uses this, so it can settle the run the
aborted driver will never advance.
Trait Implementations§
Source§impl Debug for SopDriverRegistry
impl Debug for SopDriverRegistry
Source§impl Default for SopDriverRegistry
impl Default for SopDriverRegistry
Source§fn default() -> SopDriverRegistry
fn default() -> SopDriverRegistry
Auto Trait Implementations§
impl Freeze for SopDriverRegistry
impl RefUnwindSafe for SopDriverRegistry
impl Send for SopDriverRegistry
impl Sync for SopDriverRegistry
impl Unpin for SopDriverRegistry
impl UnsafeUnpin for SopDriverRegistry
impl UnwindSafe for SopDriverRegistry
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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