Remove debug queries (#1058)

* Remove debug from interface and methods

* remove debug queries from etcd

* remove debug queries from k8s - they were not used

* And remove from mw/proxy-google as well

* Remove debug query test
This commit is contained in:
Miek Gieben
2017-09-12 10:52:43 +01:00
committed by GitHub
parent c2105a4f41
commit 3e252deabb
17 changed files with 99 additions and 462 deletions

View File

@@ -30,26 +30,23 @@ type Etcd struct {
Ctx context.Context
Inflight *singleflight.Group
Stubmap *map[string]proxy.Proxy // list of proxies for stub resolving.
Debugging bool // Do we allow debug queries.
endpoints []string // Stored here as well, to aid in testing.
}
// Services implements the ServiceBackend interface.
func (e *Etcd) Services(state request.Request, exact bool, opt middleware.Options) (services, debug []msg.Service, err error) {
func (e *Etcd) Services(state request.Request, exact bool, opt middleware.Options) (services []msg.Service, err error) {
services, err = e.Records(state, exact)
if err != nil {
return
}
if opt.Debug != "" {
debug = services
}
services = msg.Group(services)
return
}
// Reverse implements the ServiceBackend interface.
func (e *Etcd) Reverse(state request.Request, exact bool, opt middleware.Options) (services, debug []msg.Service, err error) {
func (e *Etcd) Reverse(state request.Request, exact bool, opt middleware.Options) (services []msg.Service, err error) {
return e.Services(state, exact, opt)
}
@@ -66,11 +63,6 @@ func (e *Etcd) IsNameError(err error) bool {
return false
}
// Debug implements the ServiceBackend interface.
func (e *Etcd) Debug() string {
return e.PathPrefix
}
// Records looks up records in etcd. If exact is true, it will lookup just this
// name. This is used when find matches when completing SRV lookups for instance.
func (e *Etcd) Records(state request.Request, exact bool) ([]msg.Service, error) {