# `Caracola.DNS.Resolver`
[🔗](https://github.com/netkubes/caracola/blob/v0.1.0-rc.1/lib/caracola/dns/resolver.ex#L1)

Behaviour for the DNS lookups used by `Caracola.DNS`. The default
implementation, `Caracola.DNS.Inet`, uses `:inet_res` and `:inet`; tests
can provide their own.

# `naptr`

```elixir
@type naptr() ::
  {order :: non_neg_integer(), preference :: non_neg_integer(),
   flags :: String.t(), service :: String.t(), regexp :: String.t(),
   replacement :: String.t()}
```

A NAPTR record: order, preference, flags, service, regexp and replacement.

# `srv`

```elixir
@type srv() ::
  {priority :: non_neg_integer(), weight :: non_neg_integer(),
   port :: :inet.port_number(), target :: String.t()}
```

An SRV record: priority, weight, port and target host.

# `ips`

```elixir
@callback ips(host :: String.t()) :: [:inet.ip_address()]
```

The IP addresses (A and AAAA) of a host name.

# `naptr`

```elixir
@callback naptr(domain :: String.t()) :: [naptr()]
```

The NAPTR records of a domain, to find the transports of a URI (RFC 3263).

# `srv`

```elixir
@callback srv(domain :: String.t()) :: [srv()]
```

The SRV records of a name such as `_sip._udp.example.com`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
