Skip to main content

RuntimeOwner

Struct RuntimeOwner 

Source
pub struct RuntimeOwner { /* private fields */ }

Implementations§

Source§

impl RuntimeOwner

Source

pub fn with_route_policy_authority( self, authority: Arc<dyn RoutePolicyAuthority>, ) -> Self

Source§

impl RuntimeOwner

Source

pub fn new( incarnation: String, store: ConfigStore, capturer: ConfigCapturer, ) -> Self

Source

pub fn module_gate(&self, module: &str) -> Result<Arc<Mutex<()>>, GateError>

Source

pub fn take_activities(&self) -> Vec<StoreActivity>

Source

pub fn declare( &self, connection: ConnectionId, module: &str, declaration: ConfigDeclareRequest, active: bool, ) -> Result<(), GateError>

Declaration ownership comes from the registered transport connection. A candidate’s proposal is retained without replacing the incumbent’s.

Source

pub fn disconnected(&self, connection: ConnectionId)

Clear everything connection held in the configuration owner. The delivery coordinator wakes only when the connection held configuration state (a declaration, a delivery, an approval or its request, a desktop view, an anchor wait) or ran a config.review worker. Unrelated client disconnects do not wake it.

Source

pub fn module_get( &self, connection: ConnectionId, module: &str, request: ConfigGetRequest, ) -> Result<ConfigGetReply, GateError>

Source

pub fn prepare(&self, kind: PlanKind) -> Result<PreparedPlan, GateError>

Run from a blocking worker: capture and store publication may touch disk and the platform keychain. No transport wait takes place under this lock. Preflight may record the proposal observed on disk. Refusals for missing authoritative project membership, active-scope usage or approved-program launch selection happen before any plan, approval or generation is written. A proposal neither approves nor records the refused plan.

Source

pub fn finish_plan( &self, prepared: PreparedPlan, review: impl FnOnce(&GateSnapshot, &GateSnapshot) -> Result<Changeset, GateError>, ) -> Result<ConfigPlanView, GateError>

Source

pub fn begin_approval( &self, digest: &Digest, facts: &ApprovalFacts, ) -> Result<ApprovalChallenge, GateError>

Source

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

Source

pub fn status(&self) -> Result<ConfigStatus, GateError>

Source

pub fn history(&self) -> Result<(Vec<Generation>, Vec<Value>), GateError>

Source

pub fn approved_snapshot(&self) -> Result<DeliverySnapshot, GateError>

Admission is owned by the supervisor adapter; until it is installed it must not infer executable authority from diagnostic snapshots.

Source

pub fn approved_rollback_commands( &self, generation: u64, ) -> Result<ApprovedRollbackCommands, GateError>

Read the saved rollback, never today’s edited files. This is not spawn authorization: admission must select an eligible module generation and launch exactly the returned identity under that module’s gate lock. Re-check the file identity at spawn and refuse plan_stale if it changed since approval. Path-changing rollback plans remain refused until the supervisor uses these approved inputs to select and launch programs at the restored paths.

Trait Implementations§

Source§

impl DeliveryObserver for RuntimeOwner

Source§

fn health_probe( &self, connection: ConnectionId, module: &str, ) -> Result<Option<DeliveryProbe>, GateError>

Capture before dispatching the ordinary health RPC. A later result must use this witness, not look up whichever target is current on completion.

Source§

fn health_result( &self, probe: DeliveryProbe, healthy: bool, ) -> Result<Option<AppliedDisposition>, GateError>

Complete under the module gate. A new target, attempt or policy install invalidates an older witness rather than lending its health to new bytes.

Source§

fn spawned( &self, module: &str, spawned_at: Instant, register_timeout: Duration, first_health_budget: Duration, ) -> Result<Option<DeliverySpawn>, GateError>

Source§

fn registered( &self, connection: ConnectionId, spawn: &DeliverySpawn, ) -> Result<(), GateError>

Source§

fn promoted( &self, connection: ConnectionId, module: &str, cutover_at: Instant, ) -> Result<Option<(u64, u64)>, GateError>

Source§

fn retry_anchor(&self) -> Result<Option<Instant>, GateError>

Retry only the retained, non-interactive backend when its backoff is due. None means there is no pending anchor and no timer should be armed.

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