mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 19:05:19 -05:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user