resolver

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsResolver

type DnsResolver interface {
	Register(domain string) error
	Unregister(domain string)
	Lookup(domain string) ([]net.IP, error)
	Start()
	Close()
	SetResolver(mockDns *MockResolver)
}

func NewDnsResolver

func NewDnsResolver(name string, logger logging.LoggerFactory) DnsResolver

NewDnsResolver creates a new DNS resolver

type MockResolver

type MockResolver struct {
	Zone map[string]([]string)
}

for testing

func (*MockResolver) LookupCNAME

func (m *MockResolver) LookupCNAME(domain string) (string, error)

func (*MockResolver) LookupHost

func (m *MockResolver) LookupHost(domain string) ([]string, error)

Jump to

Keyboard shortcuts

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