Trait abstract_ns::HostResolve [] [src]

pub trait HostResolve {
    type HostFuture: Future<Item = IpList, Error = Error>;
    fn resolve_host(&self, name: &Name) -> Self::HostFuture;

    fn frozen_host_subscriber(self) -> FrozenSubscriber<Self>
    where
        Self: Sized
, { ... }
fn null_service_resolver(self) -> NullResolver<Self>
    where
        Self: Sized
, { ... } }

Resolves a hostname into a list of IpAddresses

This is usually equivalent of the resolving A or AAAA record. This kind of resolution is used in two cases:

  1. If user specified port of the service explicitly (example.org:1234)
  2. When there is known default port like 80 for http

Note: akin to A records this method returns plain list of addresses so it can't use a backup addresses and weights. So this should be used for simple cases and full blown Resolve trait (i.e. SRV records) for more complex ones.

Associated Types

A future returned from resolve()

Required Methods

Resolve a name to an address once

Provided Methods

Create a subscriber that resolves once using this resolver and never updates a stream

This is mostly useful for tests

Create a thing that implements Resolve+HostResolve but returns NameNotFound on resolve

This is needed to add resolver that can only resolve hostnames to the router.

Implementations on Foreign Types

impl<T: HostResolve> HostResolve for Arc<T>
[src]

[src]

[src]

[src]

Implementors