prompbmarshal

package
v0.20.1-victorialogs Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exemplar

type Exemplar struct {
	// Optional, can be empty.
	Labels []Label
	Value  float64
	// timestamp is in ms format, see model/timestamp/timestamp.go for
	// conversion from time.Time to Prometheus timestamp.
	Timestamp int64
}

func (*Exemplar) MarshalToSizedBuffer

func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Exemplar) Size

func (m *Exemplar) Size() (n int)

type Label

type Label struct {
	Name  string
	Value string
}

func (*Label) MarshalToSizedBuffer

func (m *Label) MarshalToSizedBuffer(dst []byte) (int, error)

func (*Label) Size

func (m *Label) Size() (n int)

type Sample

type Sample struct {
	Value     float64
	Timestamp int64
}

func (*Sample) MarshalToSizedBuffer

func (m *Sample) MarshalToSizedBuffer(dst []byte) (int, error)

func (*Sample) Size

func (m *Sample) Size() (n int)

type TimeSeries

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

TimeSeries represents samples and labels for 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.

func (*TimeSeries) MarshalToSizedBuffer

func (m *TimeSeries) MarshalToSizedBuffer(dst []byte) (int, error)

func (*TimeSeries) Size

func (m *TimeSeries) Size() (n int)

type WriteRequest

type WriteRequest struct {
	Timeseries []TimeSeries
}

func (*WriteRequest) MarshalProtobuf added in v1.97.0

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

MarshalProtobuf marshals wr to dst and returns the result.

func (*WriteRequest) MarshalToSizedBuffer

func (m *WriteRequest) MarshalToSizedBuffer(dst []byte) (int, error)

func (*WriteRequest) Reset added in v1.97.0

func (wr *WriteRequest) Reset()

Reset resets wr.

func (*WriteRequest) Size

func (m *WriteRequest) Size() (n int)

Jump to

Keyboard shortcuts

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