Skip to main content

MiddlewareStack

Struct MiddlewareStack 

Source
pub struct MiddlewareStack { /* private fields */ }

Implementations§

Source§

impl MiddlewareStack

Source

pub fn topic_slot(&mut self, topic: &str, depth: usize) -> Arc<TopicSlot>

Get-or-create the in-process TopicSlot for topic. depth is used only when the slot is first created.

Source

pub fn service_channel(&mut self, service: &str) -> Arc<ServiceChannel>

Get-or-create the in-process ServiceChannel for service.

Source

pub fn action_channel<G, F, R>( &mut self, action: &str, ) -> Arc<ActionChannel<G, F, R>>
where G: Send + Sync + 'static, F: Send + Sync + 'static, R: Send + Sync + 'static,

Get-or-create the in-process ActionChannel for action.

Both client and server must call this with the same G/F/R types; if the types don’t match the channel stored under action the method panics (same process, so a type mismatch is always a programming error).

Source

pub fn load_snapshot(&self) -> MiddlewareLoadSnapshot

Source

pub fn serialization(&self) -> &dyn SerializationManager

Source§

impl MiddlewareStack

Source

pub fn apply_runtime_config(&mut self, config: MiddlewareRuntimeConfig)

Source

pub fn register_topic(&mut self, topic: impl Into<String>)

Source

pub fn register_topic_with_ttl( &mut self, topic: impl Into<String>, ttl: Duration, )

Source

pub fn set_topic_qos(&mut self, topic: impl Into<String>, profile: QosProfile)

Source

pub fn set_topic_qos_if_absent( &mut self, topic: impl Into<String>, profile: QosProfile, )

Source

pub fn topic_qos(&self, topic: &str) -> Option<QosProfile>

Source

pub fn register_service(&mut self, service: impl Into<String>)

Source

pub fn register_service_with_ttl( &mut self, service: impl Into<String>, ttl: Duration, )

Source

pub fn register_mission(&mut self, mission: impl Into<String>)

Source

pub fn register_mission_with_ttl( &mut self, mission: impl Into<String>, ttl: Duration, )

Source

pub fn register_endpoint(&mut self, name: impl Into<String>, endpoint: Endpoint)

Source

pub fn register_endpoint_with_ttl( &mut self, name: impl Into<String>, endpoint: Endpoint, ttl: Duration, )

Source

pub fn unregister_endpoint(&mut self, name: &str) -> bool

Source

pub fn register_topic_subscriber_endpoint_with_ttl( &mut self, name: impl Into<String>, topic: impl Into<String>, endpoint: Endpoint, qos: QosProfile, ttl: Duration, )

Source

pub fn topic_subscriber_endpoints(&self, topic: &str) -> Vec<DiscoveryEndpoint>

Source

pub fn topic_subscriber_counts(&self, topic: &str) -> (usize, usize)

Source

pub fn topic_subscriber_count(&self, topic: &str) -> usize

Source

pub fn topic_local_reliable_subscriber_acks( &self, topic: &str, ) -> Vec<(String, Option<u64>)>

Source

pub fn topic_reliable_subscriber_acks( &self, topic: &str, ) -> Vec<(String, Option<u64>)>

Source

pub fn update_topic_subscriber_ack( &mut self, endpoint_name: &str, acked_seq: Option<u64>, ) -> bool

Source

pub fn find_endpoint(&self, name: &str) -> Option<DiscoveryEndpoint>

Source

pub fn endpoint_entries(&self) -> Vec<DiscoveryEndpoint>

Source

pub fn renew_topic_lease(&mut self, topic: &str, ttl: Duration) -> bool

Source

pub fn renew_service_lease(&mut self, service: &str, ttl: Duration) -> bool

Source

pub fn renew_mission_lease(&mut self, mission: &str, ttl: Duration) -> bool

Source

pub fn renew_endpoint_lease(&mut self, endpoint: &str, ttl: Duration) -> bool

Source

pub fn set_topic_health(&mut self, topic: &str, healthy: bool) -> bool

Source

pub fn set_service_health(&mut self, service: &str, healthy: bool) -> bool

Source

pub fn set_mission_health(&mut self, mission: &str, healthy: bool) -> bool

Source

pub fn set_endpoint_health(&mut self, endpoint: &str, healthy: bool) -> bool

Source

pub fn prune_discovery_inactive(&mut self) -> DiscoveryPruneReport

Source

pub fn snapshot(&self) -> DiscoverySnapshot

Source

pub fn topic_entries(&self) -> Vec<DiscoveryEntry>

Source

pub fn service_entries(&self) -> Vec<DiscoveryEntry>

Source

pub fn mission_entries(&self) -> Vec<DiscoveryEntry>

Source§

impl MiddlewareStack

Source

pub fn open_mission( &mut self, session_id: SessionId, open: MissionOpen, ) -> Result<MissionId, RtError>

Open a new Mission session and register it with the middleware.

Source

pub fn mission_disconnect( &mut self, session_id: SessionId, reason: impl Into<String>, )

Mark a mission session as disconnected and transition the transport session to the Reconnecting state.

Source

pub fn mission_reconnect_reconcile( &mut self, session_id: SessionId, mission_id: MissionId, peer_state: MissionPeerState, ) -> Result<MissionReconcileSummary, RtError>

After a successful reconnect, perform state reconcile with the peer.

This method:

  1. Marks the transport session as Connected again.
  2. Calls reconcile(peer_state) on the stored BasicMissionSession.
  3. Returns the MissionReconcileSummary so the caller can schedule replay.
Source

pub fn mission_complete_replay( &mut self, mission_id: MissionId, replayed: u32, ) -> Result<(), RtError>

Advance command replay on an active mission session.

Source

pub fn mission_next_update( &mut self, mission_id: MissionId, ) -> Option<MissionUpdate>

Drain the next update from an active mission session.

Source§

impl MiddlewareStack

Source

pub fn enforce_namespace_boundary( &self, requester_namespace: &str, resolved_name: &str, ) -> String

Source§

impl MiddlewareStack

Source

pub fn open_session( &mut self, domain: TransportDomain, target: impl Into<String>, ) -> SessionId

Source

pub fn resolve_route( &self, endpoints: &[Endpoint], hint: &RouteHint, ) -> Option<Endpoint>

Source

pub fn add_route_rule(&mut self, rule: RouteRule)

Source

pub fn resolve_domain_for( &self, target: &str, traffic_kind: RouteTrafficKind, ) -> TransportDomain

Source

pub fn set_namespace_isolation(&mut self, enabled: bool)

Source

pub fn namespace_isolation(&self) -> bool

Source

pub fn connect_via<A: TransportAdapter>( &mut self, adapter: &mut A, endpoints: &[Endpoint], hint: &RouteHint, target: impl Into<String>, ) -> Result<Box<dyn TransportSession>, RtError>

Source

pub fn close_session(&mut self, session_id: SessionId)

Source

pub fn mark_session_connected(&mut self, session_id: SessionId)

Source

pub fn session_record(&self, session_id: SessionId) -> Option<&SessionRecord>

Source

pub fn set_reconnect_backoff_policy(&mut self, policy: ReconnectBackoffPolicy)

Trait Implementations§

Source§

impl Default for MiddlewareStack

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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
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, 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.