HostRolloutState

Struct HostRolloutState 

Source
pub struct HostRolloutState {
Show 22 fields pub rollout_id: RolloutId, pub hostname: String, pub channel: String, pub state: HostState, pub target_closure: ClosureHash, pub current_closure_at_dispatch: Option<ClosureHash>, pub current_closure: Option<ClosureHash>, pub reverted_to: Option<ClosureHash>, pub dispatched_at: DateTime<Utc>, pub dispatch_acked_at: Option<DateTime<Utc>>, pub activation_started_at: Option<DateTime<Utc>>, pub activation_completed_at: Option<DateTime<Utc>>, pub activation_failed_at: Option<DateTime<Utc>>, pub probe_observed_first_at: Option<DateTime<Utc>>, pub probe_failure_first_at: Option<DateTime<Utc>>, pub soak_due_at: Option<DateTime<Utc>>, pub converged_at: Option<DateTime<Utc>>, pub failed_at: Option<DateTime<Utc>>, pub policy_applied: Option<OnHealthFailure>, pub reverted_at: Option<DateTime<Utc>>, pub probes: HashMap<ProbeName, ProbeRecord>, pub last_event_seq: u64,
}
Expand description

Per-(rollout, host) reducer state. Mirrors RFC-0005 §5 HostRolloutRecord; the persistence schema in Phase 4 serializes this struct.

Every transition timestamp is agent-supplied (received via the wire and stamped onto the corresponding field by the reducer). dispatched_at is the lone exception — it’s CP-issued, so CP wallclock is the source of truth there (RFC-0005 §5).

Fields§

§rollout_id: RolloutId§hostname: String§channel: String§state: HostState§target_closure: ClosureHash§current_closure_at_dispatch: Option<ClosureHash>§current_closure: Option<ClosureHash>§reverted_to: Option<ClosureHash>§dispatched_at: DateTime<Utc>§dispatch_acked_at: Option<DateTime<Utc>>§activation_started_at: Option<DateTime<Utc>>§activation_completed_at: Option<DateTime<Utc>>§activation_failed_at: Option<DateTime<Utc>>§probe_observed_first_at: Option<DateTime<Utc>>§probe_failure_first_at: Option<DateTime<Utc>>§soak_due_at: Option<DateTime<Utc>>§converged_at: Option<DateTime<Utc>>§failed_at: Option<DateTime<Utc>>§policy_applied: Option<OnHealthFailure>§reverted_at: Option<DateTime<Utc>>§probes: HashMap<ProbeName, ProbeRecord>§last_event_seq: u64

Monotonic per (hostname, rollout_id). Gaps signal lost events; out-of-order events are dropped with a warning at the runtime layer.

Implementations§

Source§

impl HostRolloutState

Source

pub fn new_pending( rollout_id: RolloutId, hostname: String, channel: String, target_closure: ClosureHash, dispatched_at: DateTime<Utc>, soak_due_at: DateTime<Utc>, ) -> Self

Construct the initial Pending state when CP queues a Dispatch (or the agent receives one via long-poll on /v1/agent/dispatch).

This is the only legitimate way to bring a (rollout_id, hostname) record into existence. Subsequent transitions go through [step].

Trait Implementations§

Source§

impl Clone for HostRolloutState

Source§

fn clone(&self) -> HostRolloutState

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HostRolloutState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.