tenantmetrics

package
v1.81.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 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.

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