erldns_resolver (erldns v12.0.3)

View Source

Resolve a DNS query.

Assumes that the DNS message contains exactly one query.

Referrals

A name at or below a zone cut is answered with a referral (RFC 1034 §4.3.2): the delegation's NS RRset in the authority section, the CNAMEs followed to get there in the answer section, and nothing from below the cut. The delegation is put in the pipeline opts as zonecut, the labels of its name or none for an authoritative answer, so that later pipes such as erldns_dnssec know what the response refers to without inferring it from the message. A DS query for the delegation name itself is answered by this zone, whose data the DS RRset is (RFC 4035 §3.1.4.1).

Telemetry events

[erldns, pipeline, resolver, error]

Emitted when the resolver pipe catches an error: either a thrown {error, rcode, RCODE} or an exception (mapped to SERVFAIL).

  • Measurements: #{count => 1}
  • Metadata: #{rc => dns:rcode()}

Summary

Types

The delegation a response refers to, as the labels of its name, or none.

Types

zonecut()

-type zonecut() :: none | dns:labels().

The delegation a response refers to, as the labels of its name, or none.

Functions

call/2

erldns_pipeline:call/2 callback.

deps()

-spec deps() -> erldns_pipeline:deps().

erldns_pipeline:deps/0 callback.

prepare(Opts)

erldns_pipeline:prepare/1 callback.