Documentation ¶
Overview ¶
Cachning DNS resolver.
This package has a global instance of caching DNS service.
Index ¶
Constants ¶
View Source
const ( // CacheSize is a size of DNS cache. CacheSize = 512 // CacheTTL is a TTL of a DNS record in a cache. CacheTTL = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { // Lookup returns resolved IPs for given hostname/ips. Important // property is that this list is shuffled on each function // execution. Lookup(context.Context, string) ([]string, error) }
Interface is an interface for cachind DNS resolver.
Default is a default DNS resolver you usually want to use everywhere.
Click to show internal directories.
Click to hide internal directories.