statResponseWriter collects the amount of bytes written. The wrapped ResponseWriter must implement http.CloseNotifier. Additionally it caches response status code.
| 34 | // |
| 35 | // Additionally it caches response status code. |
| 36 | type 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 | |
| 47 | const ( |
| 48 | XCacheHit = "HIT" |
nothing calls this directly
no outgoing calls
no test coverage detected