prompb

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 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

type BucketSpan struct {
	Offset int32
	Length uint32
}

func (*BucketSpan) Unmarshal

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

Unmarshal unmarshals BucketSpan from src.

type Exemplar

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

func (*Exemplar) GetTimestamp

func (h *Exemplar) GetTimestamp() int64

GetTimestamp returns Timestamp.

func (*Exemplar) Unmarshal

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

Unmarshal unmarshals Exemplar from src.

type Histogram

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 HistogramResetHint
	Timestamp int64
}

func (*Histogram) GetTimestamp

func (h *Histogram) GetTimestamp() int64

GetTimestamp returns Timestamp.

func (*Histogram) Unmarshal

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

Unmarshal unmarshals BucketSpan from src.

type HistogramCount

type HistogramCount = intOrFloat

type HistogramResetHint

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

type HistogramZeroCount

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

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