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

Function unwrapConnectionEventCallbacks

micro/service.go:611–617  ·  view source on GitHub ↗
(nc *nats.Conn, handlers handlers)

Source from the content-addressed store, hash-verified

609}
610
611func unwrapConnectionEventCallbacks(nc *nats.Conn, handlers handlers) {
612 if nc.IsClosed() {
613 return
614 }
615 nc.SetClosedHandler(handlers.closed)
616 nc.SetErrorHandler(handlers.asyncErr)
617}
618
619func (s *service) matchSubscriptionSubject(subj string) (*Endpoint, bool) {
620 s.m.Lock()

Callers 1

StopMethod · 0.85

Calls 3

IsClosedMethod · 0.80
SetErrorHandlerMethod · 0.80
SetClosedHandlerMethod · 0.45

Tested by

no test coverage detected