taprw

package
v0.0.0-...-c3705ec Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package taprw takes a query and intercepts the response. It will log both after the response is written.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResponseWriter

type ResponseWriter struct {
	Query *dns.Msg
	dns.ResponseWriter
	Taper
	Pack bool
	// contains filtered or unexported fields
}

Single request use.

func (ResponseWriter) DnstapError

func (w ResponseWriter) DnstapError() error

Check if a dnstap error occurred. Set during ResponseWriter.Write.

func (*ResponseWriter) QueryEpoch

func (w *ResponseWriter) QueryEpoch()

To be called as soon as possible.

func (*ResponseWriter) WriteMsg

func (w *ResponseWriter) WriteMsg(resp *dns.Msg) error

Write back the response to the client and THEN work on logging the request and response to dnstap. Dnstap errors to be checked by DnstapError.

type Taper

type Taper interface {
	TapMessage(m *tap.Message) error
}

Jump to

Keyboard shortcuts

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