aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2019-09-28 10:40:43 +0100
committerGravatar GitHub <noreply@github.com> 2019-09-28 10:40:43 +0100
commitba5d4a637271b302830e38af0092d798bd9ad668 (patch)
treeb2bebda7943bdc879653e6e5f96c45fbb64b9ef7 /plugin
parent4ff5635a6e5f5ab02498eea97323fafe4f3eccf6 (diff)
downloadcoredns-ba5d4a637271b302830e38af0092d798bd9ad668.tar.gz
coredns-ba5d4a637271b302830e38af0092d798bd9ad668.tar.zst
coredns-ba5d4a637271b302830e38af0092d798bd9ad668.zip
plugin register (#3321)
These plugins where missed in #3287 because their setup is done in a file other than setup.go Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin')
-rw-r--r--plugin/bind/bind.go9
-rw-r--r--plugin/cancel/cancel.go7
-rw-r--r--plugin/debug/debug.go7
-rw-r--r--plugin/root/root.go7
-rw-r--r--plugin/tls/tls.go7
5 files changed, 6 insertions, 31 deletions
diff --git a/plugin/bind/bind.go b/plugin/bind/bind.go
index 749561a36..cfbd36597 100644
--- a/plugin/bind/bind.go
+++ b/plugin/bind/bind.go
@@ -1,11 +1,6 @@
// Package bind allows binding to a specific interface instead of bind to all of them.
package bind
-import "github.com/caddyserver/caddy"
+import "github.com/coredns/coredns/plugin"
-func init() {
- caddy.RegisterPlugin("bind", caddy.Plugin{
- ServerType: "dns",
- Action: setup,
- })
-}
+func init() { plugin.Register("bind", setup) }
diff --git a/plugin/cancel/cancel.go b/plugin/cancel/cancel.go
index 10efabfea..98f4f2367 100644
--- a/plugin/cancel/cancel.go
+++ b/plugin/cancel/cancel.go
@@ -13,12 +13,7 @@ import (
"github.com/miekg/dns"
)
-func init() {
- caddy.RegisterPlugin("cancel", caddy.Plugin{
- ServerType: "dns",
- Action: setup,
- })
-}
+func init() { plugin.Register("cancel", setup) }
func setup(c *caddy.Controller) error {
ca := Cancel{timeout: 5001 * time.Millisecond}
diff --git a/plugin/debug/debug.go b/plugin/debug/debug.go
index 225e5f422..91cc6fcf0 100644
--- a/plugin/debug/debug.go
+++ b/plugin/debug/debug.go
@@ -7,12 +7,7 @@ import (
"github.com/caddyserver/caddy"
)
-func init() {
- caddy.RegisterPlugin("debug", caddy.Plugin{
- ServerType: "dns",
- Action: setup,
- })
-}
+func init() { plugin.Register("debug", setup) }
func setup(c *caddy.Controller) error {
config := dnsserver.GetConfig(c)
diff --git a/plugin/root/root.go b/plugin/root/root.go
index 15cc45626..66177a6bd 100644
--- a/plugin/root/root.go
+++ b/plugin/root/root.go
@@ -12,12 +12,7 @@ import (
var log = clog.NewWithPlugin("root")
-func init() {
- caddy.RegisterPlugin("root", caddy.Plugin{
- ServerType: "dns",
- Action: setup,
- })
-}
+func init() { plugin.Register("root", setup) }
func setup(c *caddy.Controller) error {
config := dnsserver.GetConfig(c)
diff --git a/plugin/tls/tls.go b/plugin/tls/tls.go
index 3231e9381..bfde8cb2a 100644
--- a/plugin/tls/tls.go
+++ b/plugin/tls/tls.go
@@ -10,12 +10,7 @@ import (
"github.com/caddyserver/caddy"
)
-func init() {
- caddy.RegisterPlugin("tls", caddy.Plugin{
- ServerType: "dns",
- Action: setup,
- })
-}
+func init() { plugin.Register("tls", setup) }
func setup(c *caddy.Controller) error {
err := parseTLS(c)