Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ BaseResolvers: DefaultResolvers, CacheSize: 10, ExpirationTime: 5 * 60, MaxRetries: 5, }
DefaultOptions of the cache
View Source
var DefaultResolvers = []string{
"1.1.1.1:53",
"1.0.0.1:53",
"8.8.8.8:53",
"8.8.4.4:53",
}
DefaultResolvers trusted
View Source
var Separator = "-"
Functions ¶
func MarshalAddresses ¶
func UnmarshalAddresses ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a strcture for caching DNS lookups
type DialerFunc ¶
DialerFunc with signature matching of go net/dial
func NewDialer ¶
func NewDialer(options Options) (DialerFunc, error)
NewDialer gets a new Dialer instance using a resolver cache
type NoAddressFoundError ¶
type NoAddressFoundError struct{}
NoAddressFoundError occurs when no addresses are found for the host
func (*NoAddressFoundError) Error ¶
func (m *NoAddressFoundError) Error() string
Click to show internal directories.
Click to hide internal directories.