Documentation ¶
Overview ¶
Package example is a CoreDNS plugin that prints "example" to stdout on every packet received.
It serves as an example CoreDNS plugin with numerous code comments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Example ¶
Example is an example plugin to show how to write a plugin.
func (Example) Ready ¶
Ready implements the ready.Readiness interface, once this flips to true CoreDNS assumes this plugin is ready for queries; it is not checked again.
type ResponsePrinter ¶
type ResponsePrinter struct {
dns.ResponseWriter
}
ResponsePrinter wrap a dns.ResponseWriter and will write example to standard output when WriteMsg is called.
func NewResponsePrinter ¶
func NewResponsePrinter(w dns.ResponseWriter) *ResponsePrinter
NewResponsePrinter returns ResponseWriter.
func (*ResponsePrinter) WriteMsg ¶
func (r *ResponsePrinter) WriteMsg(res *dns.Msg) error
WriteMsg calls the underlying ResponseWriter's WriteMsg method and prints "example" to standard output.
Click to show internal directories.
Click to hide internal directories.