Abstract the caddy call and make it simpler.
See #3261 for some part of the discussion.
Go from:
~~~ go
func init() {
caddy.RegisterPlugin("any", caddy.Plugin{
ServerType: "dns",
Action: setup,
})
}
~~~
To:
~~~ go
func init() { plugin.Register("any", setup) }
~~~
This requires some external documents in coredns.io to be updated as
well; the old way still works, so it's backwards compatible.
Signed-off-by: Miek Gieben <miek@miek.nl>
* Update Caddy to 1.0.1, and update import path
This fix updates caddy to 1.0.1 and also
updates the import path to github.com/caddyserver/caddy
This fix fixes 2959
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Also update plugin.cfg
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update and bump zplugin.go
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* plugins: Return error for multiple use of some
Return plugin.ErrOnce when a plugin that doesn't support it, is called
mutliple times.
This now adds it for: cache, dnssec, errors, forward, hosts, nsid.
And changes it slightly in kubernetes, pprof, reload, root.
* more tests
* Add NSID plugin support for CoreDNS
This fix adds NSID plugin support for CoreDNS, as was proposed
in 1256.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for NSID plugin
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Generate code for NSID plugin
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Use hostname as the default (as with bind), and remove unneeded copy
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add README.md
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>