TmpFileResponseWriter caches Clickhouse response. the http header are kept in memory
| 13 | // TmpFileResponseWriter caches Clickhouse response. |
| 14 | // the http header are kept in memory |
| 15 | type TmpFileResponseWriter struct { |
| 16 | http.ResponseWriter // the original response writer |
| 17 | |
| 18 | contentLength int64 |
| 19 | contentType string |
| 20 | contentEncoding string |
| 21 | headersCaptured bool |
| 22 | statusCode int |
| 23 | |
| 24 | tmpFile *os.File // temporary file for response streaming |
| 25 | bw *bufio.Writer // buffered writer for the temporary file |
| 26 | } |
| 27 | |
| 28 | func NewTmpFileResponseWriter(rw http.ResponseWriter, dir string) (*TmpFileResponseWriter, error) { |
| 29 | _, ok := rw.(http.CloseNotifier) |
nothing calls this directly
no outgoing calls
no test coverage detected