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:
parent
2eafe3ee94
commit
d536272201
19 changed files with 838 additions and 18 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/miekg/coredns/middleware/test"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
|
@ -28,7 +29,7 @@ func TestZoneReload(t *testing.T) {
|
|||
t.Fatalf("failed to parse zone: %s", err)
|
||||
}
|
||||
|
||||
z.Reload(nil)
|
||||
z.Reload()
|
||||
|
||||
if _, _, _, res := z.Lookup("miek.nl.", dns.TypeSOA, false); res != Success {
|
||||
t.Fatalf("failed to lookup, got %d", res)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue