counterdumper

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package counterdumper contains a counter that that periodically invokes a callback if the counter is not zero.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterDumper

type CounterDumper struct {
	OnReport func(v uint64)
	// contains filtered or unexported fields
}

CounterDumper is a counter that periodically invokes a callback if the counter is not zero.

func (*CounterDumper) Add

func (c *CounterDumper) Add(v uint64)

Add adds value to the counter.

func (*CounterDumper) Increase

func (c *CounterDumper) Increase()

Increase increases the counter value by 1.

func (*CounterDumper) Start

func (c *CounterDumper) Start()

Start starts the counter.

func (*CounterDumper) Stop

func (c *CounterDumper) Stop()

Stop stops the counter.

Jump to

Keyboard shortcuts

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