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:
parent
627687b11f
commit
7c343982a6
4 changed files with 14 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue