Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Servers an optional list of DNS server addresses (host or host:port, port defaults // to 53). Setting this forces use of Go's built-in resolver. DNSServers = "servers" // Timeout the dial timeout when contacting a configured DNS server DNSTimeout = "timeout" )
Variables ¶
This section is empty.
Functions ¶
func EnableResolverMetrics ¶
func EnableResolverMetrics(ctx context.Context, metricsRegistry metric.MetricsRegistry)
func InitConfig ¶
func NewResolver ¶
NewDNSResolver builds a pure-Go *net.Resolver for metrics instructmentation, custom timeouts, and/or custom servers. The resolver will dial the given DNS servers (each host or host:port, port defaulting to 53) in order, failing over to the next on error. Returns nil if none of the customizations (metrics, timeout, or servers) are enabeld. Exported so non-ffresty dialers — e.g. a WebSocket dialer — can honour the same DNS config as the HTTP client.
func NewResolverWithConfig ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.