dnsserver

package
v0.0.0-...-2855d86 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver interface {
	// Init
	Init() error

	// Query
	Query(message *dns.Msg) (*dns.Msg, error)
}

Resolver is the interface

type Server

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

Server struct

func New

func New(addr string, resolver Resolver) *Server

New server

func (*Server) Handler

func (s *Server) Handler(writer dns.ResponseWriter, message *dns.Msg)

Handler to handle things

func (*Server) Serve

func (s *Server) Serve()

Serve server

func (*Server) SetFailover

func (s *Server) SetFailover(upstream string, domains []string)

SetFailover upstream server and list of domains

Jump to

Keyboard shortcuts

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