pub struct VastarRuntimeWorld { /* private fields */ }Expand description
Main VIL runtime facade.
Implementations§
Source§impl VastarRuntimeWorld
impl VastarRuntimeWorld
Sourcepub fn new() -> VastarRuntimeWorld
pub fn new() -> VastarRuntimeWorld
Create runtime in LOCAL mode (in-memory, single process).
Create or attach to runtime in SHARED mode (cross-process).
Create or attach to runtime in SHARED mode with a specific HostId.
pub fn register_process( &self, spec: ProcessSpec, ) -> Result<ProcessHandle, RtError>
pub fn connect(&self, from: PortId, to: PortId)
Sourcepub fn reroute(&self, from: PortId, to_list: Vec<PortId>)
pub fn reroute(&self, from: PortId, to_list: Vec<PortId>)
REROUTE: Atomically change the targets for a port.
Sourcepub fn inject_descriptor(
&self,
target_port: PortId,
descriptor: Descriptor,
) -> Result<(), RtError>
pub fn inject_descriptor( &self, target_port: PortId, descriptor: Descriptor, ) -> Result<(), RtError>
MANUALLY INJECT a descriptor into a port queue. Used for simulation of network arrival.
Sourcepub fn simulate_pull_completion<T>(&self, sample_id: SampleId, value: T)
pub fn simulate_pull_completion<T>(&self, sample_id: SampleId, value: T)
Simulated RDMA Pull completion. Manually populates the local store for a remote sample ID.
pub fn loan_uninit<T>(&self, origin_port: PortId) -> Result<Loaned<T>, RtError>
Sourcepub fn publish_value<T>(
&self,
owner: ProcessId,
origin_port: PortId,
value: T,
) -> Result<Published<T>, RtError>
pub fn publish_value<T>( &self, owner: ProcessId, origin_port: PortId, value: T, ) -> Result<Published<T>, RtError>
publish_value: Ergonomic helper to avoid manual loan/write/publish boilerplate.
Sourcepub fn publish_control_done(
&self,
owner: ProcessId,
origin_port: PortId,
session_id: u64,
) -> Result<Published<GenericToken>, RtError>
pub fn publish_control_done( &self, owner: ProcessId, origin_port: PortId, session_id: u64, ) -> Result<Published<GenericToken>, RtError>
publish_control_done: Emissions of Control plane markers.
pub fn shm_registry(&self) -> Option<ShmRegistry>
Sourcepub fn exchange_heap(&self) -> Option<&ExchangeHeap>
pub fn exchange_heap(&self) -> Option<&ExchangeHeap>
Get access to the ExchangeHeap for direct SHM writes (ShmToken path).
Sourcepub fn data_region_id(&self) -> Option<RegionId>
pub fn data_region_id(&self) -> Option<RegionId>
Get the data region ID for SHM payload writes.
pub fn verbs_driver(&self) -> Option<Arc<dyn VerbsDriver>>
pub fn raw_counters(&self) -> &RuntimeCounters
pub fn publish<T>( &self, owner: ProcessId, origin_port: PortId, loan: Loaned<T>, ) -> Result<Published<T>, RtError>
pub fn publish_control( &self, origin_process: ProcessId, origin_port: PortId, signal: ControlSignal, ) -> Result<Published<ControlSignal>, RtError>
pub fn recv<T>(&self, target_port: PortId) -> Result<SampleGuard<T>, RtError>
pub fn release_sample(&self, sample_id: SampleId)
pub fn metrics_snapshot(&self) -> RuntimeMetrics
pub fn supervisor(&self) -> Supervisor
pub fn crash_process(&self, process_id: ProcessId) -> CleanupReport
pub fn obs(&self) -> &ObservabilityHub
Sourcepub fn registry_processes(&self) -> Vec<ProcessSnapshot>
pub fn registry_processes(&self) -> Vec<ProcessSnapshot>
Snapshot of all processes in the registry.
Sourcepub fn registry_ports(&self) -> Vec<PortSnapshot>
pub fn registry_ports(&self) -> Vec<PortSnapshot>
Snapshot of all ports in the registry.
Sourcepub fn registry_samples(&self) -> Vec<SampleSnapshot>
pub fn registry_samples(&self) -> Vec<SampleSnapshot>
Snapshot of all samples in the registry.
Sourcepub fn shm_stats(&self) -> Vec<RegionStats>
pub fn shm_stats(&self) -> Vec<RegionStats>
Shared memory region usage statistics.
Sourcepub fn compact_shm(&self) -> Result<usize, String>
pub fn compact_shm(&self) -> Result<usize, String>
Triggers compacting specifically for SHARED mode data regions.
Sourcepub fn counters_snapshot(&self) -> CounterSnapshot
pub fn counters_snapshot(&self) -> CounterSnapshot
Snapshot of all performance counters.
Sourcepub fn inc_publish(&self)
pub fn inc_publish(&self)
Increment manual counter “publish”.
Sourcepub fn inc_receive(&self)
pub fn inc_receive(&self)
Increment manual counter “receive”.
Sourcepub fn record_latency(&self, latency_ns: u64)
pub fn record_latency(&self, latency_ns: u64)
Record manual latency sample.
Sourcepub fn latency_snapshot(&self) -> LatencySnapshot
pub fn latency_snapshot(&self) -> LatencySnapshot
Snapshot of latency from the global tracker.
Sourcepub fn register_host(&self, host_id: HostId, addr: &str) -> bool
pub fn register_host(&self, host_id: HostId, addr: &str) -> bool
Register a remote host in the registry.
Sourcepub fn perform_health_check(&self, timeout_ns: u64)
pub fn perform_health_check(&self, timeout_ns: u64)
Run health check and detect failover.
Sourcepub fn sync_world_state(
&self,
processes: &[ProcessSnapshot],
ports: &[PortSnapshot],
hosts: &[(HostId, String)],
)
pub fn sync_world_state( &self, processes: &[ProcessSnapshot], ports: &[PortSnapshot], hosts: &[(HostId, String)], )
Synchronize registry state from a remote snapshot.
pub fn recv_control( &self, target_port: PortId, ) -> Result<ControlSignal, RtError>
Trait Implementations§
Source§impl Clone for VastarRuntimeWorld
impl Clone for VastarRuntimeWorld
Source§fn clone(&self) -> VastarRuntimeWorld
fn clone(&self) -> VastarRuntimeWorld
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more