MCPcopy
hub / github.com/grafana/dskit / DescribeService

Function DescribeService

services/services.go:136–145  ·  view source on GitHub ↗

DescribeService returns name of the service, if it has one, or returns string representation of the service.

(service Service)

Source from the content-addressed store, hash-verified

134
135// DescribeService returns name of the service, if it has one, or returns string representation of the service.
136func DescribeService(service Service) string {
137 name := ""
138 if named, ok := service.(NamedService); ok {
139 name = named.ServiceName()
140 }
141 if name == "" {
142 name = fmt.Sprintf("%v", service)
143 }
144 return name
145}

Callers 3

TestServiceNameFunction · 0.85
WatchServiceMethod · 0.85
WatchManagerMethod · 0.85

Calls 1

ServiceNameMethod · 0.65

Tested by 1

TestServiceNameFunction · 0.68