test

package
v0.0.0-...-909f21c Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2016 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	T         *testing.T
	Conn      *net.UDPConn
	StartChan chan struct{}
}

Server for mock DNS responses.

func (*Server) Init

func (s *Server) Init(t *testing.T) (addr string, port int)

Init the DNS server.

func (*Server) Run

func (s *Server) Run(cb ServerCallback)

Run the server with the given response callback.

type ServerCallback

type ServerCallback func(server *Server, remoteAddr net.Addr, msg *dns.Msg)

ServerCallback to respond to DNS messages.

Jump to

Keyboard shortcuts

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