(blockID uuid.UUID, tenantID string)
| 76 | } |
| 77 | |
| 78 | func (rw *readerWriter) CompactedBlockMeta(blockID uuid.UUID, tenantID string) (*backend.CompactedBlockMeta, error) { |
| 79 | if len(tenantID) == 0 { |
| 80 | return nil, backend.ErrEmptyTenantID |
| 81 | } |
| 82 | if blockID == uuid.Nil { |
| 83 | return nil, backend.ErrEmptyBlockID |
| 84 | } |
| 85 | |
| 86 | compactedMetaFileName := backend.CompactedMetaFileName(blockID, tenantID, rw.cfg.Prefix) |
| 87 | bytes, info, err := rw.readAllWithObjInfo(context.TODO(), compactedMetaFileName) |
| 88 | if err != nil { |
| 89 | return nil, readError(err) |
| 90 | } |
| 91 | |
| 92 | out := &backend.CompactedBlockMeta{} |
| 93 | err = json.Unmarshal(bytes, out) |
| 94 | if err != nil { |
| 95 | return nil, err |
| 96 | } |
| 97 | out.CompactedTime = info.LastModified |
| 98 | |
| 99 | return out, nil |
| 100 | } |
nothing calls this directly
no test coverage detected