Documentation ¶
Overview ¶
Package dnscache implements a Dial function that will cache DNS resolutions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
func Dial(wrappedDial func(network, addr string) (net.Conn, error), maxEntries int) (func(network, addr string) (net.Conn, error), error)
Dial wraps the given dial function with Caching of DNS resolutions. When a hostname is found in the cache it will call the provided dial with the IP address instead of the hostname, so no DNS lookup need be performed. It will also cache DNS failures.
If the given wrappedDial is nil, net.Dial will be automatically used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.