dnscache

package
v0.0.0-...-3fff119 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2015 License: BSD-3-Clause Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL