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: u64Monotonic 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
impl HostRolloutState
Sourcepub fn new_pending(
rollout_id: RolloutId,
hostname: String,
channel: String,
target_closure: ClosureHash,
dispatched_at: DateTime<Utc>,
soak_due_at: DateTime<Utc>,
) -> Self
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
impl Clone for HostRolloutState
Source§fn clone(&self) -> HostRolloutState
fn clone(&self) -> HostRolloutState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more