metrics

package
v0.24.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: AGPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ProjectCountKey     = `project_count`
	UserCountKey        = `user_count`
	TaskCountKey        = `task_count`
	TeamCountKey        = `team_count`
	FilesCountKey       = `files_count`
	AttachmentsCountKey = `attachments_count`
)

Variables

This section is empty.

Functions

func GetCount

func GetCount(key string) (count int64, err error)

GetCount returns the current count from keyvalue

func GetRegistry added in v0.17.0

func GetRegistry() *prometheus.Registry

func InitMetrics

func InitMetrics()

InitMetrics Initializes the metrics

func SetCount

func SetCount(count int64, key string) error

SetCount sets the project count to a given value

func SetLinkShareActive added in v0.22.0

func SetLinkShareActive(a web.Auth) (err error)

SetLinkShareActive sets a user as active and pushes it to keyvalue

func SetUserActive added in v0.14.0

func SetUserActive(a web.Auth) (err error)

SetUserActive sets a user as active and pushes it to keyvalue

Types

type ActiveAuthenticable added in v0.22.0

type ActiveAuthenticable struct {
	ID       int64
	LastSeen time.Time
}

ActiveAuthenticable defines an active user or link share

type ActiveLinkShares added in v0.22.0

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

type ActiveUsers added in v0.14.1

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

Jump to

Keyboard shortcuts

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