Trait ginepro::LookupService

source ·
pub trait LookupService {
    // Required method
    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 Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

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

Required Methods§

source

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 Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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.

Implementors§