Struct ginepro::DnsResolver [−][src]
pub struct DnsResolver { /* fields omitted */ }
Expand description
Implements LookupService
by using DNS queries to lookup ServiceDefinition::hostname
.
Implementations
Construct a new DnsResolver
from env and system configration, e.g resolv.conf
.
Trait Implementations
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,
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,
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. Read more
Auto Trait Implementations
impl !RefUnwindSafe for DnsResolver
impl Send for DnsResolver
impl Sync for DnsResolver
impl Unpin for DnsResolver
impl !UnwindSafe for DnsResolver
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more