coredns

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultEnv

func DefaultEnv(ctx context.Context, state *Request) map[string]interface{}

Types

type Msg

type Msg struct {
	MsgHdr
	Compress bool `json:"-"`
	Question []Question
	Answer   []RR
	Ns       []RR
	Extra    []RR
}

type MsgHdr

type MsgHdr struct {
	Id                 uint16
	Response           bool
	Opcode             int
	Authoritative      bool
	Truncated          bool
	RecursionDesired   bool
	RecursionAvailable bool
	Zero               bool
	AuthenticatedData  bool
	CheckingDisabled   bool
	Rcode              int
}

type Question

type Question struct {
	Name   string `dns:"cdomain-name"`
	Qtype  uint16
	Qclass uint16
}

type RR

type RR interface {
	Header() *RR_Header
	String() string
}

type RR_Header

type RR_Header struct {
	Name     string `dns:"cdomain-name"`
	Rrtype   uint16
	Class    uint16
	Ttl      uint32
	Rdlength uint16
}

type Request

type Request struct {
	Req  *Msg
	W    ResponseWriter
	Zone string
}

func (*Request) Class

func (r *Request) Class() string

func (*Request) Clear

func (r *Request) Clear()

func (*Request) Do

func (r *Request) Do() bool

func (*Request) Family

func (r *Request) Family() int

func (*Request) IP

func (r *Request) IP() string

func (*Request) Len

func (r *Request) Len() int

func (*Request) LocalAddr

func (r *Request) LocalAddr() string

func (*Request) LocalIP

func (r *Request) LocalIP() string

func (*Request) LocalPort

func (r *Request) LocalPort() string

func (*Request) Match

func (r *Request) Match(reply *Msg) bool

func (*Request) Name

func (r *Request) Name() string

func (*Request) NewWithQuestion

func (r *Request) NewWithQuestion(name string, typ uint16) Request

func (*Request) Port

func (r *Request) Port() string

func (*Request) Proto

func (r *Request) Proto() string

func (*Request) QClass

func (r *Request) QClass() uint16

func (*Request) QName

func (r *Request) QName() string

func (*Request) QType

func (r *Request) QType() uint16

func (*Request) RemoteAddr

func (r *Request) RemoteAddr() string

func (*Request) Scrub

func (r *Request) Scrub(reply *Msg) *Msg

func (*Request) Size

func (r *Request) Size() int

func (*Request) SizeAndDo

func (r *Request) SizeAndDo(m *Msg) bool

func (*Request) Type

func (r *Request) Type() string

type ResponseWriter

type ResponseWriter interface {
	LocalAddr() net.Addr
	RemoteAddr() net.Addr
	WriteMsg(*Msg) error
	Write([]byte) (int, error)
	Close() error
	TsigStatus() error
	TsigTimersOnly(bool)
	Hijack()
}

Jump to

Keyboard shortcuts

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