Versions in this module Expand all Collapse all v0 v0.0.1 Jun 4, 2026 Changes in this version + const ErrTransportStopped + var ErrCachedClosed = errors.New("cached connection was closed by peer") + var ErrNoForward = errors.New("no forwarder defined") + var ErrNoHealthy = errors.New("no healthy proxies") + type HealthChecker interface + Check func(*Proxy) error + GetDomain func() string + GetReadTimeout func() time.Duration + GetRecursionDesired func() bool + GetTLSConfig func() *tls.Config + GetWriteTimeout func() time.Duration + SetDomain func(domain string) + SetReadTimeout func(time.Duration) + SetRecursionDesired func(bool) + SetTCPTransport func() + SetTLSConfig func(*tls.Config) + SetWriteTimeout func(time.Duration) + func NewHealthChecker(proxyName, trans string, recursionDesired bool, domain string) HealthChecker + type Options struct + ForceTCP bool + HCDomain string + HCRecursionDesired bool + PreferUDP bool + type Proxy struct + func NewProxy(proxyName, addr, trans string) *Proxy + func (p *Proxy) Addr() string + 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) Fails() uint32 + func (p *Proxy) GetHealthchecker() HealthChecker + func (p *Proxy) GetTransport() *Transport + func (p *Proxy) Healthcheck() + func (p *Proxy) SetExpire(expire time.Duration) + func (p *Proxy) SetMaxAge(maxAge time.Duration) + func (p *Proxy) SetMaxIdleConns(n int) + func (p *Proxy) SetReadTimeout(duration time.Duration) + func (p *Proxy) SetTLSConfig(cfg *tls.Config) + func (p *Proxy) Start(duration time.Duration) + func (p *Proxy) Stop() + type Transport struct + func (t *Transport) Dial(proto string) (*persistConn, bool, error) + func (t *Transport) GetTLSConfig() *tls.Config + func (t *Transport) SetExpire(expire time.Duration) + func (t *Transport) SetMaxAge(maxAge time.Duration) + func (t *Transport) SetMaxIdleConns(n int) + func (t *Transport) SetTLSConfig(cfg *tls.Config) + func (t *Transport) Start() + func (t *Transport) Stop() + func (t *Transport) Yield(pc *persistConn)