tally

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tally

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

Tally is a counter structure.

func (*Tally) Dec

func (t *Tally) Dec()

Dec decrements the counter by one. This operation is atomic. Note that decrement will wrap.

func (*Tally) Get

func (t *Tally) Get() uint64

Get returns the current value of the counter. This operation is atomic.

func (*Tally) Inc

func (t *Tally) Inc()

Inc increments the counter by one. This operation is atomic.

func (*Tally) Next

func (t *Tally) Next() uint64

Next increments and returns the next counter value.

func (*Tally) Reset

func (t *Tally) Reset()

Reset sets the counter to 0. This operation is atomic.

func (*Tally) Set

func (t *Tally) Set(i uint64)

Set sets the counter to value. This operation is atomic.

Jump to

Keyboard shortcuts

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