Version: v1.0.0 Latest Latest

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

Go to latest
Published: Jul 30, 2020 License: AGPL-3.0, Apache-2.0 Imports: 4 Imported by: 2



package metricbuilder provides various methods to build metrics, or more specifically MetricData structures be aware of this behavior when it comes to the MetricName property: | mpo | metricName has %d directive? | outcome | |-----|------------------------------|-----------------------------------| | 1 | Yes | use directive to always print 1 | | >1 | Yes | use directive to print the number | | 1 | No | don't use directive | | >1 | No | invalid: will panic |



This section is empty.


This section is empty.


This section is empty.


type Builder

type Builder interface {
	Info() string
	// Build builds a slice of slices of MetricData's( per orgid), with time and value not set yet.
	Build(orgs, mpo, period int) [][]schema.MetricData

type Simple

type Simple struct {
	MetricName string

Simple builds simple metrics by name

func (Simple) Build

func (s Simple) Build(orgs, mpo, period int) [][]schema.MetricData

func (Simple) Info

func (s Simple) Info() string

type Tagged

type Tagged struct {
	MetricName          string
	CustomTags          []string
	AddTags             bool
	NumUniqueCustomTags int
	NumUniqueTags       int

Tagged builds metrics with a name and various tag related options

func (Tagged) Build

func (tb Tagged) Build(orgs, mpo, period int) [][]schema.MetricData

func (Tagged) Info

func (tb Tagged) Info() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL