Dns

sealed
trait Dns[F[_]]

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

An instance is available for any effect which has a Sync instance on JVM and Async on Node.js.

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 an 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.

def reverse(address: IpAddress): F[Hostname]

Reverses the supplied address to a hostname using the platform DNS resolver.

Reverses the supplied address to a hostname using the platform DNS resolver.

If the address cannot be reversed, the effect fails with an UnknownHostException.

def reverseAll(address: IpAddress): F[List[Hostname]]

Reverses the supplied address to all hostnames known to the platform DNS resolver.

Reverses the supplied address to all hostnames known to the platform DNS resolver.

If the address cannot be reversed, an empty list is returned.

def reverseOption(address: IpAddress): F[Option[Hostname]]

Reverses the supplied address to a hostname using the platform DNS resolver.

Reverses the supplied address to a hostname using the platform DNS resolver.

If the address cannot be reversed, a None is returned.