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

Method loopReq

tailnet/service.go:265–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263}
264
265func (c communicator) loopReq() {
266 ctx := c.stream.Context()
267 defer close(c.reqs)
268 for {
269 req, err := c.stream.Recv()
270 if err != nil {
271 c.logger.Debug(ctx, "error receiving requests from DRPC stream", slog.Error(err))
272 return
273 }
274 err = SendCtx(ctx, c.reqs, req)
275 if err != nil {
276 c.logger.Debug(ctx, "context done while sending coordinate request", slog.Error(ctx.Err()))
277 return
278 }
279 }
280}
281
282func (c communicator) loopResp() {
283 ctx := c.stream.Context()

Callers 1

communicateMethod · 0.95

Calls 5

SendCtxFunction · 0.85
ErrMethod · 0.80
ContextMethod · 0.65
RecvMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected