parser

package
v0.0.0-...-db55309 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expvar

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

func NewExpvar

func NewExpvar(opts ...ExpvarOpt) *Expvar

func (*Expvar) Parse

func (e *Expvar) Parse(b []byte) (map[string]interface{}, error)

type ExpvarOpt

type ExpvarOpt func(*Expvar)

func WithPropertiesToRemove

func WithPropertiesToRemove(toRemove []string) ExpvarOpt

type Family

type Family struct {
	//Time    time.Time
	Name    string        `json:"name"`
	Help    string        `json:"help"`
	Type    string        `json:"type"`
	Metrics []interface{} `json:"metrics,omitempty"` // Either metric or summary.
}

Family mirrors the MetricFamily proto message.

type Histogram

type Histogram struct {
	Labels  map[string]string `json:"labels,omitempty"`
	Buckets map[string]string `json:"buckets,omitempty"`
	Count   string            `json:"count"`
	Sum     string            `json:"sum"`
}

Histogram mirrors the Histogram proto message.

type Metric

type Metric struct {
	Labels map[string]string `json:"labels,omitempty"`
	Value  string            `json:"value"`
}

Metric is for all "single value" metrics, i.e. Counter, Gauge, and Untyped.

type Prometheus

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

func NewPrometheus

func NewPrometheus() *Prometheus

func (*Prometheus) Parse

func (p *Prometheus) Parse(b []byte) (map[string]interface{}, error)

type Summary

type Summary struct {
	Labels    map[string]string `json:"labels,omitempty"`
	Quantiles map[string]string `json:"quantiles,omitempty"`
	Count     string            `json:"count"`
	Sum       string            `json:"sum"`
}

Summary mirrors the Summary proto message.

Jump to

Keyboard shortcuts

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