This commit is contained in:
mr
2026-03-11 19:29:39 +01:00
parent d0af40f4c7
commit 780a0c530d
13 changed files with 51 additions and 997 deletions

View File

@@ -18,9 +18,10 @@ const MaxPayloadChallenge = 2048
const BaseRoundTrip = 400 * time.Millisecond
type UptimeTracker struct {
FirstSeen time.Time
LastSeen time.Time
TotalOnline time.Duration
FirstSeen time.Time
LastSeen time.Time
TotalOnline time.Duration
ConsecutiveFails int // incremented on each heartbeat failure; reset to 0 on success
}
// RecordHeartbeat accumulates online time gap-aware: only counts the interval if