Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/benbjohnson/litestream
/ ShouldPing
Method
ShouldPing
heartbeat.go:68–72 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
66
}
67
68
func
(c *HeartbeatClient) ShouldPing() bool {
69
c.mu.Lock()
70
defer
c.mu.Unlock()
71
return
time.Since(c.lastPingAt) >= c.Interval
72
}
73
74
func
(c *HeartbeatClient) LastPingAt() time.Time {
75
c.mu.Lock()
Callers
2
TestHeartbeatClient_ShouldPing
Function · 0.95
sendHeartbeatIfNeeded
Method · 0.80
Calls
2
Lock
Method · 0.45
Unlock
Method · 0.45
Tested by
1
TestHeartbeatClient_ShouldPing
Function · 0.76