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

Function InjectBlocksIntoContext

pkg/querier/block.go:18–20  ·  view source on GitHub ↗
(ctx context.Context, blocks ...*bucketindex.Block)

Source from the content-addressed store, hash-verified

16)
17
18func InjectBlocksIntoContext(ctx context.Context, blocks ...*bucketindex.Block) context.Context {
19 return context.WithValue(ctx, blockCtxKey, blocks)
20}
21
22func ExtractBlocksFromContext(ctx context.Context) ([]*bucketindex.Block, bool) {
23 if blocks := ctx.Value(blockCtxKey); blocks != nil {

Callers 4

LabelValuesMethod · 0.85
LabelNamesMethod · 0.85
SelectMethod · 0.85

Calls

no outgoing calls

Tested by 1