mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user