tenantmetrics

package
v1.103.0-cluster Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterMap

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

CounterMap is a map of counters keyed by tenant.

func NewCounterMap

func NewCounterMap(metric string) *CounterMap

NewCounterMap creates new CounterMap for the given metric.

func (*CounterMap) Get

func (cm *CounterMap) Get(at *auth.Token) *metrics.Counter

Get returns counter for the given at

func (*CounterMap) GetByTenant

func (cm *CounterMap) GetByTenant(key TenantID) *metrics.Counter

GetByTenant returns counter for the given key.

func (*CounterMap) MultiAdd added in v1.82.0

func (cm *CounterMap) MultiAdd(perTenantValues map[auth.Token]int)

MultiAdd adds multiple values grouped by auth.Token

type TenantID

type TenantID struct {
	AccountID uint32
	ProjectID uint32
}

TenantID defines metric tenant.

Jump to

Keyboard shortcuts

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