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

prom

package
v0.3.12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PromEnabled                bool
	PromDetailedMacInfoEnabled bool
)

Functions

func ErrorsInc

func ErrorsInc(host string, level ErrLevel, msg string)

ErrorsInc - host: NAS, приславший запрос, к которому относится ошибка ("" если не привязана к конкретному запросу/NAS). msg: короткая фиксированная причина (константа на месте вызова - не текст ошибки/мак-адрес, иначе кардинальность лейбла станет неограниченной)

func IncClientDBLiveUpdateError

func IncClientDBLiveUpdateError(dbType string)

func IncClientDBLiveUpdateReceived

func IncClientDBLiveUpdateReceived(dbType string)

func ObserveRequestDuration

func ObserveRequestDuration(host string, seconds float64)

ObserveRequestDuration - WithLabelValues (не With(Labels), который под капотом аллоцирует map на каждый вызов) - это горячий путь, вызывается на каждый Access-Request без исключений. Подтверждено нагрузочным тестированием (см. doc/LOAD_TESTING.md): переход с With на WithLabelValues по всему файлу вернул ~20% RPS, потерянных на map-аллокациях в этой и соседних функциях

func RadAcctRequestsInc

func RadAcctRequestsInc(host string, serverName string)

func RadDetailedRequest

func RadDetailedRequest(host, serverName, macAddr, responseType string)

func RadRequestsByPoolInc

func RadRequestsByPoolInc(host, poolName string)

func RadRequestsInc

func RadRequestsInc(host string)

func RadRequestsIpAddressInc

func RadRequestsIpAddressInc(host string)

func RadRequestsPoolInc

func RadRequestsPoolInc(host string)

func SetAcctQueueSize

func SetAcctQueueSize(size int)

func SetApiStatus

func SetApiStatus(address string, alive bool)

func SetCacheSize

func SetCacheSize(size int)

func SetClientDBBindsCount added in v0.3.12

func SetClientDBBindsCount(source string, count int)

SetClientDBBindsCount - обновление размера одного bind-источника после точечного live-update (см. clientdb.ApplyBindEvent), без полного reload

func SetClientDBLastReload

func SetClientDBLastReload(unixSeconds int64)

func SetClientDBLiveUpdateLastTimestamp

func SetClientDBLiveUpdateLastTimestamp(unixSeconds int64)

func SetClientDBRedisConnected

func SetClientDBRedisConnected(connected bool)

func SetClientDBSize

func SetClientDBSize(devices int, binds map[string]int)

func SetPostAuthQueueSize

func SetPostAuthQueueSize(size int)

func SysInfo

func SysInfo(version string, buildDate string)

Types

type ErrLevel

type ErrLevel int
const Critical ErrLevel = 1
const Error ErrLevel = 2
const Warning ErrLevel = 3

Jump to

Keyboard shortcuts

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