pub struct RuntimeSessionResumer { /* private fields */ }Expand description
Resumes paused flow sessions by driving the runtime ingress entry.
Implementations§
Source§impl RuntimeSessionResumer
impl RuntimeSessionResumer
Sourcepub fn new(runtime: Arc<StateMachineRuntime>) -> RuntimeSessionResumer
pub fn new(runtime: Arc<StateMachineRuntime>) -> RuntimeSessionResumer
Build a resumer over the live runtime ingress handle.
runtime is the same StateMachineRuntime that serves inbound
ingress; resuming routes through its handle so the existing
FlowResumeStore::fetch + FlowEngine::resume path runs unchanged.
Sourcepub fn with_watchdog_notifier(
self,
notifier: Arc<dyn Fn(&str) + Sync + Send>,
) -> RuntimeSessionResumer
pub fn with_watchdog_notifier( self, notifier: Arc<dyn Fn(&str) + Sync + Send>, ) -> RuntimeSessionResumer
Announce every admitted response to other replicas (so they retire their watchdog for it) at admission, before the resumed flow runs.
Sourcepub fn strict(runtime: Arc<StateMachineRuntime>) -> RuntimeSessionResumer
pub fn strict(runtime: Arc<StateMachineRuntime>) -> RuntimeSessionResumer
A resumer for the HTTP approval inbox: a nonced response resumes only
the approval parked under exactly that id, and NEVER falls through to a
fresh run when nothing is parked (see [AdmissionMode::Strict]).
Trait Implementations§
Source§impl SessionResumer for RuntimeSessionResumer
impl SessionResumer for RuntimeSessionResumer
fn resume<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: TenantCtx,
correlation_id: &'life1 str,
output: Value,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RuntimeSessionResumer: 'async_trait,
Source§fn resume_checked<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: TenantCtx,
correlation_id: &'life1 str,
output: Value,
) -> Pin<Box<dyn Future<Output = Result<ResumeOutcome, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RuntimeSessionResumer: 'async_trait,
fn resume_checked<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: TenantCtx,
correlation_id: &'life1 str,
output: Value,
) -> Pin<Box<dyn Future<Output = Result<ResumeOutcome, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
RuntimeSessionResumer: 'async_trait,
Self::resume, reporting whether the response was ADMITTED (handed to
the runtime) or dropped by an admission check (wrong gate, bad token).
An implementation cancels the deadline watchdog itself, at the moment
of admission and BEFORE the resumed flow runs, so a forged or stale
response cannot retire the real watchdog and the resumed flow’s next
dispatch (same deterministic id) keeps its own. The default treats
every response as admitted.Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeSessionResumer
impl !UnwindSafe for RuntimeSessionResumer
impl Freeze for RuntimeSessionResumer
impl Send for RuntimeSessionResumer
impl Sync for RuntimeSessionResumer
impl Unpin for RuntimeSessionResumer
impl UnsafeUnpin for RuntimeSessionResumer
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request