pub struct InProcessRelay { /* private fields */ }Available on crate feature
cluster only.Expand description
An in-process ClusterRelay for one node: mirrors a peer’s stream into
the local engine.
Implementations§
Source§impl InProcessRelay
impl InProcessRelay
Sourcepub fn new(
node: impl Into<NodeAddr>,
local: Arc<dyn PublishRegistry>,
directory: Arc<ClusterDirectory>,
) -> Self
pub fn new( node: impl Into<NodeAddr>, local: Arc<dyn PublishRegistry>, directory: Arc<ClusterDirectory>, ) -> Self
A relay for node, mirroring into local, discovering via directory.
Trait Implementations§
Source§impl ClusterRelay for InProcessRelay
impl ClusterRelay for InProcessRelay
Source§fn locate<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 StreamKey,
) -> Pin<Box<dyn Future<Output = Result<Option<NodeAddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn locate<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 StreamKey,
) -> Pin<Box<dyn Future<Output = Result<Option<NodeAddr>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find a node currently serving
key, if any (e.g. via the control plane).Source§fn pull<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 StreamKey,
origin: &'life2 NodeAddr,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pull<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 StreamKey,
origin: &'life2 NodeAddr,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Begin relaying
key from origin into the local engine, returning once
the local mirror is publishing.Auto Trait Implementations§
impl !RefUnwindSafe for InProcessRelay
impl !UnwindSafe for InProcessRelay
impl Freeze for InProcessRelay
impl Send for InProcessRelay
impl Sync for InProcessRelay
impl Unpin for InProcessRelay
impl UnsafeUnpin for InProcessRelay
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