counters

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BytesDownloaded counterName = iota
	BytesUploaded
	BytesWasted
	SeededFor // time.Duration
)

stats

Variables

This section is empty.

Functions

This section is empty.

Types

type Counters

type Counters [4]int64

counters provides concurrent-safe access over set of integers.

func New

func New(dl, ul, waste, seed int64) Counters

func (*Counters) Incr

func (c *Counters) Incr(name counterName, value int64)

func (*Counters) Read

func (c *Counters) Read(name counterName) int64

Jump to

Keyboard shortcuts

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