counter

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: ISC Imports: 1 Imported by: 0

Documentation

Overview

Package counter - thread safe counter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter uint64

Counter - type to denote a counter that can be synchronously increments or decremented just a 64 bit unsigned integer

func (*Counter) Decrement

func (ic *Counter) Decrement() uint64

Decrement - subtract 1 from a counter, returns new value

func (*Counter) Increment

func (ic *Counter) Increment() uint64

Increment - add 1 to a counter, returns new value

func (*Counter) IsZero

func (ic *Counter) IsZero() bool

IsZero - check if zero

func (*Counter) Uint64

func (ic *Counter) Uint64() uint64

Uint64 - returns current value

Jump to

Keyboard shortcuts

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