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

Function WriteMessage

agent/boundarylogproxy/codec/codec.go:180–186  ·  view source on GitHub ↗

WriteMessage marshals a proto message and writes it as a framed message with the given tag.

(w io.Writer, tag Tag, msg proto.Message)

Source from the content-addressed store, hash-verified

178// WriteMessage marshals a proto message and writes it as a framed message
179// with the given tag.
180func WriteMessage(w io.Writer, tag Tag, msg proto.Message) error {
181 data, err := proto.Marshal(msg)
182 if err != nil {
183 return xerrors.Errorf("marshal: %w", err)
184 }
185 return WriteFrame(w, tag, data)
186}

Callers 3

sendLogsV1Function · 0.92
sendLogsFunction · 0.92
sendStatusFunction · 0.92

Calls 3

WriteFrameFunction · 0.85
MarshalMethod · 0.45
ErrorfMethod · 0.45

Tested by 3

sendLogsV1Function · 0.74
sendLogsFunction · 0.74
sendStatusFunction · 0.74