mirror of
https://github.com/coredns/coredns.git
synced 2025-12-01 08:04:14 -05:00
plugin/auto/file/secondary: Use new upstream resolver (#1534)
* move file, auto, secondary to new upstream * include context in request
This commit is contained in:
committed by
Miek Gieben
parent
fc1d73ffa9
commit
ba573c0f40
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/file"
|
||||
"github.com/coredns/coredns/plugin/metrics"
|
||||
"github.com/coredns/coredns/plugin/proxy"
|
||||
"github.com/coredns/coredns/plugin/pkg/upstream"
|
||||
"github.com/coredns/coredns/request"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
@@ -33,7 +33,7 @@ type (
|
||||
// In the future this should be something like ZoneMeta that contains all this stuff.
|
||||
transferTo []string
|
||||
noReload bool
|
||||
proxy proxy.Proxy // Proxy for looking up names during the resolution process
|
||||
upstream upstream.Upstream // Upstream for looking up names during the resolution process
|
||||
|
||||
duration time.Duration
|
||||
}
|
||||
@@ -41,7 +41,7 @@ type (
|
||||
|
||||
// ServeDNS implements the plugin.Handle interface.
|
||||
func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
|
||||
state := request.Request{W: w, Req: r}
|
||||
state := request.Request{W: w, Req: r, Context: ctx}
|
||||
qname := state.Name()
|
||||
|
||||
// TODO(miek): match the qname better in the map
|
||||
|
||||
Reference in New Issue
Block a user