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

Method Enqueue

enterprise/tailnet/connio.go:248–263  ·  view source on GitHub ↗
(resp *proto.CoordinateResponse)

Source from the content-addressed store, hash-verified

246}
247
248func (c *connIO) Enqueue(resp *proto.CoordinateResponse) error {
249 c.mu.Lock()
250 defer c.mu.Unlock()
251 if c.closed {
252 return xerrors.New("connIO closed")
253 }
254 select {
255 case <-c.peerCtx.Done():
256 return c.peerCtx.Err()
257 case c.responses <- resp:
258 c.logger.Debug(c.peerCtx, "wrote response")
259 return nil
260 default:
261 return agpl.ErrWouldBlock
262 }
263}
264
265func (c *connIO) Name() string {
266 return c.name

Callers 2

recvLoopMethod · 0.95
handleRequestMethod · 0.95

Calls 5

ErrMethod · 0.80
NewMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45
DoneMethod · 0.45

Tested by

no test coverage detected