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

Function flush

aibridge/intercept/eventstream/eventstream.go:262–275  ·  view source on GitHub ↗
(w http.ResponseWriter)

Source from the content-addressed store, hash-verified

260}
261
262func flush(w http.ResponseWriter) (err error) {
263 flusher, ok := w.(http.Flusher)
264 if !ok || flusher == nil {
265 return xerrors.New("SSE not supported")
266 }
267
268 defer func() {
269 if r := recover(); r != nil { //nolint:revive,staticcheck // Intentionally swallowed; likely a broken connection.
270 }
271 }()
272
273 flusher.Flush()
274 return nil
275}

Callers 4

metadataKeyWordsFunction · 0.85
InitiateStreamMethod · 0.85
StartMethod · 0.85
loopMethod · 0.85

Calls 2

NewMethod · 0.65
FlushMethod · 0.65

Tested by

no test coverage detected