MCPcopy Create free account
hub / github.com/cortexproject/cortex / NewChunk

Function NewChunk

pkg/chunk/chunk.go:21–28  ·  view source on GitHub ↗

NewChunk creates a new chunk

(metric labels.Labels, c chunkenc.Chunk, from, through model.Time)

Source from the content-addressed store, hash-verified

19
20// NewChunk creates a new chunk
21func NewChunk(metric labels.Labels, c chunkenc.Chunk, from, through model.Time) Chunk {
22 return Chunk{
23 From: from,
24 Through: through,
25 Metric: metric,
26 Data: c,
27 }
28}
29
30func (c *Chunk) NewIterator(iterator Iterator) Iterator {
31 if c.Data == nil {

Callers 3

ConvertToChunksFunction · 0.92
GenerateChunkFunction · 0.92
FromChunksFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected