mirror of
https://github.com/coredns/coredns.git
synced 2026-05-25 19:30:23 -04:00
plugin/file: trigger reload of zones based on mtime (#8085)
* Added fs.FileInfo.ModTime() based reload feature Signed-off-by: Endre Szabo <git@end.re> * Updated the plugin documentation. Signed-off-by: Endre Szabo <git@end.re> --------- Signed-off-by: Endre Szabo <git@end.re>
This commit is contained in:
@@ -15,9 +15,10 @@ import (
|
||||
|
||||
// Zone is a structure that contains all data related to a DNS zone.
|
||||
type Zone struct {
|
||||
origin string
|
||||
origLen int
|
||||
file string
|
||||
origin string
|
||||
origLen int
|
||||
file string
|
||||
file_mtime time.Time
|
||||
*tree.Tree
|
||||
Apex
|
||||
Expired bool
|
||||
@@ -28,6 +29,7 @@ type Zone struct {
|
||||
TransferFrom []string
|
||||
|
||||
ReloadInterval time.Duration
|
||||
ReloadByMtime bool
|
||||
reloadShutdown chan bool
|
||||
|
||||
Upstream *upstream.Upstream // Upstream for looking up external names during the resolution process.
|
||||
|
||||
Reference in New Issue
Block a user