Documentation ¶
Index ¶
- Variables
- type Decoder
- func (d *Decoder) Exemplars(rec []byte, exemplars []RefExemplar) ([]RefExemplar, error)
- func (d *Decoder) Samples(rec []byte, samples []RefSample) ([]RefSample, error)
- func (d *Decoder) Series(rec []byte, series []RefSeries) ([]RefSeries, error)
- func (d *Decoder) Tombstones(rec []byte, tstones []tombstones.Stone) ([]tombstones.Stone, error)
- func (d *Decoder) Type(rec []byte) Type
- type Encoder
- type RefExemplar
- type RefSample
- type RefSeries
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned if a looked up resource was not found. Duplicate ErrNotFound from head.go. ErrNotFound = errors.New("not found") )
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct { }
Decoder decodes series, sample, and tombstone records. The zero value is ready to use.
func (*Decoder) Exemplars ¶
func (d *Decoder) Exemplars(rec []byte, exemplars []RefExemplar) ([]RefExemplar, error)
func (*Decoder) Tombstones ¶
func (d *Decoder) Tombstones(rec []byte, tstones []tombstones.Stone) ([]tombstones.Stone, error)
Tombstones appends tombstones in rec to the given slice.
type Encoder ¶
type Encoder struct { }
Encoder encodes series, sample, and tombstones records. The zero value is ready to use.
func (*Encoder) Tombstones ¶
func (e *Encoder) Tombstones(tstones []tombstones.Stone, b []byte) []byte
Tombstones appends the encoded tombstones to b and returns the resulting slice.
type RefExemplar ¶
RefExemplar is an exemplar with it's labels, timestamp, value the exemplar was collected/observed with, and a reference to a series.
type Type ¶
type Type uint8
Type represents the data type of a record.
const ( // Unknown is returned for unrecognised WAL record types. Unknown Type = 255 // Series is used to match WAL records of type Series. Series Type = 1 // Samples is used to match WAL records of type Samples. Samples Type = 2 // Tombstones is used to match WAL records of type Tombstones. Tombstones Type = 3 // Exemplars is used to match WAL records of type Exemplars. Exemplars Type = 4 )
Click to show internal directories.
Click to hide internal directories.