Documentation
¶
Index ¶
- type NameServer
- type Resolver
- func (r *Resolver) Exchange(m *dns.Msg) (msg *dns.Msg, err error)
- func (r *Resolver) ExchangeContext(ctx context.Context, m *dns.Msg) (msg *dns.Msg, err error)
- func (r *Resolver) LookupIP(ctx context.Context, host string) (ip []net.IP, err error)
- func (r *Resolver) LookupIPv4(ctx context.Context, host string) ([]net.IP, error)
- func (r *Resolver) LookupIPv6(ctx context.Context, host string) ([]net.IP, error)
- func (r *Resolver) ResolveIP(host string) (ip net.IP, err error)
- func (r *Resolver) ResolveIPv4(host string) (ip net.IP, err error)
- func (r *Resolver) ResolveIPv6(host string) (ip net.IP, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NameServer ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func NewResolver(nameServers []NameServer) *Resolver
func (*Resolver) ExchangeContext ¶
ExchangeContext a batch of dns request with context.Context, and it use cache
func (*Resolver) LookupIPv4 ¶
LookupIPv4 request with TypeA
func (*Resolver) LookupIPv6 ¶
LookupIPv6 request with TypeAAAA
func (*Resolver) ResolveIPv4 ¶
ResolveIPv4 request with TypeA
Click to show internal directories.
Click to hide internal directories.