metrics

package
v0.0.0-...-08cbb52 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counters

type Counters struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Counters keep track of multiple counters in a map

func NewCounters

func NewCounters() (c *Counters)

NewCounters returns a Counters instance

func (*Counters) Collect

func (c *Counters) Collect() map[string]uint64

Collect gets the current Counter map snapshot

func (*Counters) Count

func (c *Counters) Count(s string, delta uint64)

Count is used to update counters

func (*Counters) Get

func (c *Counters) Get(s string) uint64

Get gets value of a counter

Jump to

Keyboard shortcuts

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