dns

package
v2.4.10-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver added in v2.3.0

type Resolver func(ctx context.Context, domain string) []net.IP

type Server

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

Server is a DNS server which implements the github.com/miekg/dns Handler interface

func NewServer

func NewServer(listeners []net.PacketConn, fallback *dns.Conn, resolve Resolver, cache *sync.Map) *Server

NewServer returns a new dns.Server

func (*Server) RequestCount added in v2.3.0

func (s *Server) RequestCount() int

RequestCount returns the number of requests that this server has received.

func (*Server) Run

func (s *Server) Run(c context.Context, initDone chan<- struct{}) error

Run starts the DNS server(s) and waits for them to end

func (*Server) ServeDNS

func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

ServeDNS is an implementation of github.com/miekg/dns Handler.ServeDNS.

Jump to

Keyboard shortcuts

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