Help us shape the future of Go! Take the 2026 Go Developer Survey

prom

package
v0.3.13 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Enabled         bool
	DetailedEnabled bool
)

Enabled gates every metric update: the exporter is optional, and the update functions sit on the hot path of every request.

Functions

func IncAcctRequest added in v0.3.13

func IncAcctRequest(host, serverName string)

func IncClientDBLiveUpdate added in v0.3.13

func IncClientDBLiveUpdate(dbType string)

func IncClientDBLiveUpdateError

func IncClientDBLiveUpdateError(dbType string)

func IncError added in v0.3.13

func IncError(host string, level Level, reason string)

IncError counts an error or warning. reason must be a fixed short string, never an error text or MAC, to keep label cardinality bounded.

func IncIPRequest added in v0.3.13

func IncIPRequest(host string)

func IncMacRequest added in v0.3.13

func IncMacRequest(host, serverName, mac, responseType string)

func IncPoolRequest added in v0.3.13

func IncPoolRequest(host, poolName string)

func IncRequest added in v0.3.13

func IncRequest(host string)

func ObserveRequestDuration

func ObserveRequestDuration(host string, seconds float64)

func SetAPIAlive added in v0.3.13

func SetAPIAlive(address string, alive bool)

func SetAcctQueueLen added in v0.3.13

func SetAcctQueueLen(n int)

func SetCacheSize

func SetCacheSize(size int)

func SetClientDBBinds added in v0.3.13

func SetClientDBBinds(source string, count int)

func SetClientDBDevices added in v0.3.13

func SetClientDBDevices(count int)

func SetClientDBLastLiveUpdate added in v0.3.13

func SetClientDBLastLiveUpdate(unixSeconds int64)

func SetClientDBLastReload

func SetClientDBLastReload(unixSeconds int64)

func SetClientDBRedisConnected

func SetClientDBRedisConnected(connected bool)

func SetPostAuthQueueLen added in v0.3.13

func SetPostAuthQueueLen(n int)

func SetVersion added in v0.3.13

func SetVersion(v, buildDate string)

Types

type Level added in v0.3.13

type Level string
const (
	Critical Level = "CRITICAL"
	Error    Level = "ERROR"
	Warning  Level = "WARNING"
)

Jump to

Keyboard shortcuts

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