[−][src]Struct pulsar::ServiceDiscovery
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]
&'_ self,
topic: S
) -> Result<BrokerAddress, ServiceDiscoveryError>
get the broker address for a topic
pub async fn lookup_partitioned_topic_number<'_, S: Into<String>>(
&'_ self,
topic: S
) -> Result<u32, ServiceDiscoveryError>[src]
&'_ self,
topic: S
) -> Result<u32, ServiceDiscoveryError>
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]
&'_ self,
topic: S
) -> Result<Vec<(String, BrokerAddress)>, ServiceDiscoveryError>
get the list of topic names and addresses for a partitioned topic
Trait Implementations
impl<Exe: Clone + Executor + ?Sized> Clone for ServiceDiscovery<Exe>[src]
fn clone(&self) -> ServiceDiscovery<Exe>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Auto Trait Implementations
impl<Exe> RefUnwindSafe for ServiceDiscovery<Exe> where
Exe: RefUnwindSafe,
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,
Exe: RefUnwindSafe,
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>,