0.1.52 Gateway

This commit is contained in:
ponzischeme89
2026-08-17 19:09:17 +12:00
parent d5a8d3ad88
commit 1da91e40a1
46 changed files with 1626 additions and 106 deletions
+22
View File
@@ -63,6 +63,28 @@ func (h *embyHealth) begin(interval time.Duration, now time.Time) {
}
}
// retune follows the operator changing the probe's cadence, or switching it off, without
// disturbing what the probe has already found. It is deliberately not `begin`: that
// starts a fresh watch and drops the Emby version with it, which the About page reads and
// which is still true whatever the interval is now.
func (h *embyHealth) retune(interval time.Duration, now time.Time) {
h.mu.Lock()
defer h.mu.Unlock()
if interval <= 0 {
h.state.monitored = false
h.state.retryEvery = 0
return
}
if !h.state.monitored {
h.state = embyHealthState{
monitored: true, reachable: true, since: now, retryEvery: interval,
version: h.state.version,
}
return
}
h.state.retryEvery = interval
}
// record folds one probe result in and reports whether the published verdict changed.
func (h *embyHealth) record(ok bool, version string, now time.Time) {
h.mu.Lock()