retrieval: Support multi-root export

This commit is contained in:
Łukasz Magiera
2021-11-22 12:46:17 +01:00
parent b0c043cc2f
commit b26906963b
6 changed files with 182 additions and 100 deletions
+11 -3
View File
@@ -320,12 +320,20 @@ func (w *WrapperV1Full) clientRetrieve(ctx context.Context, order RetrievalOrder
return
}
finish(w.ClientExport(ctx, api.ExportRef{
eref := api.ExportRef{
Root: order.Root,
DatamodelPathSelector: order.DatamodelPathSelector,
FromLocalCAR: order.FromLocalCAR,
DealID: dealID,
}, *ref))
}
if order.DatamodelPathSelector != nil {
s := api.Selector(*order.DatamodelPathSelector)
eref.DAGs = append(eref.DAGs, api.DagSpec{
DataSelector: &s,
})
}
finish(w.ClientExport(ctx, eref, *ref))
}
var _ FullNode = &WrapperV1Full{}