refactor: extract magic numbers to named constants
Replace inline numeric literals with named constants across 14 files: server timeouts/rate limits, cluster thresholds/intervals, DB pool sizes, alert/dial timeouts, TUI uptime thresholds, node status thresholds, and state history limits.
This commit was merged in pull request #153.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package tui
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
nodeOnlineThreshold = 60 * time.Second
|
||||
nodeStaleThreshold = 5 * time.Minute
|
||||
|
||||
uptimeGoodPct = 99.0
|
||||
uptimeExcellentPct = 99.9
|
||||
uptimeWarnPct = 95.0
|
||||
uptimePrecisionPct = 99.99
|
||||
|
||||
stateHistoryLookback = 30 * 24 * time.Hour
|
||||
stateHistoryDays = 30
|
||||
stateHistoryLimit = 100
|
||||
|
||||
httpErrorThreshold = 400
|
||||
errorDetailMaxLen = 30
|
||||
)
|
||||
Reference in New Issue
Block a user