metrics

package
v0.24.5 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

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