mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
Cache the size and the do bit whenever someone asked for it. We can probably add more: PASS BenchmarkStateDo-4 100000000 11.9 ns/op BenchmarkStateSize-4 5000000 265 ns/op ok github.com/miekg/coredns/middleware 2.828s PASS BenchmarkStateDo-4 1000000000 2.86 ns/op BenchmarkStateSize-4 500000000 3.10 ns/op ok github.com/miekg/coredns/middleware 5.032s This PR also includes some testing cleanups as well.
etcd
etcd enabled reading zone data from an etcd instance. The data in etcd has to be encoded as
a message
like SkyDNS.
The etcd middleware makes extensive use of the proxy middleware to forward and query other servers in the network.
Syntax
etcd [zones...]
zoneszones etcd should be authoritative for.
The will default to /skydns as the path and the local etcd proxy (http://127.0.0.1:2379).
If no zones are specified the block's zone will be used as the zone.
If you want to round robin A and AAAA responses look at the loadbalance middleware.
etcd [zones...] {
stubzones
path /skydns
endpoint endpoint...
upstream address...
tls cert key cacert
}
stubzonesenable the stub zones feature.paththe path inside etcd, defaults to "/skydns".endpointthe etcd endpoints, default to "http://localhost:2397".upstreamupstream resolvers to be used resolve external names found in etcd.tlsfollowed the cert, key and the CA's cert filenames.