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

Method Info

micro/service.go:755–775  ·  view source on GitHub ↗

Info returns information about the service

()

Source from the content-addressed store, hash-verified

753
754// Info returns information about the service
755func (s *service) Info() Info {
756 s.m.Lock()
757 defer s.m.Unlock()
758
759 endpoints := make([]EndpointInfo, 0, len(s.endpoints))
760 for _, e := range s.endpoints {
761 endpoints = append(endpoints, EndpointInfo{
762 Name: e.Name,
763 Subject: e.Subject,
764 QueueGroup: e.QueueGroup,
765 Metadata: e.Metadata,
766 })
767 }
768
769 return Info{
770 ServiceIdentity: s.serviceIdentity(),
771 Type: InfoResponseType,
772 Description: s.Config.Description,
773 Endpoints: endpoints,
774 }
775}
776
777// Stats returns statistics for the service endpoint and all monitoring endpoints.
778func (s *service) Stats() Stats {

Callers 1

AddServiceFunction · 0.95

Calls 1

serviceIdentityMethod · 0.95

Tested by

no test coverage detected