diff options
Diffstat (limited to 'middleware/proxy/exchanger.go')
-rw-r--r-- | middleware/proxy/exchanger.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/middleware/proxy/exchanger.go b/middleware/proxy/exchanger.go new file mode 100644 index 000000000..29974a289 --- /dev/null +++ b/middleware/proxy/exchanger.go @@ -0,0 +1,18 @@ +package proxy + +import ( + "github.com/miekg/coredns/request" + "github.com/miekg/dns" +) + +// 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 +} + +type protocol string |