export

package
v0.0.0-...-7b3ddb2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EscapeString

func EscapeString(v string, includeDoubleQuote bool) string

func LabelPairsToText

func LabelPairsToText(labels []metrics.LabelPair, additionalName, additionalValue string, out io.Writer) error

LabelPairsToText converts a slice of LabelPair plus the explicitly given additional label pair into text format and writes it to 'out'. escaped as required by the text format, and enclosed in '{...}'.

func WriteSample

func WriteSample(name string, m *metrics.MetricData, labelName, labelValue string, value float64, out io.Writer) error

WriteSample writes a single sample in text format to out.

Types

type MemoryExporter

type MemoryExporter struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMemoryExporter

func NewMemoryExporter() *MemoryExporter

NewMemoryExporter create a MemoryExporter object.

func (*MemoryExporter) DumpRegistry

func (e *MemoryExporter) DumpRegistry(registrys []*metrics.Registry)

func (*MemoryExporter) GetMetric

func (e *MemoryExporter) GetMetric() (metrics map[string]*metrics.MetricFamily)

func (*MemoryExporter) PrintText

func (e *MemoryExporter) PrintText(out io.Writer) error

PrintText converts metrics into text format and writes the resulting lines to 'out'.

Jump to

Keyboard shortcuts

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