prompb

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketSpan added in v0.10.0

type BucketSpan struct {
	Offset int32
	Length uint32
}

func (*BucketSpan) Unmarshal added in v0.10.0

func (s *BucketSpan) Unmarshal(src []byte) (err error)

Unmarshal unmarshals BucketSpan from src.

type Exemplar added in v0.10.0

type Exemplar struct {
	Labels    []Label
	Value     float64
	Timestamp int64
}

func (*Exemplar) GetTimestamp added in v0.10.0

func (h *Exemplar) GetTimestamp() int64

GetTimestamp returns Timestamp.

func (*Exemplar) Unmarshal added in v0.10.0

func (e *Exemplar) Unmarshal(p *pools, src []byte) (err error)

Unmarshal unmarshals Exemplar from src.

type Histogram added in v0.10.0

type Histogram struct {
	Count         HistogramCount
	Sum           float64
	Schema        int32
	ZeroThreshold float64
	ZeroCount     HistogramZeroCount

	NegativeSpans  []BucketSpan
	NegativeDeltas []int64
	NegativeCounts []float64

	PositiveSpans  []BucketSpan
	PositiveDeltas []int64
	PositiveCounts []float64

	ResetHint HistogramResentHint
	Timestamp int64
}

func (*Histogram) GetTimestamp added in v0.10.0

func (h *Histogram) GetTimestamp() int64

GetTimestamp returns Timestamp.

func (*Histogram) Unmarshal added in v0.10.0

func (h *Histogram) Unmarshal(p *pools, src []byte) (err error)

Unmarshal unmarshals BucketSpan from src.

type HistogramCount added in v0.10.0

type HistogramCount = intOrFloat

type HistogramResentHint added in v0.10.0

type HistogramResentHint int32
const (
	HistogramResentHintUNKNOWN HistogramResentHint = 0
	HistogramResentHintYES     HistogramResentHint = 1
	HistogramResentHintNO      HistogramResentHint = 2
	HistogramResentHintGAUGE   HistogramResentHint = 3
)

type HistogramZeroCount added in v0.10.0

type HistogramZeroCount = intOrFloat

type Label

type Label struct {
	Name  []byte
	Value []byte
}

Label is a timeseries label

func (*Label) Unmarshal

func (m *Label) Unmarshal(src []byte) (err error)

Unmarshal unmarshals Label from src.

type Sample

type Sample struct {
	Value     float64
	Timestamp int64
}

Sample is a timeseries sample.

func (*Sample) GetTimestamp added in v0.10.0

func (h *Sample) GetTimestamp() int64

GetTimestamp returns Timestamp.

func (*Sample) Unmarshal

func (s *Sample) Unmarshal(src []byte) (err error)

Unmarshal unmarshals Sample from src.

type TimeSeries

type TimeSeries struct {
	Labels     []Label
	Samples    []Sample
	Exemplars  []Exemplar
	Histograms []Histogram
}

TimeSeries is a timeseries.

func (*TimeSeries) Unmarshal

func (ts *TimeSeries) Unmarshal(p *pools, src []byte) (err error)

Unmarshal unmarshals TimeSeries from src.

type WriteRequest

type WriteRequest struct {
	Timeseries []TimeSeries
	// contains filtered or unexported fields
}

WriteRequest represents Prometheus remote write API request

func (*WriteRequest) Reset

func (wr *WriteRequest) Reset()

Reset resets wr.

func (*WriteRequest) Unmarshal

func (req *WriteRequest) Unmarshal(src []byte) (err error)

Unmarshal unmarshals WriteRequest from src.

Jump to

Keyboard shortcuts

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