Versions in this module Expand all Collapse all v0 v0.1.0 Aug 30, 2026 Changes in this version + type Engine struct + func New(opts Options) (*Engine, error) + func (e *Engine) AddAllowlist(r io.Reader, source string) (policy.ListStats, error) + func (e *Engine) AddAllowlistFile(path string) (policy.ListStats, error) + func (e *Engine) AddBlocklist(r io.Reader, source string) (policy.ListStats, error) + func (e *Engine) AddBlocklistFile(path string) (policy.ListStats, error) + func (e *Engine) Allow(name string) error + func (e *Engine) AllowExact(name string) error + func (e *Engine) Block(name string) error + func (e *Engine) BlockExact(name string) error + func (e *Engine) BlockRegex(pattern string) error + func (e *Engine) ClearCache() + func (e *Engine) ClearCacheFor(name string) (int, error) + func (e *Engine) ClearRules() + func (e *Engine) Close() error + func (e *Engine) Events() *events.Bus + func (e *Engine) Handler() resolver.Handler + func (e *Engine) ListenAndServe(addr string) error + func (e *Engine) QueryLog() storage.Store + func (e *Engine) Resolve(ctx context.Context, q *dnsmsg.Message) (*dnsmsg.Message, error) + func (e *Engine) Serve(pc net.PacketConn, l net.Listener) error + func (e *Engine) Shutdown(ctx context.Context) error + func (e *Engine) Stats() Stats + type Options struct + BlockMode policy.BlockMode + CacheEntries int + Clock clock.Clock + Devices policy.Resolver + Dialer transport.Dialer + Identify func(resolver.Client) resolver.Client + Logger *slog.Logger + MaxTTL time.Duration + Middleware []resolver.Middleware + MinTTL time.Duration + QueryLog storage.Store + QueryTimeout time.Duration + Randomize bool + ServeStale time.Duration + Strategy providers.Strategy + Timeout time.Duration + Upstreams []string + type Stats struct + AllowRules int + BlockRules int + Blocked uint64 + Cache *cache.Stats + Evaluated uint64 + Queries metrics.Snapshot + Server server.Stats