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
Click to show internal directories.
Click to hide internal directories.