MCPcopy
hub / github.com/grafana/tempo / BlockMeta

Method BlockMeta

tempodb/tempodb.go:306–322  ·  view source on GitHub ↗
(ctx context.Context, tenantID string, blockID backend.UUID)

Source from the content-addressed store, hash-verified

304}
305
306func (rw *readerWriter) BlockMeta(ctx context.Context, tenantID string, blockID backend.UUID) (*backend.BlockMeta, *backend.CompactedBlockMeta, error) {
307 meta, err := rw.r.BlockMeta(ctx, (uuid.UUID)(blockID), tenantID)
308 if err != nil && !errors.Is(err, backend.ErrDoesNotExist) {
309 return nil, nil, err
310 }
311
312 if meta != nil {
313 return meta, nil, nil
314 }
315
316 compactedMeta, err := rw.c.CompactedBlockMeta((uuid.UUID)(blockID), tenantID)
317 if err != nil && !errors.Is(err, backend.ErrDoesNotExist) {
318 return nil, nil, err
319 }
320
321 return nil, compactedMeta, nil
322}
323
324func (rw *readerWriter) BlockMetas(tenantID string) []*backend.BlockMeta {
325 return rw.blocklist.Metas(tenantID)

Callers

nothing calls this directly

Calls 2

BlockMetaMethod · 0.65
CompactedBlockMetaMethod · 0.65

Tested by

no test coverage detected