Documentation ¶
Index ¶
- Variables
- func CompareLower(sa, sb []byte) int
- func IsSorted(l []*Label) bool
- func MetricName(ts *TimeSeries) []byte
- func Sort(l []*Label)
- type Iterator
- func (i *Iterator) Close() error
- func (i *Iterator) Err() error
- func (i *Iterator) Next() bool
- func (i *Iterator) ParseTimeSeriesInto(ts *TimeSeries, line string) (*TimeSeries, error)
- func (i *Iterator) Reset(r io.ReadCloser)
- func (i *Iterator) TimeSeriesInto(ts *TimeSeries) (*TimeSeries, error)
- func (i *Iterator) Value() string
- type Label
- type Labels
- type Pool
- type Resetter
- type Sample
- type TimeSeries
- type WriteRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ( WriteRequestPool = NewPool[*WriteRequest]( func() *WriteRequest { return &WriteRequest{} }, ) TimeSeriesPool = NewPool[*TimeSeries]( func() *TimeSeries { return &TimeSeries{} }, ) LabelPool = NewPool[*Label]( func() *Label { return &Label{} }, ) SamplePool = NewPool[*Sample]( func() *Sample { return &Sample{} }, ) )
Functions ¶
func CompareLower ¶
func MetricName ¶
func MetricName(ts *TimeSeries) []byte
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
func NewIterator(r io.ReadCloser) *Iterator
func (*Iterator) ParseTimeSeriesInto ¶
func (i *Iterator) ParseTimeSeriesInto(ts *TimeSeries, line string) (*TimeSeries, error)
func (*Iterator) Reset ¶
func (i *Iterator) Reset(r io.ReadCloser)
func (*Iterator) TimeSeriesInto ¶
func (i *Iterator) TimeSeriesInto(ts *TimeSeries) (*TimeSeries, error)
type TimeSeries ¶
TimeSeries is a timeseries.
func (*TimeSeries) AppendLabel ¶
func (m *TimeSeries) AppendLabel(key []byte, value []byte)
func (*TimeSeries) AppendLabelString ¶
func (m *TimeSeries) AppendLabelString(key string, value string)
func (*TimeSeries) AppendSample ¶
func (m *TimeSeries) AppendSample(timestamp int64, value float64)
func (*TimeSeries) Reset ¶
func (ts *TimeSeries) Reset()
func (*TimeSeries) Size ¶
func (m *TimeSeries) Size() (n int)
type WriteRequest ¶
type WriteRequest struct {
Timeseries []*TimeSeries
}
WriteRequest represents Prometheus remote write API request
func (*WriteRequest) Marshal ¶
func (wr *WriteRequest) Marshal() (dAtA []byte, err error)
func (*WriteRequest) Size ¶
func (wr *WriteRequest) Size() (n int)
func (*WriteRequest) Unmarshal ¶
func (wr *WriteRequest) Unmarshal(src []byte) (err error)
Unmarshal unmarshals m from src.
Click to show internal directories.
Click to hide internal directories.