implement DeleteMany in union blockstore
This commit is contained in:
parent
fdd877534f
commit
98a7b884fe
@ -82,6 +82,15 @@ func (m unionBlockstore) DeleteBlock(cid cid.Cid) (err error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m unionBlockstore) DeleteMany(cids []cid.Cid) (err error) {
|
||||||
|
for _, bs := range m {
|
||||||
|
if err = bs.DeleteMany(cids); err != nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
func (m unionBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
|
func (m unionBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
|
||||||
// this does not deduplicate; this interface needs to be revisited.
|
// this does not deduplicate; this interface needs to be revisited.
|
||||||
outCh := make(chan cid.Cid)
|
outCh := make(chan cid.Cid)
|
||||||
|
Loading…
Reference in New Issue
Block a user