Versions in this module Expand all Collapse all v1 v1.0.2 Jan 2, 2021 Changes in this version + var ConnCacheHitsCount = promauto.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var ConnCacheMissesCount = promauto.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var ErrCachedClosed = errors.New("cached connection was closed by peer") + var ErrNoForward = errors.New("no forwarder defined") + var ErrNoHealthy = errors.New("no healthy proxies") + var HealthcheckBrokenCount = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var HealthcheckFailureCount = promauto.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var MaxConcurrentRejectCount = promauto.NewCounter(prometheus.CounterOpts{ ... }) + var RcodeCount = promauto.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var RequestCount = promauto.NewCounterVec(prometheus.CounterOpts{ ... }, []string{ ... }) + var RequestDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ ... }, []string{ ... }) + var SocketGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + type Forward struct + ErrLimitExceeded error + Next plugin.Handler + func New() *Forward + func (f *Forward) ForceTCP() bool + func (f *Forward) Len() int + func (f *Forward) List() []*Proxy + func (f *Forward) Name() string + func (f *Forward) OnShutdown() error + func (f *Forward) OnStartup() (err error) + func (f *Forward) PreferUDP() bool + func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) + func (f *Forward) SetProxy(p *Proxy) + type HealthChecker interface + Check func(*Proxy) error + GetRecursionDesired func() bool + SetRecursionDesired func(bool) + SetTLSConfig func(*tls.Config) + func NewHealthChecker(trans string, recursionDesired bool) HealthChecker + type Policy interface + List func([]*Proxy) []*Proxy + String func() string + type Proxy struct + func NewProxy(addr, trans string) *Proxy + func (p *Proxy) Connect(ctx context.Context, state request.Request, opts options) (*dns.Msg, error) + func (p *Proxy) Down(maxfails uint32) bool + func (p *Proxy) Healthcheck() + func (p *Proxy) SetExpire(expire time.Duration) + func (p *Proxy) SetTLSConfig(cfg *tls.Config) + type Transport struct + func (t *Transport) Dial(proto string) (*persistConn, bool, error) + func (t *Transport) SetExpire(expire time.Duration) + func (t *Transport) SetTLSConfig(cfg *tls.Config) + func (t *Transport) Start() + func (t *Transport) Stop() + func (t *Transport) Yield(pc *persistConn)