mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	plugin/forward: Allow Proxy to be used outside of forward plugin. (#5951)
* plugin/forward: Move Proxy into pkg/plugin/proxy, to allow forward.Proxy to be used outside of forward plugin. Signed-off-by: Patrick Downey <patrick.downey@dioadconsulting.com>
This commit is contained in:
		
							
								
								
									
										26
									
								
								plugin/pkg/proxy/errors.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								plugin/pkg/proxy/errors.go
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| package proxy | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| 	// ErrNoHealthy means no healthy proxies left. | ||||
| 	ErrNoHealthy = errors.New("no healthy proxies") | ||||
| 	// ErrNoForward means no forwarder defined. | ||||
| 	ErrNoForward = errors.New("no forwarder defined") | ||||
| 	// ErrCachedClosed means cached connection was closed by peer. | ||||
| 	ErrCachedClosed = errors.New("cached connection was closed by peer") | ||||
| ) | ||||
|  | ||||
| // Options holds various Options that can be set. | ||||
| type Options struct { | ||||
| 	// ForceTCP use TCP protocol for upstream DNS request. Has precedence over PreferUDP flag | ||||
| 	ForceTCP bool | ||||
| 	// PreferUDP use UDP protocol for upstream DNS request. | ||||
| 	PreferUDP bool | ||||
| 	// HCRecursionDesired sets recursion desired flag for Proxy healthcheck requests | ||||
| 	HCRecursionDesired bool | ||||
| 	// HCDomain sets domain for Proxy healthcheck requests | ||||
| 	HCDomain string | ||||
| } | ||||
		Reference in New Issue
	
	Block a user