Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CountingReadCloser ¶
type CountingReadCloser struct { io.ReadCloser Size int64 }
CountingReadCloser is an io.ReadCloser which counts the read bytes.
func NewCountingReader ¶
func NewCountingReader(r io.Reader) *CountingReadCloser
NewCountingReader returns a CountingReadCloser.
type CountingResponseWriter ¶
type CountingResponseWriter struct { http.ResponseWriter Code int Size int64 }
CountingResponseWriter is a http.ResponseWriter which counts the written bytes, and stores the response's Code.
func NewCountingRW ¶
func NewCountingRW(w http.ResponseWriter) *CountingResponseWriter
NewCountingRW returns a CountingResponseWriter.
func (*CountingResponseWriter) Write ¶
func (rw *CountingResponseWriter) Write(p []byte) (n int, err error)
func (*CountingResponseWriter) WriteHeader ¶
func (rw *CountingResponseWriter) WriteHeader(code int)
WriteHeader implements http.ResponseWriter.WriteHeader, and record the code.
Click to show internal directories.
Click to hide internal directories.