Documentation ¶
Index ¶
- func ReadLinesBlock(r io.Reader, dstBuf, tailBuf []byte) ([]byte, []byte, error)
- type InsertCtx
- func (ctx *InsertCtx) AddLabel(name, value string)
- func (ctx *InsertCtx) FlushBufs() error
- func (ctx *InsertCtx) Reset(rowsLen int)
- func (ctx *InsertCtx) WriteDataPoint(prefix []byte, labels []prompb.Label, timestamp int64, value float64)
- func (ctx *InsertCtx) WriteDataPointExt(metricNameRaw []byte, labels []prompb.Label, timestamp int64, value float64) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InsertCtx ¶
InsertCtx contains common bits for data points insertion.
func (*InsertCtx) AddLabel ¶
AddLabel adds (name, value) label to ctx.Labels.
name and value must exist until ctx.Labels is used.
func (*InsertCtx) WriteDataPoint ¶
func (ctx *InsertCtx) WriteDataPoint(prefix []byte, labels []prompb.Label, timestamp int64, value float64)
WriteDataPoint writes (timestamp, value) with the given prefix and lables into ctx buffer.
func (*InsertCtx) WriteDataPointExt ¶
func (ctx *InsertCtx) WriteDataPointExt(metricNameRaw []byte, labels []prompb.Label, timestamp int64, value float64) []byte
WriteDataPointExt writes (timestamp, value) with the given metricNameRaw and labels into ctx buffer.
It returns metricNameRaw for the given labels if len(metricNameRaw) == 0.
Click to show internal directories.
Click to hide internal directories.