Skip to main content

ConfigGate

Struct ConfigGate 

Source
pub struct ConfigGate { /* private fields */ }
Expand description

Memory-only plans cannot be replayed across a daemon restart. A successful generation commit changes the base revision and consumes its approval once.

Implementations§

Source§

impl ConfigGate

Source

pub fn begin_approval( &mut self, digest: &Digest, store: &mut ConfigStore, current: &GateSnapshot, facts: &ApprovalFacts, ) -> Result<ApprovalChallenge, GateError>

Select a required surface. Legacy log policy and operator-app shortcuts are deliberately absent: neither proves review of an immutable plan.

Source

pub fn finish_approval( &mut self, attempt: u64, reply: ApprovalReply, store: &mut ConfigStore, current: &GateSnapshot, facts: &ApprovalFacts, now_ms: u64, ) -> Result<u64, GateError>

Complete under the commit lock after a fresh snapshot and active-surface lookup. The transport must match a response frame, not an unsolicited request. A wrong answer consumes this attempt, never the pending plan.

Source

pub fn invalidate_phone(&mut self, connection: u64) -> Vec<u64>

The owner wakes each waiting client with surface-unavailable when the supervised callosum connection exits or is replaced by a swap. An old phone card must not remain pending until its response deadline.

Source§

impl ConfigGate

Source

pub fn new(incarnation: String) -> Self

Source

pub fn plan( &mut self, store: &mut ConfigStore, kind: PlanKind, candidate: GateSnapshot, observed: &GateSnapshot, review: impl FnOnce(&GateSnapshot, &GateSnapshot) -> Result<Changeset, GateError>, ) -> Result<ConfigPlanView, GateError>

review enforces the approved schema and every affected project’s bounds before asking admitted module reviewers. Refusals produce no plan.

Source

pub fn rollback( &mut self, store: &mut ConfigStore, generation: u64, observed: &GateSnapshot, current_programs: &GateSnapshot, review: impl FnOnce(&GateSnapshot, &GateSnapshot) -> Result<Changeset, GateError>, ) -> Result<ConfigPlanView, GateError>

Capture program identities for the reverse configuration’s launch specs at the restored paths at plan time. No executable bytes or historical identities are restored. The restored generation’s reviewed-program record is copied: its reviewers are known. If that generation has no record, the rollback has none either, so its modules owe re-review.

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.

Source§

impl<T> Instrument for T

Source§

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

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

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

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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