dns

package
v0.0.0-...-88ba6c3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNSHandler

func NewNSHandler(config *config.Config) *nsHandler

func NewSOAHandler

func NewSOAHandler(name string) *soaHandler

Types

type DNS

type DNS struct {
	Config *config.Config
	Server *mdns.Server
	// contains filtered or unexported fields
}

func NewDNS

func NewDNS(config *config.Config) *DNS

NewDNS created new instance of DNS server

func (*DNS) HandleRequest

func (dns *DNS) HandleRequest(w mdns.ResponseWriter, r *mdns.Msg)

HandleRequest process incoming requests

func (*DNS) ParseQuery

func (dns *DNS) ParseQuery(msg *mdns.Msg)

ParseQuery parses incoming query and creates appropriate response message

func (*DNS) Serve

func (dns *DNS) Serve(net string) (err error)

Serve starts DNS server

type QueryHandlers

type QueryHandlers map[string]queryHandler

Jump to

Keyboard shortcuts

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