stats

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Singleton so that it's easier to use in other packages

Index

Constants

This section is empty.

Variables

View Source
var (
	ReportInterval = 10 * time.Second
)

Functions

func Incr

func Incr(name string, value int)

Incr increments a counter by the given amount

func IncrPromCounter added in v0.30.0

func IncrPromCounter(key string, amount int)

IncrPromCounter increments a prometheus counter by the given amount

func InitPrometheusMetrics added in v0.30.0

func InitPrometheusMetrics()

InitPrometheusMetrics sets up prometheus counters/gauges

func Mute added in v0.17.0

func Mute(name string)

Mute stops reporting given stats

func SetPromGauge added in v0.30.0

func SetPromGauge(key string, amount int)

SetPromGauge sets a prometheus gauge value

func Start

func Start(reportInterval time.Duration)

Start initiates CLI stats reporting

Types

This section is empty.

Jump to

Keyboard shortcuts

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