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:
Endre Szabo
2026-05-20 04:43:46 +02:00
committed by GitHub
parent ee7ff82cf5
commit 35391dd8a9
6 changed files with 283 additions and 4 deletions

View File

@@ -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.