dns

package
v0.20.5 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultServer added in v0.10.7

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

DefaultServer dns server object

func NewDefaultServer added in v0.10.7

func NewDefaultServer(ctx context.Context, wgInterface *iface.WGIface, customAddress string) (*DefaultServer, error)

NewDefaultServer returns a new dns server

func (*DefaultServer) Start added in v0.10.7

func (s *DefaultServer) Start()

Start runs the listener in a go routine

func (*DefaultServer) Stop added in v0.10.7

func (s *DefaultServer) Stop()

Stop stops the server

func (*DefaultServer) UpdateDNSServer added in v0.10.7

func (s *DefaultServer) UpdateDNSServer(serial uint64, update nbdns.Config) error

UpdateDNSServer processes an update received from the management service

type MockServer added in v0.10.7

type MockServer struct {
	StartFunc           func()
	StopFunc            func()
	UpdateDNSServerFunc func(serial uint64, update nbdns.Config) error
}

MockServer is the mock instance of a dns server

func (*MockServer) Start added in v0.10.7

func (m *MockServer) Start()

Start mock implementation of Start from Server interface

func (*MockServer) Stop added in v0.10.7

func (m *MockServer) Stop()

Stop mock implementation of Stop from Server interface

func (*MockServer) UpdateDNSServer added in v0.10.7

func (m *MockServer) UpdateDNSServer(serial uint64, update nbdns.Config) error

UpdateDNSServer mock implementation of UpdateDNSServer from Server interface

type Server

type Server interface {
	Start()
	Stop()
	UpdateDNSServer(serial uint64, update nbdns.Config) error
}

Server is a dns server interface

Jump to

Keyboard shortcuts

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