mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Watch feature (#1527)
* Add part 1 watch functionality. (squashed) * add funcs for service/endpoint fqdns * add endpoints watch * document exposed funcs * only send subset deltas * locking for watch map * tests and docs * add pod watch * remove debugs prints * feedback part 1 * add error reporting to proto * inform clients of server stop+errors * add grpc options param * use proper context * Review feedback: * Removed client (will move to another repo) * Use new log functions * Change watchChan to be for string not []string * Rework how k8s plugin stores watch tracking info to simplify * Normalize the qname on watch request * Add blank line back * Revert another spurious change * Fix tests * Add stop channel. Fix tests. Better docs for plugin interface. * fmt.Printf -> log.Warningf * Move from dnsserver to plugin/pkg/watch * gofmt * remove dead client watches * sate linter * linter omg
This commit is contained in:
@@ -3,6 +3,8 @@ package kubernetes
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/coredns/coredns/plugin/pkg/watch"
|
||||
|
||||
api "k8s.io/api/core/v1"
|
||||
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
@@ -18,6 +20,9 @@ func (APIConnTest) SvcIndexReverse(string) []*api.Service { return nil }
|
||||
func (APIConnTest) EpIndex(string) []*api.Endpoints { return nil }
|
||||
func (APIConnTest) EndpointsList() []*api.Endpoints { return nil }
|
||||
func (APIConnTest) Modified() int64 { return 0 }
|
||||
func (APIConnTest) SetWatchChan(watch.Chan) {}
|
||||
func (APIConnTest) Watch(string) error { return nil }
|
||||
func (APIConnTest) StopWatching(string) {}
|
||||
|
||||
func (APIConnTest) ServiceList() []*api.Service {
|
||||
svcs := []*api.Service{
|
||||
|
||||
Reference in New Issue
Block a user