Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MagicChunks is 4 bytes at the head of a series file. MagicChunks = 0x85BD40DD // MagicChunksSize is the size in bytes of MagicChunks. MagicChunksSize = 4 ChunksFormatVersionSize = 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Meta ¶
type Meta struct { // Ref and Chunk hold either a reference that can be used to retrieve // chunk data or the data itself. // Generally, only one of them is set. Ref uint64 Chunk chunkenc.Chunk // Time range the data covers. // When MaxTime == math.MaxInt64 the chunk is still open and being appended to. MinTime, MaxTime int64 }
Meta holds information about a chunk of data.
func MergeOverlappingChunks ¶ added in v0.5.0
MergeOverlappingChunks removes the samples whose timestamp is overlapping. The last appearing sample is retained in case there is overlapping. This assumes that `chks []Meta` is sorted w.r.t. MinTime.
func (*Meta) OverlapsClosedInterval ¶
OverlapsClosedInterval Returns true if the chunk overlaps [mint, maxt].
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements a ChunkReader for a serialized byte stream of series data.
func NewDirReader ¶
NewDirReader returns a new Reader against sequentially numbered files in the given directory.
Click to show internal directories.
Click to hide internal directories.