aboutsummaryrefslogtreecommitdiff
path: root/middleware/file/zone.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2016-04-05 10:53:23 +0100
committerGravatar Miek Gieben <miek@miek.nl> 2016-04-05 10:53:23 +0100
commitc961acbb6e9e06279d3dca077ba47d8a6170da20 (patch)
tree8cbcb55515965a94d3fb0395a7d54e7e4e84c2a0 /middleware/file/zone.go
parent20e16491ec7495adc07aef7d506463f15a2b6733 (diff)
downloadcoredns-c961acbb6e9e06279d3dca077ba47d8a6170da20.tar.gz
coredns-c961acbb6e9e06279d3dca077ba47d8a6170da20.tar.zst
coredns-c961acbb6e9e06279d3dca077ba47d8a6170da20.zip
Add complete secondary support
Respond to notifies and allow a secondary to follow the SOA parameters to update a zone from a primary. Also sprinkle it with logging. Also extend monitoring to include qtype in more metrics.
Diffstat (limited to 'middleware/file/zone.go')
-rw-r--r--middleware/file/zone.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/middleware/file/zone.go b/middleware/file/zone.go
index 3d291ba33..57d0cd4a0 100644
--- a/middleware/file/zone.go
+++ b/middleware/file/zone.go
@@ -25,6 +25,15 @@ func NewZone(name string) *Zone {
return z
}
+// Copy copies a zone *without* copying the zone's content. It is not a deep copy.
+func (z *Zone) Copy() *Zone {
+ z1 := NewZone(z.name)
+ z1.TransferTo = z.TransferTo
+ z1.TransferFrom = z.TransferFrom
+ z1.Expired = z.Expired
+ return z1
+}
+
// Insert inserts r into z.
func (z *Zone) Insert(r dns.RR) { z.Tree.Insert(r) }