stats

package
v2.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TotalCommands is the tracking key to get the number of all processed commands
	TotalCommands = "command_total"

	// UnauthorizedCommands is the tracking key to get the number of commands by unauthorized users
	UnauthorizedCommands = "command_unauthorized"

	// UnknownCommands is the tracking key to get the number of all unknown commands (when the fallback-command is fired)
	UnknownCommands = "command_unknown"

	// Interactions is the tracking key to get the number of all processed interactions aka buttons
	Interactions = "interactions"
)

Variables

This section is empty.

Functions

func Get

func Get(key string) (uint, error)

Get the counter value of of type

func GetKeys added in v2.3.1

func GetKeys() []string

GetKeys returns all used metric keys

func Increase

func Increase[T constraints.Signed](key string, count T)

Increase is increasing the stats counter

func IncreaseOne

func IncreaseOne(key string)

IncreaseOne is increasing the stats counter of the given type by 1

func InitMetrics added in v2.3.4

func InitMetrics(cfg config.Config, ctx *util.ServerContext)

func Set

func Set[T constraints.Signed](key string, value T)

Set the stats to a specific value

Types

This section is empty.

Jump to

Keyboard shortcuts

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