Versions in this module Expand all Collapse all v1 v1.1.0 Nov 21, 2023 Changes in this version type Resolver + func (r *Resolver) LookupIP(ctx context.Context, network, host string) ([]net.IP, error) + func (r *Resolver) LookupNetIP(ctx context.Context, network, host string) ([]netip.Addr, error) v1.0.0 Jul 29, 2021 Changes in this version + func UnpatchNet(r *net.Resolver) + type Logger interface + Printf func(f string, args ...interface{}) + type Resolver struct + SkipCNAME bool + Zones map[string]Zone + func (r *Resolver) Dial(network, addr string) (net.Conn, error) + func (r *Resolver) DialContext(ctx context.Context, network, addr string) (net.Conn, error) + func (r *Resolver) LookupAddr(ctx context.Context, addr string) (names []string, err error) + func (r *Resolver) LookupCNAME(ctx context.Context, host string) (cname string, err error) + func (r *Resolver) LookupHost(ctx context.Context, host string) (addrs []string, err error) + func (r *Resolver) LookupIPAddr(ctx context.Context, host string) ([]net.IPAddr, error) + func (r *Resolver) LookupMX(ctx context.Context, name string) ([]*net.MX, error) + func (r *Resolver) LookupNS(ctx context.Context, name string) ([]*net.NS, error) + func (r *Resolver) LookupPort(ctx context.Context, network, service string) (port int, err error) + func (r *Resolver) LookupSRV(ctx context.Context, service, proto, name string) (cname string, addrs []*net.SRV, err error) + func (r *Resolver) LookupTXT(ctx context.Context, name string) ([]string, error) + type Server struct + Authoritative bool + Log Logger + func NewServer(zones map[string]Zone, authoritative bool) (*Server, error) + func NewServerWithLogger(zones map[string]Zone, l Logger, authoritative bool) (*Server, error) + func (s *Server) Close() error + func (s *Server) LocalAddr() net.Addr + func (s *Server) PatchNet(r *net.Resolver) + func (s *Server) Resolver() *Resolver + func (s *Server) ServeDNS(w dns.ResponseWriter, m *dns.Msg) + type Zone struct + A []string + AAAA []string + AD bool + CNAME string + Err error + MX []net.MX + Misc map[dns.Type][]dns.RR + NS []net.NS + PTR []string + SRV []net.SRV + TXT []string