dnscache

package
v0.0.0-...-f97f0ba Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package dnscache caches DNS lookups. Forked from github.com/viki-org/dnscache

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRoundTripperWithDNSCached

func NewRoundTripperWithDNSCached(cacheSize int, refreshInterval time.Duration) http.RoundTripper

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func New

func New(cacheSize int, refreshInterval time.Duration) *Resolver

func (*Resolver) Fetch

func (r *Resolver) Fetch(address string) ([]net.IP, error)

func (*Resolver) FetchOne

func (r *Resolver) FetchOne(address string) (net.IP, error)

func (*Resolver) FetchOneString

func (r *Resolver) FetchOneString(address string) (string, error)

func (*Resolver) Lookup

func (r *Resolver) Lookup(address string) ([]net.IP, error)

func (*Resolver) Refresh

func (r *Resolver) Refresh()

Jump to

Keyboard shortcuts

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