Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware implements a DNS forwarder for requests containing a single local name question.
func New ¶
func New(settings Settings) (middleware *Middleware, err error)
func (*Middleware) Stop ¶
func (m *Middleware) Stop() (err error)
Stop stops the middleware, and all wrapping DNS handlers created by the middleware will cease to handle requests. The function returns once all handlers are done with their previously ongoing ServeDNS calls.
func (*Middleware) String ¶
func (m *Middleware) String() string
type Settings ¶
type Settings struct { // Resolvers is the list of resolvers to use to resolve the // local domain names. They are each tried after the other // in order, until one returns an answer for the question. // If left empty, the local nameservers found are used. Resolvers []netip.AddrPort // Logger is the logger to use. // It defaults to a No-op implementation. Logger Logger }
func (*Settings) SetDefaults ¶
func (s *Settings) SetDefaults()
func (*Settings) ToLinesNode ¶
Click to show internal directories.
Click to hide internal directories.