probe

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricTypeCounter   = "counter"
	MetricTypeGauge     = "gauge"
	MetricTypeHistogram = "histogram"
	MetricTypeSummary   = "summary"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Label

type Label struct {
	Name  string
	Value string
}

type LabelSlice

type LabelSlice []Label

func (LabelSlice) Len

func (ls LabelSlice) Len() int

func (LabelSlice) Less

func (ls LabelSlice) Less(a, b int) bool

func (LabelSlice) Swap

func (ls LabelSlice) Swap(a, b int)

type MetricGroup

type MetricGroup struct {
	Type    string
	Help    string
	Samples SampleSlice
}

func Await

func Await(p Probe) ([]MetricGroup, error)

type Probe

type Probe interface {
	Probe(ch chan<- ProbeResult) error
	fmt.Stringer
}

type ProbeResult

type ProbeResult struct {
	MGroup MetricGroup
	Error  error
}

type Sample

type Sample struct {
	FamilyName string // The metric family name. Ex.: http_request_duration_seconds
	MetricName string // The actual metric name. Ex.: http_request_duration_seconds_bucket
	Labels     LabelSlice
	Value      float64
}

type SampleSlice

type SampleSlice []Sample

func (SampleSlice) Len

func (ss SampleSlice) Len() int

func (SampleSlice) Less

func (ss SampleSlice) Less(a, b int) bool

func (SampleSlice) Swap

func (ss SampleSlice) Swap(a, b int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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