resolve

package
v0.0.0-...-b3b45a9 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DNSSRV

func DNSSRV(name string) ([]string, time.Duration, error)

DNSSRV resolves the name via a DNS SRV lookup.

Types

type Resolver

type Resolver interface {
	Resolve(name string) (hosts []string, ttl time.Duration, err error)
}

Resolver represents anything that can resolve an abstract name to a set of hosts, inclusive ports when appropriate, and their TTL.

type ResolverFunc

type ResolverFunc func(name string) (hosts []string, ttl time.Duration, err error)

ResolverFunc is an adapter that allows use of ordinary functions as Resolvers. If f is a function with the appropriate signature, ResolverFunc(f) is a Resolver object that calls f.

func (ResolverFunc) Resolve

func (f ResolverFunc) Resolve(name string) (hosts []string, ttl time.Duration, err error)

Resolve calls f(name).

Jump to

Keyboard shortcuts

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