middleware/auto: add (#333)

Add auto-load middleware that automatically picks up zones.

Every X seconds it will scan for new zones.
Add tests and documentation.

Make 'make test' use -race.
This commit is contained in:
Miek Gieben 2016-10-17 18:37:56 +01:00 committed by GitHub
parent 2eafe3ee94
commit d536272201
19 changed files with 838 additions and 18 deletions

View file

@ -22,7 +22,6 @@ func fakeStubServerExampleNet(t *testing.T) (*dns.Server, string) {
}
// add handler for example.net
dns.HandleFunc("example.net.", func(w dns.ResponseWriter, r *dns.Msg) {
t.Logf("writing response for example.net.")
m := new(dns.Msg)
m.SetReply(r)
m.Answer = []dns.RR{test.A("example.net. 86400 IN A 93.184.216.34")}