pub struct MessageProcessor { /* private fields */ }Implementations§
Source§impl MessageProcessor
impl MessageProcessor
pub fn new_with_service_id(service_id: String) -> Self
pub fn new_with_options( service_id: String, recovery_ttl: Option<Duration>, ) -> Self
pub fn new() -> Self
Sourcepub async fn run_server(
&self,
config: &ServerConfig,
) -> Result<CancellationToken, DataPathError>
pub async fn run_server( &self, config: &ServerConfig, ) -> Result<CancellationToken, DataPathError>
Run a data plane gRPC server using this message processor’s drain watch. Returns a cancellation token that can be used to stop the server task.
pub async fn shutdown(&self) -> Result<(), DataPathError>
pub async fn connect( &self, client_config: ClientConfig, local: Option<SocketAddr>, remote: Option<SocketAddr>, ) -> Result<(JoinHandle<()>, u64), DataPathError>
pub fn disconnect(&self, conn: u64) -> Result<ClientConfig, DataPathError>
pub fn register_local_connection( &self, from_control_plane: bool, ) -> Result<(u64, Sender<Result<Message, Status>>, Receiver<Result<Message, Status>>), DataPathError>
pub async fn send_msg( &self, msg: Message, out_conn: u64, ) -> Result<(), DataPathError>
pub async fn process_message( &self, msg: Message, in_connection: u64, is_local: bool, ) -> Result<(), DataPathError>
pub fn subscription_table(&self) -> &SubscriptionTableImpl
pub fn connection_table(&self) -> &ConnectionTable<Connection>
Trait Implementations§
Source§impl Clone for MessageProcessor
impl Clone for MessageProcessor
Source§fn clone(&self) -> MessageProcessor
fn clone(&self) -> MessageProcessor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageProcessor
impl Debug for MessageProcessor
Auto Trait Implementations§
impl Freeze for MessageProcessor
impl !RefUnwindSafe for MessageProcessor
impl Send for MessageProcessor
impl Sync for MessageProcessor
impl Unpin for MessageProcessor
impl UnsafeUnpin for MessageProcessor
impl !UnwindSafe for MessageProcessor
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request