MCPcopy
hub / github.com/grpc/grpc-go / findEntry

Method findEntry

internal/channelz/channelmap.go:149–163  ·  view source on GitHub ↗

c.mu must be held by the caller.

(id int64)

Source from the content-addressed store, hash-verified

147
148// c.mu must be held by the caller.
149func (c *channelMap) findEntry(id int64) entry {
150 if v, ok := c.channels[id]; ok {
151 return v
152 }
153 if v, ok := c.subChannels[id]; ok {
154 return v
155 }
156 if v, ok := c.servers[id]; ok {
157 return v
158 }
159 if v, ok := c.sockets[id]; ok {
160 return v
161 }
162 return &dummyEntry{idNotFound: id}
163}
164
165// c.mu must be held by the caller
166//

Callers 3

removeEntryMethod · 0.95
decrTraceRefCountMethod · 0.95
traceEventMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected