PoolRespawn

Struct PoolRespawn 

Source
pub struct PoolRespawn {
    promoted_label: String,
    refilled_label: Option<String>,
    phase: Phase,
}
Expand description

Pool-respawn saga: fires once per promote, waits for the matching refill, then completes.

Fields§

§promoted_label: String

Label of the window that was promoted (Step 1’s input). Held for log correlation only — the saga doesn’t validate the new pool label against this one. Kept on the struct so future failure-mode logging (timeout / explicit fail) can include “which promote did this saga belong to?” without rethreading. LSD-2 — also surfaces in --diag sagas via input_snapshot.

§refilled_label: Option<String>

New pool label observed in Event::PoolWindowAdded (Step 2’s output). None until refill is observed.

§phase: Phase

Implementations§

Source§

impl PoolRespawn

Source

pub fn new(promoted_label: String) -> Self

Construct a fresh saga for a promote of promoted_label. Coordinator allocates the saga_id and calls start once.

Trait Implementations§

Source§

impl Saga for PoolRespawn

Source§

fn input_snapshot(&self) -> Value

LSD-2 — record the promote’s source label for --diag sagas. refilled_label is None at start (only known after Step 2’s echo lands) so we don’t include it; the durable log captures the inputs the saga was constructed with, not its evolving state — that lives in step rows.

Source§

fn name(&self) -> &'static str

Source§

fn start(&mut self, _ctx: &SagaCtx) -> SagaAction

Source§

fn on_event(&mut self, event: &Event, ctx: &SagaCtx) -> SagaAction

Source§

fn timeout(&self) -> Duration

CPD-3 — per-saga deadline budget for completing all IssueCmd+wait cycles. Coordinator arms a timer when the saga registers; if the saga is still in_flight when timeout() elapses, it is force-failed (SagaFailed { reason: "saga timeout" }) and removed from the registry. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more