Forward represents a plugin instance that can proxy requests to another (DNS) server. It has a list of proxies each representing one upstream proxy.
| 34 | // Forward represents a plugin instance that can proxy requests to another (DNS) server. It has a list |
| 35 | // of proxies each representing one upstream proxy. |
| 36 | type Forward struct { |
| 37 | concurrent int64 // atomic counters need to be first in struct for proper alignment |
| 38 | |
| 39 | proxies []*proxyPkg.Proxy |
| 40 | p Policy |
| 41 | hcInterval time.Duration |
| 42 | |
| 43 | from string |
| 44 | ignored []string |
| 45 | |
| 46 | nextAlternateRcodes []int |
| 47 | nextOnNodata bool |
| 48 | |
| 49 | tlsConfig *tls.Config |
| 50 | tlsServerName string |
| 51 | maxfails uint32 |
| 52 | expire time.Duration |
| 53 | maxAge time.Duration |
| 54 | maxIdleConns int |
| 55 | maxConcurrent int64 |
| 56 | failfastUnhealthyUpstreams bool |
| 57 | failoverRcodes []int |
| 58 | maxConnectAttempts uint32 |
| 59 | |
| 60 | // Hostname resolution fields |
| 61 | resolver []string // custom resolver IPs for hostname TO resolution |
| 62 | toEntries []toEntry // ordered TO entries preserving config order |
| 63 | |
| 64 | opts proxyPkg.Options // also here for testing |
| 65 | |
| 66 | // ErrLimitExceeded indicates that a query was rejected because the number of concurrent queries has exceeded |
| 67 | // the maximum allowed (maxConcurrent) |
| 68 | ErrLimitExceeded error |
| 69 | |
| 70 | tapPlugins []*dnstap.Dnstap // when dnstap plugins are loaded, we use to this to send messages out. |
| 71 | |
| 72 | Next plugin.Handler |
| 73 | } |
| 74 | |
| 75 | // New returns a new Forward. |
| 76 | func New() *Forward { |
nothing calls this directly
no outgoing calls
no test coverage detected