MCPcopy
hub / github.com/grafana/dskit / nonFlushingBadResponseLoggingWriter

Struct nonFlushingBadResponseLoggingWriter

middleware/response.go:27–34  ·  view source on GitHub ↗

nonFlushingBadResponseLoggingWriter writes the body of "bad" responses (i.e. 5xx responses) to a buffer.

Source from the content-addressed store, hash-verified

25// nonFlushingBadResponseLoggingWriter writes the body of "bad" responses (i.e. 5xx
26// responses) to a buffer.
27type nonFlushingBadResponseLoggingWriter struct {
28 rw http.ResponseWriter
29 buffer io.Writer
30 logBody bool
31 bodyBytesLeft int
32 statusCode int
33 writeError error // The error returned when downstream Write() fails.
34}
35
36// flushingBadResponseLoggingWriter is a badResponseLoggingWriter that
37// implements http.Flusher.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected