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:
parent
b7480d5d12
commit
99287d091c
17 changed files with 980 additions and 60 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/coredns/coredns/plugin/pkg/dnstest"
|
||||
"github.com/coredns/coredns/plugin/pkg/watch"
|
||||
"github.com/coredns/coredns/plugin/test"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
|
@ -22,6 +23,9 @@ func (APIConnReverseTest) EpIndex(string) []*api.Endpoints { return nil }
|
|||
func (APIConnReverseTest) EndpointsList() []*api.Endpoints { return nil }
|
||||
func (APIConnReverseTest) ServiceList() []*api.Service { return nil }
|
||||
func (APIConnReverseTest) Modified() int64 { return 0 }
|
||||
func (APIConnReverseTest) SetWatchChan(watch.Chan) {}
|
||||
func (APIConnReverseTest) Watch(string) error { return nil }
|
||||
func (APIConnReverseTest) StopWatching(string) {}
|
||||
|
||||
func (APIConnReverseTest) SvcIndex(svc string) []*api.Service {
|
||||
if svc != "svc1.testns" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue