Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewCachedResolver ¶
NewCachedResolver runs a DNS Cache to avoid frequent DNS queries to the host OS. This save CPU and time. This DNS Cache is fairly simple (v0.7)
func (*Resolver) LookupHost ¶
func (r *Resolver) LookupHost(ctx context.Context, host string, ipv int) (addrs []string, err error)
LookupHost looks up the given host As a cache DNS, if the host is present and still valid (TTL) no queries will be made to a DNS resolver. If the host is absent in the cache, a query will be made then the result saved for later queries.
Click to show internal directories.
Click to hide internal directories.