mirror of
				https://github.com/coredns/coredns.git
				synced 2025-11-03 18:53:13 -05:00 
			
		
		
		
	* middleware/proxy: give Exchange a context Make context.Context the first paramater in the Exchange method. This is inline with all other query functions. * up the version
		
			
				
	
	
		
			19 lines
		
	
	
		
			408 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			408 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package proxy
 | 
						|
 | 
						|
import (
 | 
						|
	"context"
 | 
						|
 | 
						|
	"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(ctx context.Context, addr string, state request.Request) (*dns.Msg, error)
 | 
						|
	Protocol() string
 | 
						|
 | 
						|
	OnStartup(*Proxy) error
 | 
						|
	OnShutdown(*Proxy) error
 | 
						|
}
 |