MCPcopy
hub / github.com/nats-io/nats.go / scheduleHeartbeatCheck

Method scheduleHeartbeatCheck

jetstream/push.go:257–268  ·  view source on GitHub ↗
(dur time.Duration)

Source from the content-addressed store, hash-verified

255}
256
257func (s *pushSubscription) scheduleHeartbeatCheck(dur time.Duration) *hbMonitor {
258 if dur == 0 {
259 return nil
260 }
261 return &hbMonitor{
262 timer: time.AfterFunc(2*dur, func() {
263 s.Lock()
264 defer s.Unlock()
265 s.errs <- ErrNoHeartbeat
266 }),
267 }
268}

Callers 1

ConsumeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected