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

Method CompactedBlockMeta

tempodb/backend/gcs/compactor.go:81–97  ·  view source on GitHub ↗
(blockID uuid.UUID, tenantID string)

Source from the content-addressed store, hash-verified

79}
80
81func (rw *readerWriter) CompactedBlockMeta(blockID uuid.UUID, tenantID string) (*backend.CompactedBlockMeta, error) {
82 name := backend.CompactedMetaFileName(blockID, tenantID, rw.cfg.Prefix)
83
84 bytes, attrs, err := rw.readAll(context.Background(), name)
85 if err != nil {
86 return nil, readError(err)
87 }
88
89 out := &backend.CompactedBlockMeta{}
90 err = json.Unmarshal(bytes, out)
91 if err != nil {
92 return nil, err
93 }
94 out.CompactedTime = attrs.LastModified
95
96 return out, nil
97}

Callers

nothing calls this directly

Calls 4

readAllMethod · 0.95
CompactedMetaFileNameFunction · 0.92
readErrorFunction · 0.70
UnmarshalMethod · 0.65

Tested by

no test coverage detected