bandwidth

package
v0.5.32 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bandwidth

type Bandwidth interface {
	NewReader(io.Reader) io.Reader
	NewWriter(io.Writer) io.Writer
	Get() (up, down float64, totalUp, totalDown uint64)
}

type Noop

type Noop struct{}

func (*Noop) Get

func (n *Noop) Get() (up, down float64, tup, tdown uint64)

func (*Noop) NewReader

func (n *Noop) NewReader(r io.Reader) io.Reader

func (*Noop) NewWriter

func (n *Noop) NewWriter(w io.Writer) io.Writer

type Reader

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

func (*Reader) Read

func (r *Reader) Read(b []byte) (int, error)

type Tracker

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

func New

func New() *Tracker

func (*Tracker) Get

func (b *Tracker) Get() (up, down float64, totalUp, totalDown uint64)

func (*Tracker) NewReader

func (b *Tracker) NewReader(r io.Reader) io.Reader

func (*Tracker) NewWriter

func (b *Tracker) NewWriter(w io.Writer) io.Writer

type Writer

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

func (*Writer) Write

func (w *Writer) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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