server

package
v2.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dial

type Dial = func(ctx context.Context, _, _ string) (net.Conn, error)

type Exchange

type Exchange = func(ctx context.Context, request *dns.Msg) (
	response *dns.Msg, err error,
)

func NewExchange

func NewExchange(name string, dial Dial, warner Warner) Exchange

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, exchange Exchange,
	logger Logger) *Handler

func (*Handler) ServeDNS

func (h *Handler) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

type Logger

type Logger interface {
	Debug(s string)
	Info(s string)
	Warner
	Error(s string)
}

type Warner

type Warner interface {
	Warn(s string)
}

Jump to

Keyboard shortcuts

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