prompbmarshal

package
v1.97.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 1 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Label

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

	// Value is label value.
	Value string
}

Label represents time series label.

type Sample

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

	// Timestamp is sample timestamp.
	Timestamp int64
}

Sample represents time series sample

type TimeSeries

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

	// Samples contains a list of samples for the given TimeSeries
	Samples []Sample
}

TimeSeries represents a single time series.

func ResetTimeSeries added in v1.35.4

func ResetTimeSeries(tss []TimeSeries) []TimeSeries

ResetTimeSeries clears all the GC references from tss and returns an empty tss ready for further use.

type WriteRequest

type WriteRequest struct {
	// Timeseries contains a list of time series for the given WriteRequest
	Timeseries []TimeSeries
}

WriteRequest represents Prometheus remote write API request.

func (*WriteRequest) MarshalProtobuf added in v1.97.0

func (wr *WriteRequest) MarshalProtobuf(dst []byte) []byte

MarshalProtobuf appends protobuf-marshaled wr to dst and returns the result.

func (*WriteRequest) Reset added in v1.97.0

func (wr *WriteRequest) Reset()

Reset resets wr for subsequent re-use.

Jump to

Keyboard shortcuts

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