nsdns

package
v0.0.0-...-e2e3408 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TTL = 60

Variables

View Source
var ErrInvalid error = fmt.Errorf("Invalid domain")
View Source
var RecursorTimeout time.Duration = 5 * time.Second
View Source
var ShutdownTimeout time.Duration = 5 * time.Second

Functions

func ErrorResponse

func ErrorResponse(req *dns.Msg, rcode int) *dns.Msg

func Recurse

func Recurse(ctx context.Context, raddr net.Addr, req *dns.Msg, recursors []string) *dns.Msg

func Run

func Run(ctx context.Context, args *Args) error

Types

type Args

type Args struct {
	ConsulServer string
	Listen       string
	Domain       string
	ConsulDomain string
}

type Handler

type Handler struct {
	Context         context.Context
	RootDomain      []string
	Client          *dns.Client
	Server          string
	GlobalRecursors []string
	ConsulRecursors []string
}

func (*Handler) ServeConsulNS

func (h *Handler) ServeConsulNS(w dns.ResponseWriter, req *dns.Msg)

func (*Handler) ServeConsulRecursor

func (h *Handler) ServeConsulRecursor(w dns.ResponseWriter, req *dns.Msg)

func (*Handler) ServeGlobalRecursor

func (h *Handler) ServeGlobalRecursor(w dns.ResponseWriter, req *dns.Msg)

Jump to

Keyboard shortcuts

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