counter

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uint

type Uint interface {
	// Inc increments the counter by 1.
	Inc()
	// Dec increments the counter by 1.
	Dec()
	// Add increments the counter by the provided value.
	Add(uint64)
	// Set sets the counters value.
	Set(uint64)
	// Value returns the counters current value.
	Value() uint64
}

Uint is an interface for positive integer counters.

func GetUint

func GetUint() Uint

GetUint returns a new counter to count positive integers.

type UintMinMax

type UintMinMax interface {
	// Set sets the counters value.
	Set(uint64)
	// Value returns the counters current value.
	Value() uint64
}

UintMinMax is an interface for minimal and maximal positive integer counters.

func GetUintMax

func GetUintMax() UintMinMax

GetUintMax returns a new counter to count maximum positive integers.

func GetUintMin

func GetUintMin() UintMinMax

GetUintMin returns a new counter to count minimum positive integers.

Jump to

Keyboard shortcuts

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