diff options
author | 2017-11-01 10:11:34 +0000 | |
---|---|---|
committer | 2017-11-01 10:11:34 +0000 | |
commit | 2c80551fdc1ac409eb11dc8dd9e7fe90fb04d90c (patch) | |
tree | 4583a46a237c794296623f86724bde56d3d79f4e /plugin/etcd/xfr.go | |
parent | fa2ae3fb4321052326a906da91df8ce8e80ae5a4 (diff) | |
download | coredns-2c80551fdc1ac409eb11dc8dd9e7fe90fb04d90c.tar.gz coredns-2c80551fdc1ac409eb11dc8dd9e7fe90fb04d90c.tar.zst coredns-2c80551fdc1ac409eb11dc8dd9e7fe90fb04d90c.zip |
plugin/{kubernetes/etcd}: dynamic SOA (#1188)
Add a dynamic SOA record (at least the serial and minttl). This create
another interface that should be implemented by the backends.
For now default to returning epoch in as a uint32 (no change from
before).
Lower the minTTL returned to 30s (from 60s)
Diffstat (limited to 'plugin/etcd/xfr.go')
-rw-r--r-- | plugin/etcd/xfr.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugin/etcd/xfr.go b/plugin/etcd/xfr.go new file mode 100644 index 000000000..43a734cf9 --- /dev/null +++ b/plugin/etcd/xfr.go @@ -0,0 +1,17 @@ +package etcd + +import ( + "time" + + "github.com/coredns/coredns/request" +) + +// Serial implements the Transferer interface. +func (e *Etcd) Serial(state request.Request) uint32 { + return uint32(time.Now().Unix()) +} + +// MinTTL implements the Transferer interface. +func (e *Etcd) MinTTL(state request.Request) uint32 { + return 30 +} |