[−][src]Struct pulsar::ConnectionManager
Look up broker addresses for topics and partitioned topics
The ConnectionManager object provides a single interface to start interacting with a cluster. It will automatically follow redirects or use a proxy, and aggregate broker connections
Fields
address: SocketAddr
Methods
impl ConnectionManager
[src]
pub fn new<E: PulsarExecutor>(
addr: SocketAddr,
auth: Option<Authentication>,
executor: E
) -> impl Future<Item = Self, Error = ConnectionError>
[src]
addr: SocketAddr,
auth: Option<Authentication>,
executor: E
) -> impl Future<Item = Self, Error = ConnectionError>
pub fn from_connection<E: PulsarExecutor>(
connection: Connection,
auth: Option<Authentication>,
address: SocketAddr,
executor: E
) -> Result<ConnectionManager, ConnectionError>
[src]
connection: Connection,
auth: Option<Authentication>,
address: SocketAddr,
executor: E
) -> Result<ConnectionManager, ConnectionError>
pub fn get_base_connection(
&self
) -> impl Future<Item = Arc<Connection>, Error = ConnectionError>
[src]
&self
) -> impl Future<Item = Arc<Connection>, Error = ConnectionError>
get an active Connection from a broker address
creates a connection if not available
pub fn get_connection(
&self,
broker: &BrokerAddress
) -> impl Future<Item = Arc<Connection>, Error = ConnectionError>
[src]
&self,
broker: &BrokerAddress
) -> impl Future<Item = Arc<Connection>, Error = ConnectionError>
get an active Connection from a broker address
creates a connection if not available
pub fn get_connection_from_url(
&self,
broker: Option<String>
) -> impl Future<Item = Option<(bool, Arc<Connection>)>, Error = ConnectionError>
[src]
&self,
broker: Option<String>
) -> impl Future<Item = Option<(bool, Arc<Connection>)>, Error = ConnectionError>
Trait Implementations
impl Clone for ConnectionManager
[src]
fn clone(&self) -> ConnectionManager
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl !RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin for ConnectionManager
impl !UnwindSafe for ConnectionManager
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,