Documentation
¶
Overview ¶
Package server provides a DNS server implementation that handles DNS queries. To answer a query, the server asks the provided Backend for DNS records, which are then converted to the proper answers.
Index ¶
Constants ¶
View Source
const ( SCacheCapacity = 10000 RCacheCapacity = 100000 RCacheTtl = 60 )
View Source
const Version = "2.5.1a"
Variables ¶
This section is empty.
Functions ¶
func Metrics ¶ added in v1.0.2
func Metrics()
func ParseKeyFile ¶
ParseKeyFile read a DNSSEC keyfile as generated by dnssec-keygen or other utilities. It add ".key" for the public key and ".private" for the private key.
Types ¶
type Backend ¶
type Config ¶
type Config struct {
// The ip:port SkyDNS should be listening on for incoming DNS requests.
DnsAddr string `json:"dns_addr,omitempty"`
// bind to port(s) activated by systemd. If set to true, this overrides DnsAddr.
Systemd bool `json:"systemd,omitempty"`
// The domain SkyDNS is authoritative for, defaults to skydns.local.
Domain string `json:"domain,omitempty"`
// Domain pointing to a key where service info is stored when being queried
// for local.dns.skydns.local.
Local string `json:"local,omitempty"`
// The hostmaster responsible for this domain, defaults to hostmaster.<Domain>.
Hostmaster string `json:"hostmaster,omitempty"`
DNSSEC string `json:"dnssec,omitempty"`
// Round robin A/AAAA replies. Default is true.
RoundRobin bool `json:"round_robin,omitempty"`
// List of ip:port, seperated by commas of recursive nameservers to forward queries to.
Nameservers []string `json:"nameservers,omitempty"`
// Never provide a recursive service.
NoRec bool `json:norec,omitempty"`
ReadTimeout time.Duration `json:"read_timeout,omitempty"`
// Default priority on SRV records when none is given. Defaults to 10.
Priority uint16 `json:"priority"`
// Default TTL, in seconds, when none is given in etcd. Defaults to 3600.
Ttl uint32 `json:"ttl,omitempty"`
// Minimum TTL, in seconds, for NXDOMAIN responses. Defaults to 300.
MinTtl uint32 `json:"min_ttl,omitempty"`
// SCache, capacity of the signature cache in signatures stored.
SCache int `json:"scache,omitempty"`
// RCache, capacity of response cache in resource records stored.
RCache int `json:"rcache,omitempty"`
// RCacheTtl, how long to cache in seconds.
RCacheTtl int `json:"rcache_ttl,omitempty"`
// How many labels a name should have before we allow forwarding. Default to 2.
Ndots int `json:"ndot,omitempty"`
// DNSSEC key material
PubKey *dns.DNSKEY `json:"-"`
KeyTag uint16 `json:"-"`
PrivKey dns.PrivateKey `json:"-"`
Verbose bool `json:"-"`
// contains filtered or unexported fields
}
Config provides options to the SkyDNS resolver.
type Counter ¶
type Counter interface {
Inc(i int64)
}
Counter is the metric interface used by this package
var ( StatsForwardCount Counter = nopCounter{} StatsStubForwardCount Counter = nopCounter{} StatsLookupCount Counter = nopCounter{} StatsRequestCount Counter = nopCounter{} StatsDnssecOkCount Counter = nopCounter{} StatsNameErrorCount Counter = nopCounter{} StatsNoDataCount Counter = nopCounter{} StatsDnssecCacheMiss Counter = nopCounter{} )
These are the old stat variables defined by this package. This used by graphite.
Source Files
¶
- config.go
- dnssec.go
- doc.go
- forwarding.go
- nsec3.go
- server.go
- singleinflight.go
- stats.go
- stub.go
Click to show internal directories.
Click to hide internal directories.