refactor: extract magic numbers to named constants
CI / test (pull_request) Successful in 1m43s
CI / lint (pull_request) Successful in 1m17s
CI / vulncheck (pull_request) Successful in 51s

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:
2026-06-27 15:44:03 -04:00
parent edbc2beddd
commit 50f77da131
15 changed files with 108 additions and 50 deletions
+3 -1
View File
@@ -7,6 +7,8 @@ import (
"time"
)
const dialTimeout = 10 * time.Second
var privateRanges []*net.IPNet
func init() {
@@ -60,7 +62,7 @@ func SafeDialContext(allowPrivate bool) func(ctx context.Context, network, addr
}
}
dialer := &net.Dialer{Timeout: 10 * time.Second}
dialer := &net.Dialer{Timeout: dialTimeout}
for _, ip := range ips {
target := net.JoinHostPort(ip.IP.String(), port)
conn, err := dialer.DialContext(ctx, network, target)