Trait ginepro::LookupService[][src]

pub trait LookupService {
    #[must_use]
    fn resolve_service_endpoints<'life0, 'life1, 'async_trait>(
        &'life0 self,
        definition: &'life1 ServiceDefinition
    ) -> Pin<Box<dyn Future<Output = Result<HashSet<SocketAddr>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

Interface that provides functionality to acquire a list of ips given a valid host name.

Required methods

#[must_use]
fn resolve_service_endpoints<'life0, 'life1, 'async_trait>(
    &'life0 self,
    definition: &'life1 ServiceDefinition
) -> Pin<Box<dyn Future<Output = Result<HashSet<SocketAddr>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Expand description

Return a list of unique SocketAddr associated with the provided ServiceDefinition containing the hostname port of the service. If no ip addresses were resolved, an empty HashSet is returned.

Loading content...

Implementors

impl LookupService for DnsResolver[src]

fn resolve_service_endpoints<'life0, 'life1, 'async_trait>(
    &'life0 self,
    definition: &'life1 ServiceDefinition
) -> Pin<Box<dyn Future<Output = Result<HashSet<SocketAddr>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Loading content...