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)
This commit is contained in:
parent
fa2ae3fb43
commit
2c80551fdc
4 changed files with 48 additions and 7 deletions
|
@ -26,6 +26,17 @@ type ServiceBackend interface {
|
|||
|
||||
// IsNameError return true if err indicated a record not found condition
|
||||
IsNameError(err error) bool
|
||||
|
||||
Transferer
|
||||
}
|
||||
|
||||
// Transferer defines an interface for backends that provide AXFR of all records.
|
||||
type Transferer interface {
|
||||
// Serial returns a SOA serial number to construct a SOA record.
|
||||
Serial(state request.Request) uint32
|
||||
|
||||
// MinTTL returns the minimum TTL to be used in the SOA record.
|
||||
MinTTL(state request.Request) uint32
|
||||
}
|
||||
|
||||
// Options are extra options that can be specified for a lookup.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue