MCPcopy
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
68func (c *HeartbeatClient) ShouldPing() bool {
69 c.mu.Lock()
70 defer c.mu.Unlock()
71 return time.Since(c.lastPingAt) >= c.Interval
72}
73
74func (c *HeartbeatClient) LastPingAt() time.Time {
75 c.mu.Lock()

Callers 2

sendHeartbeatIfNeededMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by 1