pub struct Relay { /* private fields */ }Expand description
A forwarding-only view of the same engine used by Router. It exposes no application publishing or local endpoint registration API.
Implementations§
Source§impl Relay
impl Relay
pub fn new(clock: Box<dyn Clock + Send + Sync>) -> Self
pub fn new_with_config( cfg: RelayConfig, clock: Box<dyn Clock + Send + Sync>, ) -> Self
pub fn sender(&self) -> Arc<str> ⓘ
pub fn set_sender<S: AsRef<str>>(&self, sender: S)
pub fn note_side_link_probe_sample( &self, side: RelaySideId, bytes: usize, duration_ms: u64, ) -> TelemetryResult<()>
pub fn add_side_packed<N, F>(&self, name: N, tx: F) -> RelaySideId
pub fn add_side_packed_small_packets<N, F>( &self, name: N, tx: F, max_frame_bytes: usize, ) -> RelaySideId
pub fn add_side_packed_with_options<N, F>( &self, name: N, tx: F, opts: RelaySideOptions, ) -> RelaySideId
pub fn add_side_packet<N, F>(&self, name: N, tx: F) -> RelaySideId
pub fn add_side_packet_with_options<N, F>( &self, name: N, tx: F, opts: RelaySideOptions, ) -> RelaySideId
pub fn remove_side(&self, side: RelaySideId) -> TelemetryResult<()>
pub fn set_side_ingress_enabled( &self, side: RelaySideId, enabled: bool, ) -> TelemetryResult<()>
pub fn set_side_egress_enabled( &self, side: RelaySideId, enabled: bool, ) -> TelemetryResult<()>
pub fn set_source_route_mode( &self, src: Option<RelaySideId>, mode: RouteSelectionMode, ) -> TelemetryResult<()>
pub fn clear_source_route_mode( &self, src: Option<RelaySideId>, ) -> TelemetryResult<()>
pub fn set_route_weight( &self, src: Option<RelaySideId>, dst: RelaySideId, weight: u32, ) -> TelemetryResult<()>
pub fn clear_route_weight( &self, src: Option<RelaySideId>, dst: RelaySideId, ) -> TelemetryResult<()>
pub fn set_route_priority( &self, src: Option<RelaySideId>, dst: RelaySideId, priority: u32, ) -> TelemetryResult<()>
pub fn clear_route_priority( &self, src: Option<RelaySideId>, dst: RelaySideId, ) -> TelemetryResult<()>
pub fn set_route( &self, src: Option<RelaySideId>, dst: RelaySideId, enabled: bool, ) -> TelemetryResult<()>
pub fn set_typed_route( &self, src: Option<RelaySideId>, ty: DataType, dst: RelaySideId, enabled: bool, ) -> TelemetryResult<()>
pub fn clear_typed_route( &self, src: Option<RelaySideId>, ty: DataType, dst: RelaySideId, ) -> TelemetryResult<()>
pub fn clear_route( &self, src: Option<RelaySideId>, dst: RelaySideId, ) -> TelemetryResult<()>
pub fn announce_discovery(&self) -> TelemetryResult<()>
pub fn announce_leave(&self) -> TelemetryResult<()>
pub fn poll_discovery(&self) -> TelemetryResult<bool>
pub fn export_topology(&self) -> TopologySnapshot
pub fn client_stats(&self, sender_id: &str) -> Option<ClientStatsSnapshot>
pub fn export_runtime_stats(&self) -> RuntimeStatsSnapshot
pub fn export_memory_layout_json(&self) -> String
pub fn rx_packed_from_side( &self, src: RelaySideId, bytes: &[u8], ) -> TelemetryResult<()>
pub fn rx_from_side( &self, src: RelaySideId, packet: Packet, ) -> TelemetryResult<()>
pub fn clear_queues(&self)
pub fn clear_rx_queue(&self)
pub fn clear_tx_queue(&self)
pub fn process_rx_queue(&self) -> TelemetryResult<()>
pub fn process_tx_queue(&self) -> TelemetryResult<()>
pub fn process_all_queues(&self) -> TelemetryResult<()>
pub fn process_tx_queue_with_timeout( &self, timeout_ms: u32, ) -> TelemetryResult<()>
pub fn process_rx_queue_with_timeout( &self, timeout_ms: u32, ) -> TelemetryResult<()>
pub fn process_all_queues_with_timeout( &self, timeout_ms: u32, ) -> TelemetryResult<()>
pub fn drain_queues_with_timeout(&self, timeout_ms: u32) -> TelemetryResult<()>
pub fn periodic(&self, timeout_ms: u32) -> TelemetryResult<()>
Auto Trait Implementations§
impl !Freeze for Relay
impl !RefUnwindSafe for Relay
impl !UnwindSafe for Relay
impl Send for Relay
impl Sync for Relay
impl Unpin for Relay
impl UnsafeUnpin for Relay
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