MCPcopy Create free account
hub / github.com/coder/coder / newRPC

Method newRPC

vpn/speaker.go:223–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223func (s *speaker[_, R, _]) newRPC() (uint64, chan R) {
224 s.mu.Lock()
225 defer s.mu.Unlock()
226 msgID := s.nextMsgID
227 s.nextMsgID++
228 c := make(chan R)
229 s.responseChans[msgID] = c
230 return msgID, c
231}
232
233func (s *speaker[_, _, _]) rmResponseChan(msgID uint64) {
234 s.mu.Lock()

Callers 1

unaryRPCMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected