counter

package
v1.16.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OnClose

type OnClose func(bytes int64, err error)

type ReadCloser

type ReadCloser struct {
	// contains filtered or unexported fields
}

ReadCloser wraps an io.ReadCloser (request/response body) to count bytes read the reader. Optionally, an OnClose callback can be registered.

func NewReadCloser

func NewReadCloser(wrapped io.ReadCloser, onClose OnClose) *ReadCloser

func (*ReadCloser) Bytes

func (w *ReadCloser) Bytes() int64

func (*ReadCloser) Close

func (w *ReadCloser) Close() error

func (*ReadCloser) Read

func (w *ReadCloser) Read(b []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL