metrics

package module
v0.0.0-...-9d6484c Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: MIT Imports: 2 Imported by: 1

Documentation

Overview

Package metrics 提供 trpc metrics 功能的封装

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncrCounter

func IncrCounter[N RealNumber](key string, value N)

IncrCounter increases counter key by value. Counters should accumulate values

func SetGauge

func SetGauge[N RealNumber](key string, value N)

SetGauge sets gauge key to value. An IGauge retains the last set value.

Types

type RealNumber

type RealNumber interface {
	constraints.Integer | constraints.Float
}

RealNumber 泛指所有实数

Directories

Path Synopsis
log
Package log 简单统计每分钟的指标数据, 然后写入日志
Package log 简单统计每分钟的指标数据, 然后写入日志
internal
Package internal log 内部工具
Package internal log 内部工具

Jump to

Keyboard shortcuts

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