Versions in this module Expand all Collapse all v0 v0.0.2 Oct 1, 2023 v0.0.1 Sep 30, 2023 Changes in this version + const ErrUpstream + const ReqFQDN + const ReqHost + func HostToIPs(host string) (ipv4, ipv6 netip.Addr) + func MatchedResponse(req *dns.Msg, qt uint16, targ, answer string) (resp *dns.Msg) + func ReplaceLogLevel(t testing.TB, l log.Level) + func ReplaceLogWriter(t testing.TB, w io.Writer) + func StartHTTPServer(t testing.TB, data []byte) (c *http.Client, u *url.URL) + type AddressProcessor struct + OnClose func() (err error) + OnProcess func(ip netip.Addr) + func (p *AddressProcessor) Close() (err error) + func (p *AddressProcessor) Process(ip netip.Addr) + type AddressUpdater struct + OnUpdateAddress func(ip netip.Addr, host string, info *whois.Info) + func (p *AddressUpdater) UpdateAddress(ip netip.Addr, host string, info *whois.Info) + type Exchanger struct + OnExchange func(ip netip.Addr) (host string, ttl time.Duration, err error) + func (e *Exchanger) Exchange(ip netip.Addr) (host string, ttl time.Duration, err error) + type FSWatcher struct + OnAdd func(name string) (err error) + OnClose func() (err error) + OnEvents func() (e <-chan struct{}) + func (w *FSWatcher) Add(name string) (err error) + func (w *FSWatcher) Close() (err error) + func (w *FSWatcher) Events() (e <-chan struct{}) + type Resolver struct + OnLookupIP func(ctx context.Context, network, host string) (ips []net.IP, err error) + func (r *Resolver) LookupIP(ctx context.Context, network, host string) (ips []net.IP, err error) + type ServiceWithConfig struct + OnConfig func() (c ConfigType) + OnShutdown func(ctx context.Context) (err error) + OnStart func() (err error) + func (s *ServiceWithConfig[ConfigType]) Config() (c ConfigType) + func (s *ServiceWithConfig[_]) Shutdown(ctx context.Context) (err error) + func (s *ServiceWithConfig[_]) Start() (err error) + type Upstream struct + CName map[string][]string + IPv4 map[string][]net.IP + IPv6 map[string][]net.IP + func (u *Upstream) Address() string + func (u *Upstream) Close() (err error) + func (u *Upstream) Exchange(m *dns.Msg) (resp *dns.Msg, err error) + type UpstreamMock struct + OnAddress func() (addr string) + OnClose func() (err error) + OnExchange func(req *dns.Msg) (resp *dns.Msg, err error) + func NewBlockUpstream(hostname string, shouldBlock bool) (u *UpstreamMock) + func NewErrorUpstream() (u *UpstreamMock) + func NewUpstreamMock(onExc func(req *dns.Msg) (resp *dns.Msg, err error)) (u *UpstreamMock) + func (u *UpstreamMock) Address() (addr string) + func (u *UpstreamMock) Close() (err error) + func (u *UpstreamMock) Exchange(req *dns.Msg) (resp *dns.Msg, err error)