diff options
Diffstat (limited to 'plugin/kubernetes/watch.go')
-rw-r--r-- | plugin/kubernetes/watch.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/plugin/kubernetes/watch.go b/plugin/kubernetes/watch.go new file mode 100644 index 000000000..488540444 --- /dev/null +++ b/plugin/kubernetes/watch.go @@ -0,0 +1,20 @@ +package kubernetes + +import ( + "github.com/coredns/coredns/plugin/pkg/watch" +) + +// SetWatchChan implements watch.Watchable +func (k *Kubernetes) SetWatchChan(c watch.Chan) { + k.APIConn.SetWatchChan(c) +} + +// Watch is called when a watch is started for a name. +func (k *Kubernetes) Watch(qname string) error { + return k.APIConn.Watch(qname) +} + +// StopWatching is called when no more watches remain for a name +func (k *Kubernetes) StopWatching(qname string) { + k.APIConn.StopWatching(qname) +} |