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

Function sendStatus

agent/boundarylogproxy/proxy_test.go:51–61  ·  view source on GitHub ↗

sendStatus writes a BoundaryMessage envelope containing a BoundaryStatus to the connection using TagV2.

(t *testing.T, conn net.Conn, status *codec.BoundaryStatus)

Source from the content-addressed store, hash-verified

49// sendStatus writes a BoundaryMessage envelope containing a BoundaryStatus
50// to the connection using TagV2.
51func sendStatus(t *testing.T, conn net.Conn, status *codec.BoundaryStatus) {
52 t.Helper()
53
54 msg := &codec.BoundaryMessage{
55 Msg: &codec.BoundaryMessage_Status{Status: status},
56 }
57 err := codec.WriteMessage(conn, codec.TagV2, msg)
58 if err != nil {
59 t.Errorf("write status: %s", err)
60 }
61}
62
63// fakeReporter implements boundarylogproxy.Reporter for testing.
64type fakeReporter struct {

Callers 1

TestServer_MetricsFunction · 0.85

Calls 3

WriteMessageFunction · 0.92
HelperMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected