Expand description
Transport-aware DNS resolver construction.
Both the validation pipeline and the dns query subcommand build
Hickory resolvers from configured DNS endpoints. The resolver setup
is identical for both surfaces; only the source of the configuration
differs (legacy ValidationEndpointConfig for validation, the
per-server [servers.dns|dot|doh|doq] blocks for query). This module
provides:
ResolverTarget: a small neutral struct holding everything a resolver build needs (transport, host, port, URL, SNI, timeout).- Converters from legacy and new config shapes into a
ResolverTarget. resolver_config/build_resolver: produceResolverConfig/Resolver<TokioRuntimeProvider>from a target.classify_hickory_error: map Hickory error strings to stableValidationFailureKindvariants for downstream reporting.
DoQ support is gated behind the doq Cargo feature. On default
builds, a target with ValidationTransport::Doq returns
ValidationFailureKind::UnsupportedTransport.
Structs§
- Resolver
Target - Minimal data a resolver build needs, transport-tagged.
Enums§
- Resolver
Kind - Where a
ResolverTargetwas sourced from.
Constants§
- DEFAULT_
TIMEOUT_ MS - Default per-attempt timeout when no override is supplied.
Functions§
- build_
resolver - Build a Hickory
Resolverfor a target with the target’s timeout. - classify_
hickory_ error - Map a Hickory error string into a stable
ValidationFailureKind. - resolver_
config - Build a
ResolverConfigfor a target.