Documentation
¶
Index ¶
Constants ¶
View Source
const ( DomainFileFormatHostfile = "hostfile" DomainFileFormatTextList = "text" DomainSourceTypeFile = "file" DomainSourceTypeURL = "url" )
View Source
const MaxJitterPercent = 30
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoMapWarnlist ¶
type GoMapWarnlist struct {
// contains filtered or unexported fields
}
func (*GoMapWarnlist) Add ¶
func (m *GoMapWarnlist) Add(key string)
func (*GoMapWarnlist) Close ¶
func (m *GoMapWarnlist) Close() error
func (*GoMapWarnlist) Contains ¶
func (m *GoMapWarnlist) Contains(key string) bool
func (*GoMapWarnlist) Len ¶
func (m *GoMapWarnlist) Len() int
func (*GoMapWarnlist) Open ¶
func (m *GoMapWarnlist) Open()
type MPHWarnlist ¶
type MPHWarnlist struct {
// contains filtered or unexported fields
}
func (*MPHWarnlist) Add ¶
func (m *MPHWarnlist) Add(key string)
func (*MPHWarnlist) Close ¶
func (m *MPHWarnlist) Close() error
func (*MPHWarnlist) Contains ¶
func (m *MPHWarnlist) Contains(key string) bool
func (*MPHWarnlist) Len ¶
func (m *MPHWarnlist) Len() int
func (*MPHWarnlist) Open ¶
func (m *MPHWarnlist) Open()
type PluginOptions ¶
type PluginOptions struct { DomainSource string DomainSourceType string FileFormat string MatchSubdomains bool ReloadPeriod time.Duration }
PluginOptions stores the configuration options given in the corefile
type RadixWarnlist ¶
type RadixWarnlist struct {
// contains filtered or unexported fields
}
func (*RadixWarnlist) Add ¶
func (r *RadixWarnlist) Add(key string)
func (*RadixWarnlist) Close ¶
func (r *RadixWarnlist) Close() error
func (*RadixWarnlist) Contains ¶
func (r *RadixWarnlist) Contains(key string) bool
func (*RadixWarnlist) Len ¶
func (r *RadixWarnlist) Len() int
func (*RadixWarnlist) Open ¶
func (r *RadixWarnlist) Open()
type ResponsePrinter ¶
type ResponsePrinter struct {
dns.ResponseWriter
}
ResponsePrinter wraps a dns.ResponseWriter and will let the plugin inspect the response.
func NewResponsePrinter ¶
func NewResponsePrinter(w dns.ResponseWriter) *ResponsePrinter
NewResponsePrinter returns ResponseWriter.
type Warnlist ¶
type Warnlist interface { Add(key string) Contains(key string) bool Close() error Len() int Open() }
func NewRadixWarnlist ¶
func NewRadixWarnlist() Warnlist
func NewWarnlist ¶
func NewWarnlist() Warnlist
type WarnlistPlugin ¶
type WarnlistPlugin struct { Next plugin.Handler Options PluginOptions // contains filtered or unexported fields }
WarnlistPlugin is a plugin which counts requests to warnlisted domains
func (WarnlistPlugin) Name ¶
func (wp WarnlistPlugin) Name() string
Name implements the Handler interface.
func (WarnlistPlugin) Ready ¶
func (wp WarnlistPlugin) Ready() bool
Ready implements the ready.Readiness interface, once this flips to true CoreDNS assumes this plugin is ready for queries; it is not checked again.
Click to show internal directories.
Click to hide internal directories.