prompb

package
v0.6.0-victorialogs Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exemplar

type Exemplar struct {
	// Labels a list of labels that uniquely identifies exemplar
	// Optional, can be empty.
	Labels []Label
	// Value: the value of the exemplar
	Value float64
	// timestamp is in ms format, see model/timestamp/timestamp.go for
	// conversion from time.Time to Prometheus timestamp.
	Timestamp int64
}

Exemplar is an exemplar

type Label

type Label struct {
	// Name is label name.
	Name string

	// Value is label value.
	Value string
}

Label is a timeseries label.

type Sample

type Sample struct {
	// Value is sample value.
	Value float64

	// Timestamp is unix timestamp for the sample in milliseconds.
	Timestamp int64
}

Sample is a timeseries sample.

type TimeSeries

type TimeSeries struct {
	// Labels is a list of labels for the given TimeSeries
	Labels []Label

	// Samples is a list of samples for the given TimeSeries
	Samples   []Sample
	Exemplars []Exemplar
}

TimeSeries is a timeseries.

type WriteRequest

type WriteRequest struct {
	// Timeseries is a list of time series in the given WriteRequest
	Timeseries []TimeSeries
	// contains filtered or unexported fields
}

WriteRequest represents Prometheus remote write API request.

func (*WriteRequest) Reset

func (wr *WriteRequest) Reset()

Reset resets wr for subsequent re-use.

func (*WriteRequest) UnmarshalProtobuf added in v1.97.0

func (wr *WriteRequest) UnmarshalProtobuf(src []byte) (err error)

UnmarshalProtobuf unmarshals wr from src.

src mustn't change while wr is in use, since wr points to src.

Jump to

Keyboard shortcuts

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