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

Struct service

micro/service.go:233–247  ·  view source on GitHub ↗

service represents a configured NATS service. It should be created using [Add] in order to configure the appropriate NATS subscriptions for request handler and monitoring.

Source from the content-addressed store, hash-verified

231 // It should be created using [Add] in order to configure the appropriate NATS subscriptions
232 // for request handler and monitoring.
233 service struct {
234 // Config contains a configuration of the service
235 Config
236
237 m sync.Mutex
238 id string
239 endpoints []*Endpoint
240 verbSubs map[string]*nats.Subscription
241 started time.Time
242 nc *nats.Conn
243 natsHandlers handlers
244 stopped bool
245
246 asyncDispatcher asyncCallbacksHandler
247 }
248
249 handlers struct {
250 closed nats.ConnHandler

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected