mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 01:04:15 -04:00
19 lines
420 B
Go
19 lines
420 B
Go
|
|
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
|