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

Method addSocket

internal/channelz/channelmap.go:108–117  ·  view source on GitHub ↗
(s *Socket)

Source from the content-addressed store, hash-verified

106}
107
108func (c *channelMap) addSocket(s *Socket) {
109 c.mu.Lock()
110 defer c.mu.Unlock()
111 s.cm = c
112 c.sockets[s.ID] = s
113 if s.Parent == nil {
114 logger.Infof("normal socket %d has no parent", s.ID)
115 }
116 s.Parent.(entry).addChild(s.ID, s)
117}
118
119// removeEntry triggers the removal of an entry, which may not indeed delete the
120// entry, if it has to wait on the deletion of its children and until no other

Callers 1

RegisterSocketFunction · 0.80

Calls 4

InfofMethod · 0.65
addChildMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected