aboutsummaryrefslogtreecommitdiff
path: root/core/setup/loadbalance.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-04-19 11:13:24 +0100
committerGravatar Miek Gieben <miek@miek.nl> 2016-04-19 11:13:24 +0100
commit10db2a80df36b3d64b0b62644c91420046d827f8 (patch)
treefe34032ddd44a8a9318cbcd256afed10222dbe32 /core/setup/loadbalance.go
parent4e3c82bec56782a63fd3a503bcc4859a62020893 (diff)
downloadcoredns-10db2a80df36b3d64b0b62644c91420046d827f8.tar.gz
coredns-10db2a80df36b3d64b0b62644c91420046d827f8.tar.zst
coredns-10db2a80df36b3d64b0b62644c91420046d827f8.zip
Cache (#126)
* Add middleware/cache Add a caching middleware that caches nxdomain, nodata and successful responses. It differentiates between DNSSEC on normal DNS replies. Each reply is compress and scrubbed so it will fit the specific client asking for it. * first simple test, less exporting of stuff * more * Add middleware/cache Add a caching middleware that caches nxdomain, nodata and successful responses. It differentiates between DNSSEC on normal DNS replies. Each reply is compressed and scrubbed so it will fit the specific client asking for it. The TTL is decremented with the time spend in the cache. There is syntax that allows you to cap the TTL for all records, no matter what. This allows for a shortlived cache, just to absorb query peaks. +Tests * cache test infrastructure * Testing
Diffstat (limited to 'core/setup/loadbalance.go')
-rw-r--r--core/setup/loadbalance.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/setup/loadbalance.go b/core/setup/loadbalance.go
index 93b919e5f..4b132489b 100644
--- a/core/setup/loadbalance.go
+++ b/core/setup/loadbalance.go
@@ -5,15 +5,12 @@ import (
"github.com/miekg/coredns/middleware/loadbalance"
)
-// Root sets up the root file path of the server.
+// Loadbalance sets up the root file path of the server.
func Loadbalance(c *Controller) (middleware.Middleware, error) {
for c.Next() {
- // and choosing the correct balancer
// TODO(miek): block and option parsing
}
return func(next middleware.Handler) middleware.Handler {
return loadbalance.RoundRobin{Next: next}
}, nil
-
- return nil, nil
}