metricbuilder

package
v1.0.0 Latest Latest
Warning

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: 0

Documentation

Overview

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 |

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

Jump to

Keyboard shortcuts

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