aboutsummaryrefslogtreecommitdiff
path: root/plugin/health/setup.go
diff options
context:
space:
mode:
authorGravatar James Hartig <fastest963@gmail.com> 2017-12-12 15:40:30 -0500
committerGravatar Miek Gieben <miek@miek.nl> 2017-12-12 20:40:30 +0000
commita469a17cdfccfb435f819ebdf7ff7b43b207c8b4 (patch)
tree7fefd2e00383f8b920826af4f1f42706e0ebe82e /plugin/health/setup.go
parent99e163c37511ce48eaa7c86ba7791937e32e0a52 (diff)
downloadcoredns-a469a17cdfccfb435f819ebdf7ff7b43b207c8b4.tar.gz
coredns-a469a17cdfccfb435f819ebdf7ff7b43b207c8b4.tar.zst
coredns-a469a17cdfccfb435f819ebdf7ff7b43b207c8b4.zip
Instead of hardcoding plugin lists in autopath/health, use interfaces. (#1306)
Switched health and autopath plugin to allow any plugins to be used instead of a hardcoded list. I did not switch federation over since it wasn't obvious that anything other than kubernetes could be used with it. Fixes #1291
Diffstat (limited to 'plugin/health/setup.go')
-rw-r--r--plugin/health/setup.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/health/setup.go b/plugin/health/setup.go
index 070d5f2a1..12dd29c84 100644
--- a/plugin/health/setup.go
+++ b/plugin/health/setup.go
@@ -26,9 +26,9 @@ func setup(c *caddy.Controller) error {
h := &health{Addr: addr}
c.OnStartup(func() error {
- for he := range healthers {
- m := dnsserver.GetConfig(c).Handler(he)
- if x, ok := m.(Healther); ok {
+ plugins := dnsserver.GetConfig(c).Handlers()
+ for _, p := range plugins {
+ if x, ok := p.(Healther); ok {
h.h = append(h.h, x)
}
}