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
impl TransportManager
Sourcepub fn establish(
&self,
src: SiloId,
dst: SiloId,
config: TransportConfig,
) -> Result<TransportCreateResult, IpcError>
pub fn establish( &self, src: SiloId, dst: SiloId, config: TransportConfig, ) -> Result<TransportCreateResult, IpcError>
Establish a transport between src and dst.
Selection order:
- Cache hit (fast path for repeated pairs).
- Dynamic override (admin-configured policy).
- Static decision matrix (safe default).
Sourcefn create(
&self,
_pair: (u32, u32),
level: TransportLevel,
capacity: u32,
) -> Result<TransportCreateResult, IpcError>
fn create( &self, _pair: (u32, u32), level: TransportLevel, capacity: u32, ) -> Result<TransportCreateResult, IpcError>
Create a transport at the given level.
Sourcepub fn get_endpoint(&self, id: TransportId) -> Option<TransportEndpoint>
pub fn get_endpoint(&self, id: TransportId) -> Option<TransportEndpoint>
Look up a transport endpoint by ID.
Sourcepub fn close(&self, id: TransportId) -> Result<(), IpcError>
pub fn close(&self, id: TransportId) -> Result<(), IpcError>
Remove a transport from the registry (called when all handles close).
Sourcepub fn set_policy(
&self,
src: u32,
dst: u32,
level: TransportLevel,
capacity: u32,
)
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§
impl !Freeze for TransportManager
impl !RefUnwindSafe for TransportManager
impl Send for TransportManager
impl Sync for TransportManager
impl Unpin for TransportManager
impl UnsafeUnpin for TransportManager
impl UnwindSafe for TransportManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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