Documentation
¶
Overview ¶
Package server aids writing DNS servers
Index ¶
Constants ¶
View Source
const ( // DefaultLookupTimeout is the maximum time INET lookups // can take unless [Handler.Timeout] is specified DefaultLookupTimeout = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { Hostname string Version string Authors string Context context.Context Timeout time.Duration Lookuper resolver.Lookuper Extra map[uint16]dns.HandlerFunc RemoteAddr *core.ContextKey[netip.Addr] }
Handler provides a dns.Handler for dns.ServeMux
func (*Handler) ServeDNS ¶
func (h *Handler) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
ServeDNS handles requests passed by dns.ServeMUX
func (*Handler) SetDefaults ¶
func (h *Handler) SetDefaults()
SetDefaults fills gaps in the Handler struct
Click to show internal directories.
Click to hide internal directories.