Documentation ¶
Overview ¶
Package dns_resolver is a simple dns resolver based on miekg/dns
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DnsResolver ¶
type DnsResolver struct { Servers []string RetryTimes int // contains filtered or unexported fields }
DnsResolver represents a dns resolver
func NewFromResolvConf ¶
func NewFromResolvConf(path string) (*DnsResolver, error)
NewFromResolvConf initializes DnsResolver from resolv.conf like file.
func (*DnsResolver) LookupHost ¶
func (r *DnsResolver) LookupHost(host string) ([]net.IP, error)
LookupHost returns IP addresses of provied host. In case of timeout retries query RetryTimes times.
Click to show internal directories.
Click to hide internal directories.