[][src]Struct pulsar::ConnectionManager

pub struct ConnectionManager {
    pub address: SocketAddr,
    // some fields omitted
}

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]

pub fn from_connection<E: PulsarExecutor>(
    connection: Connection,
    auth: Option<Authentication>,
    address: SocketAddr,
    executor: E
) -> Result<ConnectionManager, ConnectionError>
[src]

pub fn get_base_connection(
    &self
) -> impl Future<Item = Arc<Connection>, Error = ConnectionError>
[src]

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]

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]

Trait Implementations

impl Clone for ConnectionManager[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,