Dns

trait Dns[F[_]]

Capability for an effect F[_] which can do DNS lookups.

Capability for an effect F[_] which can do DNS lookups.

An instance is available for any effect which has a Sync instance.

Companion
object
class Object
trait Matchable
class Any

Value members

Abstract methods

Gets an IP address representing the loopback interface.

Gets an IP address representing the loopback interface.

def resolve(hostname: Hostname): F[IpAddress]

Resolves the supplied hostname to an ip address using the platform DNS resolver.

Resolves the supplied hostname to an ip address using the platform DNS resolver.

If the hostname cannot be resolved, the effect fails with a java.net.UnknownHostException.

def resolveAll(hostname: Hostname): F[List[IpAddress]]

Resolves the supplied hostname to all ip addresses known to the platform DNS resolver.

Resolves the supplied hostname to all ip addresses known to the platform DNS resolver.

If the hostname cannot be resolved, an empty list is returned.

def resolveOption(hostname: Hostname): F[Option[IpAddress]]

Resolves the supplied hostname to an ip address using the platform DNS resolver.

Resolves the supplied hostname to an ip address using the platform DNS resolver.

If the hostname cannot be resolved, a None is returned.