Skip to main content

ExecHost

Struct ExecHost 

Source
pub struct ExecHost<B: Backends> {
    pub b: B,
    pub canonical: Canonical,
    pub protect: Protect,
    pub ctx: Arc<Mutex<Context>>,
}

Fields§

§b: B§canonical: Canonical§protect: Protect§ctx: Arc<Mutex<Context>>

Baselines for the probe runs’ state assembly.

Implementations§

Source§

impl<B: Backends> ExecHost<B>

Source

pub fn new(b: B, canonical: Canonical) -> Self

Source

fn ctx(&self) -> Context

Source

fn settle(&self, settle: &Settle)

Source

fn observe(&self, manifest: &Manifest) -> (SystemState, UnitDefs)

Observe once with a fresh assembler over manifest (every probe due).

Source

fn violations( &self, txn: &Transaction, phase: CheckPhase, s: &SystemState, defs: &UnitDefs, ) -> Vec<String>

The requirements a check enforces; returns what failed.

Trait Implementations§

Source§

impl<B: Backends + Clone> Clone for ExecHost<B>

Source§

fn clone(&self) -> Self

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<B: Backends> Host for ExecHost<B>

Source§

type Gen = <B as Backends>::Gens

Source§

type Inv = <B as Backends>::Inv

Source§

fn floor_fixes( &self, txn: &Transaction, floor: Option<GenerationId>, ) -> Result<Vec<String>, Outcome>

§12e, I25: the security fixes txn’s candidate brings, absent from the floor generation and every generation between it and the candidate (every earlier one, with no floor). Part of the commit: an error here means the transaction does not commit yet.
Source§

fn generations(&self) -> &B::Gens

Source§

fn inventory(&self) -> &B::Inv

Source§

fn execute_runtime(&self, t: &Transition, op: &OpId) -> Outcome

Perform a ReobserveOnly transition’s backend effect (restart, stop, runtime option, GC). Override bookkeeping is the kernel’s job, not this.
Source§

fn reobserve(&self, txn: &Transaction) -> Outcome

Settle, then observe and compare against the expectation; the outcome is recorded, never acted on (§12 step 7, UnitOp).
Source§

fn check(&self, txn: &Transaction, phase: CheckPhase) -> Verdict

Run the applicable Readiness probes from the candidate’s UnitDefs and the installed core, plus the expectation and executor-owned requirements.
Source§

fn release_gc_root(&self, path: &str) -> bool

Remove a GC root (I3). Returns false if it could not be removed.
Source§

fn now(&self) -> Timestamp

Source§

fn boot_now(&self) -> Timestamp

The boot clock (CLOCK_BOOTTIME): leases, deadlines and waits (§12h).
Source§

fn sleep(&self, d: Millis)

Source§

fn kill_worker(&self, pid: u32) -> bool

SIGTERM then SIGKILL the process group via pidfd; true once confirmed dead.
Source§

fn pid_alive(&self, pid: u32) -> bool

Auto Trait Implementations§

§

impl<B> Freeze for ExecHost<B>
where B: Freeze,

§

impl<B> RefUnwindSafe for ExecHost<B>
where B: RefUnwindSafe,

§

impl<B> Send for ExecHost<B>
where B: Send,

§

impl<B> Sync for ExecHost<B>
where B: Sync,

§

impl<B> Unpin for ExecHost<B>
where B: Unpin,

§

impl<B> UnsafeUnpin for ExecHost<B>
where B: UnsafeUnpin,

§

impl<B> UnwindSafe for ExecHost<B>
where B: UnwindSafe,

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.