Skip to content

About

Go-native DNS resolver for Gnalloy with UDP, TCP fallback, hosts override, cache, and native macOS configuration provider.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

resolver-dns

简体中文 | Documentation

Go-native DNS resolver for Gnalloy with UDP, TCP fallback, hosts override, cache, and native macOS configuration provider.

This module provides name-resolution building blocks for higher-level transports and clients. It keeps DNS message parsing, exchange policy, timeout, and cache concerns explicit.

Status

  • Import path: gnalloy.org/resolver-dns
  • Repository: github.com/gnalloy/resolver-dns
  • Default branch: dev
  • Preview install: go get gnalloy.org/resolver-dns@dev
  • License: Apache-2.0

Install

go get gnalloy.org/resolver-dns@dev
go doc gnalloy.org/resolver-dns
GOWORK=off GOTOOLCHAIN=local go test ./... -count=1

Documentation

Module Boundary

This repository owns: Go-native DNS resolver for Gnalloy with UDP, TCP fallback, hosts override, cache, and native macOS configuration provider.

It does not absorb neighboring module responsibilities. Core primitives stay in gnalloy.org/gnalloy; protocol codecs, transports, handlers, resolvers, examples, and benchmarks stay in their own repositories.

Packages

  • gnalloy.org/resolver-dns (dns)
  • gnalloy.org/resolver-dns/native/macos (macos)

Gnalloy Dependencies

  • gnalloy.org/codec-dns

Common Integration Pattern

  • Configure upstream name servers, exchange timeout, cache policy, search domains, and hosts overrides according to the caller environment.
  • Network transport for DNS is explicit: UDP, TCP fallback, or QUIC depending on the resolver module in use.

Current Public Entry Points

The generated API reference lists the full public surface. Common constructors or option types currently include:

  • var ErrNoAnswer = errors.New("gnalloy/resolver/dns: no answer") ...
  • type Config struct{ ... }
  • type ResolverFactory func(Config) *Resolver
  • var ErrUnsupportedPlatform = errors.New("gnalloy/resolver/dns/native/macos: unsupported platform") ...
  • func NewResolver(ctx context.Context, cfg ResolverConfig) (*resolverdns.Resolver, error)
  • type ResolverConfig struct{ ... }

Verification

GOWORK=off GOTOOLCHAIN=local go test ./... -count=1
GOWORK=off GOTOOLCHAIN=local go vet ./...

For pressure tests, assemble this module with the relevant transport, codec, and handler stack and run the scenario from gnalloy.org/benchmarks or gnalloy.org/examples. Keep host, operating system, payload, concurrency, warmup, and repetitions in the report.

Caveats

  • This repository is intentionally narrow. Applications assemble cross-module behavior; examples and benchmark harnesses demonstrate and validate it.
  • Public APIs should remain Go-native and explicit; avoid runtime scanning, hidden global registries, and reflection-heavy behavior in hot paths.
  • Treat network input as untrusted. Configure parser limits and return typed errors instead of panics.
  • Keep benchmark claims tied to a concrete host, operating system, protocol, payload, concurrency, warmup, and repetition count.

About

Go-native DNS resolver for Gnalloy with UDP, TCP fallback, hosts override, cache, and native macOS configuration provider.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages