traefik/old/middlewares/accesslog/capture_request_reader.go
2018-11-14 10:18:03 +01:00

18 lines
308 B
Go

package accesslog
import "io"
type captureRequestReader struct {
source io.ReadCloser
count int64
}
func (r *captureRequestReader) Read(p []byte) (int, error) {
n, err := r.source.Read(p)
r.count += int64(n)
return n, err
}
func (r *captureRequestReader) Close() error {
return r.source.Close()
}