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

Method scheduleHeartbeatCheck

jetstream/pull.go:1067–1076  ·  view source on GitHub ↗
(dur time.Duration)

Source from the content-addressed store, hash-verified

1065}
1066
1067func (s *pullSubscription) scheduleHeartbeatCheck(dur time.Duration) *hbMonitor {
1068 if dur == 0 {
1069 return nil
1070 }
1071 return &hbMonitor{
1072 timer: time.AfterFunc(2*dur, func() {
1073 s.errs <- ErrNoHeartbeat
1074 }),
1075 }
1076}
1077
1078func (s *pullSubscription) cleanup() {
1079 // For now this function does not need to hold the lock.

Callers 3

ConsumeMethod · 0.95
NextMethod · 0.95
fetchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected