aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/watch.go
blob: 488540444bf1af47dde373600d1e77e6f2a0cace (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
}