Wrap an io.Writer for metrics.
type Writer struct {}
Writer implements an io.Writer which wraps another in order to provide write and byte-size metrics.
func New(w io.Writer) *Writer
New writer wrapping w
.
func (w *Writer) Bytes() uint64
Bytes returns the number of total bytes written.
func (w *Writer) Write(b []byte) (int, error)
Write implements io.Writer.
func (w *Writer) Writes() uint64
Writes returns the total number of writes.