Documentation ¶
Index ¶
- type RefCountingResolver
- func (self *RefCountingResolver) AddDomain(name string, cb func(string) (net.IP, error)) error
- func (self *RefCountingResolver) AddHostname(s string, ip net.IP) error
- func (self *RefCountingResolver) Cleanup() error
- func (self *RefCountingResolver) Lookup(ip net.IP) (string, error)
- func (self *RefCountingResolver) RemoveDomain(name string)
- func (self *RefCountingResolver) RemoveHostname(s string) net.IP
- type Resolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RefCountingResolver ¶
type RefCountingResolver struct {
// contains filtered or unexported fields
}
func (*RefCountingResolver) AddHostname ¶
func (self *RefCountingResolver) AddHostname(s string, ip net.IP) error
func (*RefCountingResolver) Cleanup ¶
func (self *RefCountingResolver) Cleanup() error
func (*RefCountingResolver) Lookup ¶
func (self *RefCountingResolver) Lookup(ip net.IP) (string, error)
func (*RefCountingResolver) RemoveDomain ¶ added in v0.33.0
func (self *RefCountingResolver) RemoveDomain(name string)
func (*RefCountingResolver) RemoveHostname ¶
func (self *RefCountingResolver) RemoveHostname(s string) net.IP
type Resolver ¶
type Resolver interface { AddHostname(string, net.IP) error AddDomain(string, func(string) (net.IP, error)) error Lookup(net.IP) (string, error) RemoveHostname(string) net.IP RemoveDomain(string) Cleanup() error }
func NewDnsServer ¶
func NewDummyResolver ¶ added in v0.33.0
func NewDummyResolver() Resolver
func NewHostFile ¶
func NewRefCountingResolver ¶
func NewResolver ¶
Click to show internal directories.
Click to hide internal directories.