srvdns

package
v0.0.0-...-62f2ae4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Shared *shared.Shared
}

func (*Server) ServeDNS

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

type ServerPtr

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

ServerPtr maintains an atomic pointer to a real server, which may be safely swapped while running to hot-reload config.

func NewPtr

func NewPtr(sv *Server) *ServerPtr

NewPtr creates a new ServerPtr from a Server.

func (*ServerPtr) ServeDNS

func (sv *ServerPtr) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

ServeDNS serves DNS by calling the underlying Server.

func (*ServerPtr) Set

func (sp *ServerPtr) Set(svr *Server)

Set atomically sets the underlying Server of the ServerPtr. This may safely be called by multiple goroutines, while ServerPtr is serving.

Jump to

Keyboard shortcuts

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