mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
This fix expose directives in dnsserver package, so that external
plugin developers could easily build customerized coredns+plugin
without changing the code base tree of coredns.
The following is an example that could bundle coredns+example,
in one simple file without modifying coredns codebase:
```
package main
import (
_ "github.com/coredns/example"
"github.com/coredns/coredns/coremain"
"github.com/coredns/coredns/core/dnsserver"
)
var directives = []string{
"example",
"log",
"errors",
...
...
...
"whoami",
"startup",
"shutdown",
}
func init() {
dnsserver.Directives = directives
}
func main() {
coremain.Run()
}
```
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
45 lines
707 B
Go
45 lines
707 B
Go
// generated by directives_generate.go; DO NOT EDIT
|
|
|
|
package dnsserver
|
|
|
|
// Directives are registered in the order they should be
|
|
// executed.
|
|
//
|
|
// Ordering is VERY important. Every plugin will
|
|
// feel the effects of all other plugin below
|
|
// (after) them during a request, but they must not
|
|
// care what plugin above them are doing.
|
|
var Directives = []string{
|
|
"tls",
|
|
"nsid",
|
|
"root",
|
|
"bind",
|
|
"debug",
|
|
"trace",
|
|
"health",
|
|
"pprof",
|
|
"prometheus",
|
|
"errors",
|
|
"log",
|
|
"dnstap",
|
|
"chaos",
|
|
"cache",
|
|
"rewrite",
|
|
"loadbalance",
|
|
"dnssec",
|
|
"autopath",
|
|
"reverse",
|
|
"hosts",
|
|
"federation",
|
|
"kubernetes",
|
|
"file",
|
|
"auto",
|
|
"secondary",
|
|
"etcd",
|
|
"proxy",
|
|
"erratic",
|
|
"whoami",
|
|
"startup",
|
|
"shutdown",
|
|
}
|