ctx

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	DNSWriter  ResponseWriter
	DNSRequest *dns.Msg
	// contains filtered or unexported fields
}

Context type

func New

func New(handlers []Handler) *Context

New return new dnscontext

func (*Context) Abort

func (dc *Context) Abort()

Abort calls

func (*Context) NextDNS

func (dc *Context) NextDNS(ctx context.Context)

NextDNS call next dns middleware

func (*Context) ResetDNS

func (dc *Context) ResetDNS(w dns.ResponseWriter, r *dns.Msg)

ResetDNS reset dns vars

type Handler

type Handler interface {
	Name() string
	ServeDNS(context.Context, *Context)
}

Handler interface

type ResponseWriter

type ResponseWriter interface {
	dns.ResponseWriter
	Msg() *dns.Msg
	Rcode() int
	Written() bool
	Reset(dns.ResponseWriter)
	Proto() string
	RemoteIP() net.IP
	Internal() bool
}

ResponseWriter implement of dns.ResponseWriter

Jump to

Keyboard shortcuts

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