Documentation
¶
Index ¶
Constants ¶
View Source
const CurrentEntriesRec = WALRecordEntriesV3
The current type of Entries that this distribution writes. Loki can read in a backwards compatible manner, but will write the newest variant. TODO: Change to WALRecordEntriesV3?
Variables ¶
This section is empty.
Functions ¶
func DecodeEntries ¶
func DecodeEntries(b []byte, version RecordType, rec *Record) error
func DecodeRecord ¶
func DecodeRecord(b []byte, walRec *Record) (err error)
Types ¶
type Record ¶
type Record struct {
UserID string
Series []record.RefSeries
RefEntries []RefEntries
// contains filtered or unexported fields
}
Record is a struct combining the series and samples record.
func (*Record) AddEntries ¶
func (r *Record) AddEntries(fp uint64, counter int64, entries ...logproto.Entry)
func (*Record) EncodeEntries ¶
func (r *Record) EncodeEntries(version RecordType, b []byte) []byte
func (*Record) EncodeSeries ¶
func (r *Record) EncodeSeries(b []byte) []byte
type RecordType ¶
type RecordType byte
RecordType represents the type of the WAL/Checkpoint record.
const (
// WALRecordSeries is the type for the WAL record for series.
WALRecordSeries RecordType = iota
// WALRecordEntriesV1 is the type for the WAL record for samples.
WALRecordEntriesV1
// CheckpointRecord is the type for the Checkpoint record based on protos.
CheckpointRecord
// WALRecordEntriesV2 is the type for the WAL record for samples with an
// additional counter value for use in replaying without the ordering constraint.
WALRecordEntriesV2
// WALRecordEntriesV3 is the type for the WAL record for samples with structured metadata.
WALRecordEntriesV3
)
type RefEntries ¶
type RefEntries struct {
Counter int64
Ref chunks.HeadSeriesRef
Entries []logproto.Entry
}
type ResettingPool ¶
type ResettingPool struct {
// contains filtered or unexported fields
}
func NewRecordPool ¶
func NewRecordPool() *ResettingPool
Click to show internal directories.
Click to hide internal directories.