Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bschaatsbergen/dnsdialer
/ types & classes
Types & classes
23 in github.com/bschaatsbergen/dnsdialer
⨍
Functions
96
◇
Types & classes
23
↓ 10 callers
TypeAlias
RecordType
RecordType represents a DNS record type
recordtype.go:15
Struct
Compare
Compare queries all resolvers and detects discrepancies without failing on them.
strategy.go:41
Struct
Consensus
Consensus requires a minimum number of resolvers to return identical results.
strategy.go:25
Struct
Dialer
Dialer is the main entry point for multiplexed DNS resolution. It coordinates multiple underlying DNS resolvers using a configurable strategy, enabli
resolver.go:34
Struct
Fallback
Fallback tries resolvers sequentially in order until one succeeds.
strategy.go:38
Struct
Field
Field represents a structured logging field (key-value pair). Used to attach context to log messages.
resolver.go:66
Interface
Logger
Logger provides structured logging throughout the resolution process.
resolver.go:58
FuncType
Option
Option is a function that configures a Dialer. This package uses the functional options pattern, which provides: 1. Sensible defaults - you can creat
options.go:17
Struct
Race
Race queries all resolvers simultaneously and returns the first successful response.
strategy.go:22
Struct
Record
Record represents a DNS record with its value
recordtype.go:44
Interface
Strategy
Strategy determines how to coordinate DNS queries across multiple resolvers. All strategies implement this interface, allowing them to be swapped wit
strategy.go:17
Struct
connPool
connPool manages a pool of reusable UDP connections to a single DNS resolver. Connection pooling reduces the overhead of socket creation/destruction
connpool.go:22
Struct
dnsCache
dnsCache wraps an LRU cache with TTL-aware expiration for IP addresses. It mimics OS-level DNS caching behavior (mDNSResponder, systemd-resolved) whil
cache.go:32
Struct
ipCacheEntry
ipCacheEntry holds cached IP addresses with their expiration time. We cache the already-parsed net.IP values here so we can skip the net.ParseIP overh
cache.go:19
Struct
mockLogger
mockLogger for testing
strategy_test.go:45
Struct
mockResolver
mockResolver implements the resolver interface for testing
strategy_test.go:18
Struct
noopLogger
noopLogger is the default logger that silently discards all log messages. This allows the library to have zero logging overhead when not needed.
resolver.go:73
Struct
recordKey
recordKey is used as a map key for comparing DNS records. It combines value and TTL to enable multiset equality checking.
util.go:10
Interface
resolver
resolver is the internal interface that all DNS resolver implementations must satisfy. This abstraction allows strategies to work with any resolver i
resolver.go:19
Struct
result
race.go:20
Struct
result
resolver.go:121
Struct
resultGroup
consensus.go:21
Struct
udpResolver
udpResolver implements the resolver interface using UDP transport. It uses connection pooling to reduce socket allocation overhead and supports conte
udp.go:21