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() }
func NewDnsResolver ¶
func NewDnsResolver(name string, logger logging.LoggerFactory) DnsResolver
NewDnsResolver creates a new DNS resolver
func NewMockResolver ¶ added in v0.10.5
func NewMockResolver(zone map[string]([]string), logger logging.LoggerFactory) DnsResolver
NewMockResolver creates a new mock DNS resolver
type MockResolver ¶
for testing
func (*MockResolver) Close ¶ added in v0.10.5
func (m *MockResolver) Close()
Close closes the mock resolver
func (*MockResolver) Lookup ¶ added in v0.10.5
func (m *MockResolver) Lookup(domain string) ([]net.IP, error)
Lookup returns the hostname(s) for a domain
func (*MockResolver) Register ¶ added in v0.10.5
func (m *MockResolver) Register(domain string) error
Register mocks the DNS resolver's Register method
func (*MockResolver) Start ¶ added in v0.10.5
func (m *MockResolver) Start()
Starts spawns the mock DNS resolver
func (*MockResolver) Unregister ¶ added in v0.10.5
func (m *MockResolver) Unregister(domain string)
Unregister mocks the Unregister method
Click to show internal directories.
Click to hide internal directories.