feat(retrievalstoremgr): add retrievalstoremgr
add manager for retrievals to handle different cases for IPFS/non-ipfs
This commit is contained in:
@@ -35,6 +35,7 @@ import (
|
||||
"github.com/filecoin-project/lotus/node/modules/dtypes"
|
||||
"github.com/filecoin-project/lotus/node/repo"
|
||||
"github.com/filecoin-project/lotus/node/repo/importmgr"
|
||||
"github.com/filecoin-project/lotus/node/repo/retrievalstoremgr"
|
||||
"github.com/filecoin-project/lotus/paychmgr"
|
||||
)
|
||||
|
||||
@@ -156,3 +157,13 @@ func RetrievalClient(lc fx.Lifecycle, h host.Host, mds dtypes.ClientMultiDstore,
|
||||
})
|
||||
return client, nil
|
||||
}
|
||||
|
||||
// ClientRetrievalStoreManager is the default version of the RetrievalStoreManager that runs on multistore
|
||||
func ClientRetrievalStoreManager(imgr dtypes.ClientImportMgr) dtypes.ClientRetrievalStoreManager {
|
||||
return retrievalstoremgr.NewMultiStoreRetrievalStoreManager(imgr)
|
||||
}
|
||||
|
||||
// ClientBlockstoreRetrievalStoreManager is the default version of the RetrievalStoreManager that runs on multistore
|
||||
func ClientBlockstoreRetrievalStoreManager(bs dtypes.ClientBlockstore) dtypes.ClientRetrievalStoreManager {
|
||||
return retrievalstoremgr.NewBlockstoreRetrievalStoreManager(bs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user