prompbmarshal

package
v1.101.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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
}

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