mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
19 lines
344 B
Go
19 lines
344 B
Go
|
|
package dnsserver
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/coredns/coredns/plugin/pkg/watch"
|
||
|
|
)
|
||
|
|
|
||
|
|
func watchables(zones map[string]*Config) []watch.Watchable {
|
||
|
|
var w []watch.Watchable
|
||
|
|
for _, config := range zones {
|
||
|
|
plugins := config.Handlers()
|
||
|
|
for _, p := range plugins {
|
||
|
|
if x, ok := p.(watch.Watchable); ok {
|
||
|
|
w = append(w, x)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return w
|
||
|
|
}
|