sourcekey

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2023 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SourceKey

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

SourceKey represents a source key to look up dimensions objects (currently queries and products). It implements the lookup logic found in https://kb.vshn.ch/appuio-cloud/references/architecture/metering-data-flow.html#_system_idea.

func Parse

func Parse(raw string) (SourceKey, error)

Parse parses a source key in the format of "query:zone:tenant:namespace:class" or "query:zone:tenant:namespace".

func (SourceKey) LookupKeys

func (k SourceKey) LookupKeys() []string

LookupKeys generates lookup keys for a dimension object in the database. The logic is described here: https://kb.vshn.ch/appuio-cloud/references/architecture/metering-data-flow.html#_system_idea

func (SourceKey) Part added in v0.17.0

func (k SourceKey) Part(i int) string

Part returns the i-th part of the source key, or an empty string if no such part exists

func (SourceKey) String

func (k SourceKey) String() string

String returns the string representation "query:zone:tenant:namespace:class" of the key.

func (SourceKey) Tenant deprecated

func (k SourceKey) Tenant() string

Tenant returns the third element of the source key which was historically used as the tenant.

Deprecated: We would like to get rid of this and read the tenant from a metric label.

Jump to

Keyboard shortcuts

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