feat(watcher): log auth field changes on reload

Cache parsed auth contents and compute redacted diffs for prefix, proxy_url,
and disabled when auth files are added or updated.
This commit is contained in:
hkfires
2026-02-04 12:29:56 +08:00
parent 1548c567ab
commit 4af712544d
3 changed files with 80 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ type Watcher struct {
reloadCallback func(*config.Config)
watcher *fsnotify.Watcher
lastAuthHashes map[string]string
lastAuthContents map[string]*coreauth.Auth
lastRemoveTimes map[string]time.Time
lastConfigHash string
authQueue chan<- AuthUpdate