MCPcopy Index your code
hub / github.com/ContentSquare/chproxy / statResponseWriter

Struct statResponseWriter

io.go:36–45  ·  view source on GitHub ↗

statResponseWriter collects the amount of bytes written. The wrapped ResponseWriter must implement http.CloseNotifier. Additionally it caches response status code.

Source from the content-addressed store, hash-verified

34//
35// Additionally it caches response status code.
36type statResponseWriter struct {
37 http.ResponseWriter
38
39 statusCode int
40 // wroteHeader tells whether the header's been written to
41 // the original ResponseWriter
42 wroteHeader bool
43
44 bytesWritten prometheus.Counter
45}
46
47const (
48 XCacheHit = "HIT"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected