Trait cdrs_tokio::cluster::ConnectionManager

source ·
pub trait ConnectionManager<T: CdrsTransport>: Send + Sync {
    // Required method
    fn connection(
        &self,
        event_handler: Option<Sender<Envelope>>,
        error_handler: Option<Sender<Error>>,
        addr: SocketAddr
    ) -> BoxFuture<'_, Result<T>>;
}
Expand description

Manages establishing connections to nodes.

Required Methods§

source

fn connection( &self, event_handler: Option<Sender<Envelope>>, error_handler: Option<Sender<Error>>, addr: SocketAddr ) -> BoxFuture<'_, Result<T>>

Tries to establish a new, ready to use connection with optional server event and error handlers.

Implementors§