BackendService: add Reverse method (#381)
Add a Reverse method to BackendService because different backends want to to do diff. things. This allows etc/k8s to share even more code and we can unify the PTR handling.
This commit is contained in:
parent
2cca527d9f
commit
8d3418c015
6 changed files with 33 additions and 37 deletions
|
@ -330,9 +330,8 @@ func TXT(b ServiceBackend, zone string, state request.Request, opt Options) (rec
|
|||
}
|
||||
|
||||
// PTR returns the PTR records from the backend, only services that have a domain name as host are included.
|
||||
// TODO(miek|infoblox): move k8s to this as well.
|
||||
func PTR(b ServiceBackend, zone string, state request.Request, opt Options) (records []dns.RR, debug []msg.Service, err error) {
|
||||
services, debug, err := b.Services(state, true, opt)
|
||||
services, debug, err := b.Reverse(state, true, opt)
|
||||
if err != nil {
|
||||
return nil, debug, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue