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

Method Closed

jetstream/push.go:242–255  ·  view source on GitHub ↗

Closed returns a channel that is closed when consuming is fully stopped/drained. When the channel is closed, no more messages will be received and processing is complete.

()

Source from the content-addressed store, hash-verified

240// fully stopped/drained. When the channel is closed, no more messages
241// will be received and processing is complete.
242func (s *pushSubscription) Closed() <-chan struct{} {
243 s.Lock()
244 defer s.Unlock()
245 ch := s.closedCh
246 if ch == nil {
247 ch = make(chan struct{})
248 s.closedCh = ch
249 }
250 if !s.subscription.IsValid() {
251 close(s.closedCh)
252 s.closedCh = nil
253 }
254 return ch
255}
256
257func (s *pushSubscription) scheduleHeartbeatCheck(dur time.Duration) *hbMonitor {
258 if dur == 0 {

Callers

nothing calls this directly

Calls 1

IsValidMethod · 0.80

Tested by

no test coverage detected