server

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicServer

type BasicServer struct {
	// Zones is a list of DNS zones that this server should accept responses
	// for.
	Zones []string

	// Handler is an optional
	Handler dns.Handler

	// TSIG configuration options
	// EnableTSIG enables TSIG support for the DNS server
	// If true, both TSIGKeyName and TSIGKeySecret must be provided.
	EnableTSIG bool
	// TSIGKeyName to be used in responses when TSIG is enabled
	TSIGKeyName string
	// TSIGKeySecret to be used in responses when TSIG is enabled
	TSIGKeySecret string
	// TSIGZone is the DNS zone that should be used in TSIG responses
	TSIGZone string
	// contains filtered or unexported fields
}

func (*BasicServer) ListenAddr

func (b *BasicServer) ListenAddr() string

func (*BasicServer) Run

func (b *BasicServer) Run(ctx context.Context) error

Run starts the test DNS server, binding to a random port on 127.0.0.1

func (*BasicServer) RunWithAddress

func (b *BasicServer) RunWithAddress(ctx context.Context, listenAddr string) error

RunWithAddress starts the test DNS server using the specified listen address.

func (*BasicServer) Shutdown

func (b *BasicServer) Shutdown() error

Jump to

Keyboard shortcuts

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