test

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MsgEqual

func MsgEqual(a, b *tap.Message) bool

MsgEqual compares two dnstap messages ignoring timestamps.

func TestingData

func TestingData() (d *msg.Data)

TestingData returns the Data matching coredns/test.ResponseWriter.

Types

type Context

type Context struct {
	context.Context
	TrapTapper
}

Context is a message trap.

type TrapTapper

type TrapTapper struct {
	Trap []*tap.Message
	Full bool
}

TrapTapper traps messages.

func (*TrapTapper) TapBuilder

func (t *TrapTapper) TapBuilder() msg.Builder

TapBuilder returns a test msg.Builder.

func (*TrapTapper) TapMessage

func (t *TrapTapper) TapMessage(m *tap.Message) error

TapMessage adds the message to the trap.

Jump to

Keyboard shortcuts

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