erldns_resolver (erldns v12.0.3)
View SourceResolve 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
Functions
erldns_pipeline:call/2 callback.
erldns_pipeline:deps/0 callback.
erldns_pipeline:prepare/1 callback.
Types
-type zonecut() :: none | dns:labels().
The delegation a response refers to, as the labels of its name, or none.
Functions
-spec call(dns:message(), erldns_pipeline:opts()) -> erldns_pipeline:return().
erldns_pipeline:call/2 callback.
-spec deps() -> erldns_pipeline:deps().
erldns_pipeline:deps/0 callback.
-spec prepare(erldns_pipeline:opts()) -> erldns_pipeline:opts().
erldns_pipeline:prepare/1 callback.