Karta.DNS.Resolver behaviour (Karta v1.0.0)

A source of DNS answers. Karta.DNS.lookup/3 calls the configured one.

Every error is temporary from the caller's point of view: the answer is unknown, not negative. DKIM turns it into temperror, delivery into a retry.

Summary

Types

Why a lookup has no answer.

Callbacks

Looks up type records for name (a lower-case name without the final dot).

Types

error()

@type error() ::
  :timeout
  | :network
  | :servfail
  | :refused
  | :formerr
  | :notimp
  | :malformed
  | :truncated
  | :invalid_name
  | :invalid_type
  | {:rcode, non_neg_integer()}

Why a lookup has no answer.

Callbacks

lookup(name, type, opts)

@callback lookup(name :: String.t(), type :: Karta.DNS.Record.type(), opts :: keyword()) ::
  {:ok, Karta.DNS.Answer.t()} | {:error, error()}

Looks up type records for name (a lower-case name without the final dot).