sendStatus writes a BoundaryMessage envelope containing a BoundaryStatus to the connection using TagV2.
(t *testing.T, conn net.Conn, status *codec.BoundaryStatus)
| 49 | // sendStatus writes a BoundaryMessage envelope containing a BoundaryStatus |
| 50 | // to the connection using TagV2. |
| 51 | func 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. |
| 64 | type fakeReporter struct { |
no test coverage detected