dns

package
v0.0.0-...-cbea63e Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hosts

func Hosts(role string) ([]string, error)

Hosts returns a list of ip addresses for a particular role.

Types

type MockResolver

type MockResolver struct {
	mock.Mock
}

func (*MockResolver) LookupIP

func (mr *MockResolver) LookupIP(name string) ([]net.IP, error)

func (*MockResolver) Register

func (mr *MockResolver) Register(role string, ips []net.IP, err error)

type Resolver

type Resolver interface {
	LookupIP(string) ([]net.IP, error)
}
var (
	DefaultResolver Resolver = newResolver()
)

Jump to

Keyboard shortcuts

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