Effect

Enum Effect 

Source
pub enum Effect {
    LocalFireSwitch {
        rollout_id: RolloutId,
        target: ClosureHash,
    },
    LocalFireRollbackTo {
        rollout_id: RolloutId,
        closure: ClosureHash,
    },
    LocalResetProbeCache {
        rollout_id: RolloutId,
    },
    LocalEmitEvent {
        rollout_id: RolloutId,
        payload: OutboundAgentEvent,
        durable: bool,
    },
    RemoteQueueDispatch {
        host: String,
        rollout_id: RolloutId,
        target_closure: ClosureHash,
        soak_due_at: DateTime<Utc>,
    },
    RemoteInsertQuarantine {
        channel: String,
        closure: ClosureHash,
    },
    RemoteOpenRolloutRecord {
        rollout_id: RolloutId,
        channel: String,
        host: String,
    },
    RemoteAppendEventLog {
        host: String,
        rollout_id: RolloutId,
        payload: OutboundAgentEvent,
    },
    RecordTransition {
        host: String,
        rollout_id: RolloutId,
        from: HostState,
        to: HostState,
        at: DateTime<Utc>,
    },
    EmitMetric {
        name: &'static str,
        labels: Vec<(&'static str, String)>,
        value: f64,
    },
    EmitLog {
        level: LogLevel,
        target: &'static str,
        message: &'static str,
        fields: Vec<(&'static str, String)>,
    },
}

Variants§

§

LocalFireSwitch

Fire switch-to-configuration on target. Agent applier delegates to the activation module which detaches via systemd-run per the agent-process-restart contract.

Fields

§rollout_id: RolloutId
§

LocalFireRollbackTo

Fire switch-to-configuration on closure (rollback target read from current_closure_at_dispatch). Agent decides this without a CP signal — manifest’s onHealthFailure is the single signed source of truth (RFC-0005 §4.1).

Fields

§rollout_id: RolloutId
§closure: ClosureHash
§

LocalResetProbeCache

Drop the in-memory probe cache for this (rollout, host) pair. Emitted on LocalActivationCompleted so stale Pass results from the prior closure cannot satisfy the new rollout’s gates.

Fields

§rollout_id: RolloutId
§

LocalEmitEvent

Emit an outbound event to CP via POST /v1/agent/events. durable requests on-disk queuing before the network call so a crash between the local state change and the POST is recoverable on restart (RFC-0005 §9.7 — open question; default policy decided in Phase 7).

rollout_id carries the rollout this event belongs to so the agent applier can persist the outbound queue entry against the correct (host, rollout, seq) triple without consulting a side channel. Closes Phase 7’s enrich_effect_with_rollout stopgap.

Fields

§rollout_id: RolloutId
§durable: bool
§

RemoteQueueDispatch

Queue a Dispatch for the agent’s next long-poll on /v1/agent/dispatch. Pull-only — CP never opens a connection (RFC-0005 §2.1).

Fields

§host: String
§rollout_id: RolloutId
§target_closure: ClosureHash
§soak_due_at: DateTime<Utc>
§

RemoteInsertQuarantine

Mark a closure as quarantined on a channel after a RollbackComplete arrives. Subsequent dispatches refuse this closure on this channel.

Fields

§channel: String
§closure: ClosureHash
§

RemoteOpenRolloutRecord

Persist a fresh host_rollout_records row when CP first dispatches to a host for a new rollout (Phase 4 schema).

Fields

§rollout_id: RolloutId
§channel: String
§host: String
§

RemoteAppendEventLog

Append an inbound agent event to the audit log (RFC-0005 §4.3 + the broader event-log pattern — every state mutation, gate decision, manifest poll lands here too).

Fields

§host: String
§rollout_id: RolloutId
§

RecordTransition

Record a state transition (from, to, at) for the event log + status API. Emitted on every legal HostState change.

Fields

§host: String
§rollout_id: RolloutId
§

EmitMetric

Fields

§name: &'static str
§labels: Vec<(&'static str, String)>
§value: f64
§

EmitLog

Fields

§level: LogLevel
§target: &'static str
§message: &'static str
§fields: Vec<(&'static str, String)>

Trait Implementations§

Source§

impl Clone for Effect

Source§

fn clone(&self) -> Effect

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 Effect

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Effect

Source§

fn eq(&self, other: &Effect) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Effect

Auto Trait Implementations§

§

impl Freeze for Effect

§

impl RefUnwindSafe for Effect

§

impl Send for Effect

§

impl Sync for Effect

§

impl Unpin for Effect

§

impl UnwindSafe for Effect

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.