testhelpers

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testhelpers contains a test DNS server lifecycle manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartDNSServer

func StartDNSServer(t *testing.T, config DNSConfig) string

StartDNSServer starts a DNS server with the given configuration

Types

type DNSConfig

type DNSConfig struct {
	ResponseDelay time.Duration
	Hostnames     map[string][]string
	Port          int
	Network       string // e.g. udp4, udp6
}

DNSConfig contains options to configure a test DNS server from StartDNSServer()

Jump to

Keyboard shortcuts

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