mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	backend.Records make it take request.Request (#943)
This is more general and aligns well with the other methods. Also allows the kubernetes middleware to use it. Fixes #940
This commit is contained in:
		| @@ -136,7 +136,7 @@ func (k *Kubernetes) Services(state request.Request, exact bool, opt middleware. | ||||
| 		return []msg.Service{svc}, nil, nil | ||||
| 	} | ||||
|  | ||||
| 	s, e := k.Entries(state) | ||||
| 	s, e := k.Records(state, false) | ||||
|  | ||||
| 	// SRV for external services is not yet implemented, so remove those records. | ||||
|  | ||||
| @@ -291,13 +291,8 @@ func (k *Kubernetes) InitKubeCache() (err error) { | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| // Records is not implemented. | ||||
| func (k *Kubernetes) Records(name string, exact bool) ([]msg.Service, error) { | ||||
| 	return nil, fmt.Errorf("not implemented") | ||||
| } | ||||
|  | ||||
| // Entries looks up services in kubernetes. | ||||
| func (k *Kubernetes) Entries(state request.Request) ([]msg.Service, error) { | ||||
| // Records looks up services in kubernetes. | ||||
| func (k *Kubernetes) Records(state request.Request, exact bool) ([]msg.Service, error) { | ||||
| 	r, e := k.parseRequest(state) | ||||
| 	if e != nil { | ||||
| 		return nil, e | ||||
|   | ||||
		Reference in New Issue
	
	Block a user