Skip to main content

TransportManager

Struct TransportManager 

Source
pub struct TransportManager {
    decision_matrix: [[TransportPolicyEntry; 3]; 3],
    policy_overrides: SpinLock<BTreeMap<(u32, u32), TransportPolicyEntry>>,
    active: SpinLock<BTreeMap<TransportId, TransportCreateResult>>,
    cache: SpinLock<TransportCache>,
    pub stats: SpinLock<TransportStats>,
}
Expand description

Central transport manager : selects and creates IPC transports per silo pair.

Uses a static decision matrix (tier × tier) with optional dynamic overrides. A small FIFO cache avoids redundant creation for frequently used pairs.

Fields§

§decision_matrix: [[TransportPolicyEntry; 3]; 3]

Static decision matrix: [src_tier][dst_tier] -> policy.

§policy_overrides: SpinLock<BTreeMap<(u32, u32), TransportPolicyEntry>>

Dynamic overrides (set by silo admin).

§active: SpinLock<BTreeMap<TransportId, TransportCreateResult>>

Active transport registry.

§cache: SpinLock<TransportCache>

Simple FIFO transport cache (no_std, no allocation).

§stats: SpinLock<TransportStats>

Per-transport performance statistics.

Implementations§

Source§

impl TransportManager

Source

pub const fn new() -> Self

Create a new manager with the default decision matrix.

Source

pub fn establish( &self, src: SiloId, dst: SiloId, config: TransportConfig, ) -> Result<TransportCreateResult, IpcError>

Establish a transport between src and dst.

Selection order:

  1. Cache hit (fast path for repeated pairs).
  2. Dynamic override (admin-configured policy).
  3. Static decision matrix (safe default).
Source

fn create( &self, _pair: (u32, u32), level: TransportLevel, capacity: u32, ) -> Result<TransportCreateResult, IpcError>

Create a transport at the given level.

Source

pub fn get_endpoint(&self, id: TransportId) -> Option<TransportEndpoint>

Look up a transport endpoint by ID.

Source

pub fn close(&self, id: TransportId) -> Result<(), IpcError>

Remove a transport from the registry (called when all handles close).

Source

pub fn set_policy( &self, src: u32, dst: u32, level: TransportLevel, capacity: u32, )

Override the transport policy for a specific silo pair.

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.