[][src]Struct pulsar::ServiceDiscovery

pub struct ServiceDiscovery<Exe: Executor + ?Sized> { /* fields omitted */ }

Look up broker addresses for topics and partitioned topics

The ServiceDiscovery object provides a single interface to start interacting with a cluster. It will automatically follow redirects or use a proxy, and aggregate broker connections

Implementations

impl<Exe: Executor> ServiceDiscovery<Exe>[src]

pub fn with_manager(manager: Arc<ConnectionManager<Exe>>) -> Self[src]

pub async fn lookup_topic<'_, S: Into<String>>(
    &'_ self,
    topic: S
) -> Result<BrokerAddress, ServiceDiscoveryError>
[src]

get the broker address for a topic

pub async fn lookup_partitioned_topic_number<'_, S: Into<String>>(
    &'_ self,
    topic: S
) -> Result<u32, ServiceDiscoveryError>
[src]

get the number of partitions for a partitioned topic

pub async fn lookup_partitioned_topic<'_, S: Into<String>>(
    &'_ self,
    topic: S
) -> Result<Vec<(String, BrokerAddress)>, ServiceDiscoveryError>
[src]

get the list of topic names and addresses for a partitioned topic

Trait Implementations

impl<Exe: Clone + Executor + ?Sized> Clone for ServiceDiscovery<Exe>[src]

Auto Trait Implementations

impl<Exe> RefUnwindSafe for ServiceDiscovery<Exe> where
    Exe: RefUnwindSafe

impl<Exe> Send for ServiceDiscovery<Exe>

impl<Exe> Sync for ServiceDiscovery<Exe>

impl<Exe> Unpin for ServiceDiscovery<Exe>

impl<Exe> UnwindSafe for ServiceDiscovery<Exe> where
    Exe: RefUnwindSafe

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>,