metrics

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCounterVec

func AddCounterVec(name MKey, labels map[string]string, val float64)

AddCounterVec increments the CounterVec by arbitrary value.

func AddGauge

func AddGauge(name MKey, val float64)

AddGauge adds the given value to the Gauge. (The value can be negative, resulting in a decrease of the Gauge.)

func DecGauge

func DecGauge(name MKey)

DecGauge decrements the Gauge by 1. Use SubGauge to decrement it by arbitrary values.

func DeleteCounterVec added in v0.2.1

func DeleteCounterVec(name MKey, labels map[string]string)

DeleteCounterVec deletes the CounterVec value.

func DeleteGaugeVec added in v0.2.1

func DeleteGaugeVec(name MKey, labels map[string]string)

DeleteGaugeVec deletes the CounterVec value.

func IncCounterVec

func IncCounterVec(name MKey, labels map[string]string)

IncCounterVec increments the CounterVec by 1. Use AddCounterVec to increment it by arbitrary value.

func IncGauge

func IncGauge(name MKey)

IncGauge increments the Gauge by 1. Use AddGauge to increment it by arbitrary values.

func Init

func Init()

func RegisterCounterVec

func RegisterCounterVec(name MKey, labels []string)

func RegisterGauge

func RegisterGauge(name MKey)

func RegisterGaugeCached

func RegisterGaugeCached(name MKey)

func RegisterGaugeVec

func RegisterGaugeVec(name MKey, labels []string)

func RegisterGauges

func RegisterGauges(names ...MKey)

func RegisterGaugesWithOpts

func RegisterGaugesWithOpts(gOpts []prometheus.GaugeOpts)

func SetGauge

func SetGauge(name MKey, val float64)

SetGauge sets the Gauge to an arbitrary value.

func SetGaugeVec

func SetGaugeVec(name MKey, labels map[string]string, val float64)

SetGaugeVec sets the Gauge to an arbitrary value.

func SubGauge

func SubGauge(name MKey, val float64)

SubGauge subtracts the given value from the Gauge. (The value can be negative, resulting in an increase of the Gauge.)

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

type MKey

type MKey string

MKey type for metrics

const (
	OrphanBlocks      MKey = "orphan_blocks"
	SubmittedShares   MKey = "submitted_shares"
	CreatedJobs       MKey = "created_jobs"
	SubmittedBlocks   MKey = "submitted_blocks"
	WorkerConnTimeout MKey = "worker_conn_timeout"
	HashRate          MKey = "hash_rate"
)

Jump to

Keyboard shortcuts

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