server

package
v0.0.0-...-b8a97ec Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsHandler

type DnsHandler struct {
	Config *config.Config

	sync.WaitGroup
	// contains filtered or unexported fields
}

func (*DnsHandler) AddressRecords

func (handler *DnsHandler) AddressRecords(q dns.Question, name string) (records []dns.RR, err error)

func (*DnsHandler) LeadAuthority

func (handler *DnsHandler) LeadAuthority(url string) ([]config.Authority, error)

func (*DnsHandler) PTRRecords

func (handler *DnsHandler) PTRRecords(q dns.Question) (records []dns.RR, err error)

func (*DnsHandler) ResolveDnsQuery

func (handler *DnsHandler) ResolveDnsQuery(req *dns.Msg, authorities []config.Authority, netProtocol string) (*dns.Msg, error)

func (*DnsHandler) ServeDNS

func (handler *DnsHandler) ServeDNS(w dns.ResponseWriter, req *dns.Msg)

type Hostfile

type Hostfile interface {
	FindHosts(name string) ([]net.IP, error)
	FindReverse(name string) (string, error)
}

type Middleware

type Middleware func(question dns.Question, netProtocol string) ([]dns.RR, error)

type Server

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

func New

func New(cfg config.Config) (*Server, error)

func (*Server) Start

func (s *Server) Start() error

func (*Server) UseLogger

func (s *Server) UseLogger(logger log.ILogger)

func (*Server) UseMiddleware

func (s *Server) UseMiddleware(f Middleware)

Jump to

Keyboard shortcuts

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