aboutsummaryrefslogtreecommitdiff
path: root/middleware/proxy/exchanger.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-02-06 19:32:48 +0000
committerGravatar GitHub <noreply@github.com> 2017-02-06 19:32:48 +0000
commit123a76c91ead7fb57e801f974a16fc3ab8312c0d (patch)
tree0b84ec261ad06e8e747c154264fca84043d07aaa /middleware/proxy/exchanger.go
parent77f957d443f9c287abc1f315cebc0c725e9e4ba0 (diff)
downloadcoredns-123a76c91ead7fb57e801f974a16fc3ab8312c0d.tar.gz
coredns-123a76c91ead7fb57e801f974a16fc3ab8312c0d.tar.zst
coredns-123a76c91ead7fb57e801f974a16fc3ab8312c0d.zip
middleware/proxy: absorb httpproxy (#481)
* middleware/proxy: absorb httpproxy Move the httproxy into proxy. This adds and Exchanger interface which is used to exchange the messages with the upstream. The https_google upstream will re-resolve itself and update the upstream hosts used every 300s. * Remove and add TODO
Diffstat (limited to 'middleware/proxy/exchanger.go')
-rw-r--r--middleware/proxy/exchanger.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/middleware/proxy/exchanger.go b/middleware/proxy/exchanger.go
index 29974a289..78c80b8b6 100644
--- a/middleware/proxy/exchanger.go
+++ b/middleware/proxy/exchanger.go
@@ -8,11 +8,9 @@ import (
// Exchanger is an interface that specifies a type implementing a DNS resolver that
// can use whatever transport it likes.
type Exchanger interface {
- Exchange(request.Request) (*dns.Msg, error)
- SetUpstream(Upstream) error // (Re)set the upstream
- OnStartup() error
- OnShutdown() error
- Protocol() protocol
-}
+ Exchange(addr string, state request.Request) (*dns.Msg, error)
+ Protocol() string
-type protocol string
+ OnStartup(*Proxy) error
+ OnShutdown(*Proxy) error
+}