(blockID uuid.UUID, tenantID string)
| 90 | } |
| 91 | |
| 92 | func (rw *Azure) CompactedBlockMeta(blockID uuid.UUID, tenantID string) (*backend.CompactedBlockMeta, error) { |
| 93 | if len(tenantID) == 0 { |
| 94 | return nil, backend.ErrEmptyTenantID |
| 95 | } |
| 96 | if blockID == uuid.Nil { |
| 97 | return nil, backend.ErrEmptyBlockID |
| 98 | } |
| 99 | name := backend.CompactedMetaFileName(blockID, tenantID, rw.cfg.Prefix) |
| 100 | |
| 101 | bytes, modTime, err := rw.readAllWithModTime(context.Background(), name) |
| 102 | if err != nil { |
| 103 | return nil, readError(err) |
| 104 | } |
| 105 | |
| 106 | out := &backend.CompactedBlockMeta{} |
| 107 | err = json.Unmarshal(bytes, out) |
| 108 | if err != nil { |
| 109 | return nil, err |
| 110 | } |
| 111 | out.CompactedTime = modTime |
| 112 | |
| 113 | return out, nil |
| 114 | } |
| 115 | |
| 116 | func (rw *Azure) readAllWithModTime(ctx context.Context, name string) ([]byte, time.Time, error) { |
| 117 | bytes, _, err := rw.readAll(ctx, name) |
nothing calls this directly
no test coverage detected