MCPcopy Index your code
hub / github.com/coder/coder / SendRequest

Method SendRequest

tailnet/controllers.go:240–247  ·  view source on GitHub ↗

SendRequest sends a coordinate request on the client connection, holding the coordination lock to prevent concurrent writes on the dRPC stream.

(req *proto.CoordinateRequest)

Source from the content-addressed store, hash-verified

238// SendRequest sends a coordinate request on the client connection, holding
239// the coordination lock to prevent concurrent writes on the dRPC stream.
240func (c *BasicCoordination) SendRequest(req *proto.CoordinateRequest) error {
241 c.Lock()
242 defer c.Unlock()
243 if c.closed {
244 return xerrors.New("coordination is closed")
245 }
246 return c.client.Send(req)
247}
248
249// Close the coordination gracefully. If the context expires before the remote API server has hung
250// up on us, we forcibly close the Client connection.

Callers 10

respLoopMethod · 0.95
NewMethod · 0.80
ensureAgentMethod · 0.80
doExpireOldAgentsMethod · 0.80
NewMethod · 0.80
AddDestinationMethod · 0.80
RemoveDestinationMethod · 0.80
SyncDestinationsMethod · 0.80
TestServer_X11Function · 0.80

Calls 4

NewMethod · 0.65
SendMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 2

TestServer_X11Function · 0.64