mirror of
https://github.com/coredns/coredns.git
synced 2025-11-07 20:46:59 -05:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user