Documentation ¶
Overview ¶
Package local (aka internal/resolver/local) is a resolver implementation which handle local lookups via /etc/resolv.conf. It more-or-less implements res_send(3).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { ResolvConfPath string LocalDomains []string // In addition to those found in the resolvConfPath // Caller can create their own Exchangers on our behalf NewDNSClientExchangerFunc func(net string) DNSClientExchanger }
Config is passed to the New() constructor.
type DNSClientExchanger ¶
type DNSClientExchanger interface {
Exchange(query *dns.Msg, server string) (reply *dns.Msg, rtt time.Duration, err error)
}
DNSClientExchanger is an interface which implements dns.Client.Exchange() - the only dns.Client method used by localresolver. It exists so we can supply a mock dns.Client for testing.
Click to show internal directories.
Click to hide internal directories.