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

Method Flush

coderd/httpapi/httpapi_test.go:423–435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

421}
422
423func (m mockServerSentWriter) Flush() {
424 b := m.buffer.Bytes()
425 _, err := m.serverConn.Write(b)
426 require.NoError(m.testContext, err)
427 m.buffer.Reset()
428
429 // Must close server connection to indicate EOF for any reads from the
430 // client connection; otherwise reads block forever. This is a testing
431 // limitation compared to the one-way websockets, since we have no way to
432 // frame the data and auto-indicate EOF for each message
433 err = m.serverConn.Close()
434 require.NoError(m.testContext, err)
435}
436
437func (m mockServerSentWriter) Header() http.Header {
438 return m.serverRecorder.Header()

Callers

nothing calls this directly

Calls 4

WriteMethod · 0.65
ResetMethod · 0.65
CloseMethod · 0.65
BytesMethod · 0.45

Tested by

no test coverage detected