Documentation
¶
Index ¶
Constants ¶
View Source
const TypeALIAS uint16 = 65280
Custom DNS record type for ALIAS records. Based on Private Use range on the link below. https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alias ¶
type Resolver ¶ added in v0.5.0
type Resolver struct {
// contains filtered or unexported fields
}
Resolver resolves ALIAS targets to A/AAAA records with caching.
func NewResolver ¶ added in v0.5.0
func NewResolver(cfg ResolverConfig) *Resolver
NewResolver creates a new ALIAS resolver.
func (*Resolver) Purge ¶ added in v0.5.0
func (r *Resolver) Purge()
Purge removes all entries from the cache.
func (*Resolver) PurgeTarget ¶ added in v0.5.0
PurgeTarget removes cached entries for a specific target.
type ResolverConfig ¶ added in v0.5.0
type ResolverConfig struct {
// Upstream DNS servers to query. If empty, uses system resolvers.
Upstreams []string
// MinTTL is the minimum cache TTL. Responses with lower TTL will use this value.
// Default: 30 seconds.
MinTTL time.Duration
// MaxTTL is the maximum cache TTL. Responses with higher TTL will be capped.
// Default: 1 hour.
MaxTTL time.Duration
// Timeout for upstream DNS queries.
// Default: 5 seconds.
Timeout time.Duration
}
ResolverConfig configures the ALIAS resolver.
Click to show internal directories.
Click to hide internal directories.