mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
ServiceBackend interface (#369)
* Add ServiceBackend interface This adds a ServiceBackend interface that is shared between etcd/etcd3 (later) and kubernetes, leading to a massive reduction in code. When returning the specific records from their backend. Fixes #273
This commit is contained in:
@@ -54,9 +54,9 @@ func New(hosts []string) Proxy {
|
||||
|
||||
// Lookup will use name and type to forge a new message and will send that upstream. It will
|
||||
// set any EDNS0 options correctly so that downstream will be able to process the reply.
|
||||
func (p Proxy) Lookup(state request.Request, name string, tpe uint16) (*dns.Msg, error) {
|
||||
func (p Proxy) Lookup(state request.Request, name string, typ uint16) (*dns.Msg, error) {
|
||||
req := new(dns.Msg)
|
||||
req.SetQuestion(name, tpe)
|
||||
req.SetQuestion(name, typ)
|
||||
state.SizeAndDo(req)
|
||||
|
||||
return p.lookup(state, req)
|
||||
|
||||
Reference in New Issue
Block a user