Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrServFail = errors.New("dns lookup failed (rcode: servfail)")
View Source
var ErrUnboundNotAvail = errors.New("unbound not available")
Functions ¶
This section is empty.
Types ¶
type DefaultResolver ¶
type DefaultResolver struct {
Query func(ctx context.Context, name string, qtype uint16) *DNSResult
}
func (*DefaultResolver) LookupIP ¶
func (r *DefaultResolver) LookupIP(ctx context.Context, network, host string) (ips []net.IP, secure bool, err error)
LookupIP looks up host for the given networks. It returns a slice of that host's IP addresses of the type specified by networks, and whether the lookup was secure networks must be one of "ip", "ip4" or "ip6".
func (*DefaultResolver) LookupTLSA ¶
func (r *DefaultResolver) LookupTLSA(ctx context.Context, service, proto, name string) ([]*dns.TLSA, bool, error)
LookupTLSA looks up TLSA records for the given service, protocol and name. It returns a slice of that name's TLSA records and whether the lookup was secure.
type Recursive ¶
type Recursive struct {
DefaultResolver
}
func NewRecursive ¶
func (*Recursive) ResolvConf ¶
type Resolver ¶
type Resolver interface {
// LookupIP looks up host for the given networks.
// It returns a slice of that host's IP addresses of the type specified by
// networks, and whether the lookup was secure
// networks must be one of "ip", "ip4" or "ip6".
LookupIP(ctx context.Context, network, host string) ([]net.IP, bool, error)
// LookupTLSA looks up TLSA records for the given service, protocol and name.
// It returns a slice of that name's TLSA records and
// whether the lookup was secure.
LookupTLSA(ctx context.Context, service, proto, name string) ([]*dns.TLSA, bool, error)
}
Resolver is an interface for representing a security-aware DNS resolver.
Click to show internal directories.
Click to hide internal directories.