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

Method handleMessage

agent/boundarylogproxy/proxy.go:186–202  ·  view source on GitHub ↗
(ctx context.Context, msg proto.Message)

Source from the content-addressed store, hash-verified

184}
185
186func (s *Server) handleMessage(ctx context.Context, msg proto.Message) {
187 switch m := msg.(type) {
188 case *agentproto.ReportBoundaryLogsRequest:
189 s.bufferLogs(ctx, m)
190 case *codec.BoundaryMessage:
191 switch inner := m.Msg.(type) {
192 case *codec.BoundaryMessage_Logs:
193 s.bufferLogs(ctx, inner.Logs)
194 case *codec.BoundaryMessage_Status:
195 s.recordBoundaryStatus(inner.Status)
196 default:
197 s.logger.Warn(ctx, "unknown BoundaryMessage variant")
198 }
199 default:
200 s.logger.Warn(ctx, "unexpected message type")
201 }
202}
203
204func (s *Server) recordBoundaryStatus(status *codec.BoundaryStatus) {
205 if n := status.DroppedChannelFull; n > 0 {

Callers 1

handleConnectionMethod · 0.95

Calls 2

bufferLogsMethod · 0.95
recordBoundaryStatusMethod · 0.95

Tested by

no test coverage detected