repository: Implement lisiting blobs per pack file

This commit is contained in:
Michael Eischer
2021-08-20 10:09:34 +02:00
parent cc90f2ba6b
commit 153e2ba859
2 changed files with 45 additions and 0 deletions

View File

@@ -60,6 +60,11 @@ type Lister interface {
List(context.Context, FileType, func(FileInfo) error) error
}
type PackBlobs struct {
PackID ID
Blobs []Blob
}
// MasterIndex keeps track of the blobs are stored within files.
type MasterIndex interface {
Has(BlobHandle) bool
@@ -71,4 +76,5 @@ type MasterIndex interface {
// the context is cancelled, the background goroutine terminates. This
// blocks any modification of the index.
Each(ctx context.Context) <-chan PackedBlob
ListPacks(ctx context.Context, packs IDSet) <-chan PackBlobs
}