Add Stub resolving

SkyDNS can forward requests from one instance to another.
Add this base infrastructure for this feature to CoreDNS.

Add more tests as well.
This commit is contained in:
Miek Gieben
2016-03-24 08:22:24 +00:00
parent 163e5d8e71
commit 78d2e31ec1
6 changed files with 380 additions and 241 deletions

View File

@@ -28,7 +28,6 @@ func (e Etcd) A(zone string, state middleware.State, previousRecords []dns.RR) (
// x CNAME x is a direct loop, don't add those
continue
}
println("TRYING TO ADD CNAME", len(previousRecords))
newRecord := serv.NewCNAME(state.QName(), serv.Host)
if len(previousRecords) > 7 {
@@ -54,7 +53,6 @@ func (e Etcd) A(zone string, state middleware.State, previousRecords []dns.RR) (
target := newRecord.Target
if dns.IsSubDomain(zone, target) {
// We should already have found it
println("DIDN'T FOUND IT")
continue
}
m1, e1 := e.Proxy.Lookup(state, target, state.QType())