Documentation ¶
Index ¶
- type Server
- func (srv *Server) Add(name string, zone *zones.Zone)
- func (srv *Server) ListenAndServe(ctx context.Context, ip string) error
- func (srv *Server) Remove(name string)
- func (srv *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
- func (srv *Server) SetQueryLogger(logger querylog.QueryLogger)
- func (srv *Server) Shutdown() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { PublicDebugQueries bool // contains filtered or unexported fields }
Server ...
func (*Server) ListenAndServe ¶
ListenAndServe starts the DNS server on the specified IP (both tcp and udp). It returns an error if something goes wrong.
func (*Server) ServeDNS ¶
func (srv *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
ServeDNS calls ServeDNS in the dns package
func (*Server) SetQueryLogger ¶
func (srv *Server) SetQueryLogger(logger querylog.QueryLogger)
SetQueryLogger configures the query logger. For now it only supports writing to a file (and all zones get logged to the same file).
Click to show internal directories.
Click to hide internal directories.