hook noop blockstore for splitstore in DI

This commit is contained in:
vyzo
2021-07-04 18:38:28 +03:00
parent 4d3c73f4ca
commit 5cca29d1db
4 changed files with 17 additions and 4 deletions
+4
View File
@@ -643,6 +643,10 @@ func Repo(r repo.Repo) Option {
Override(new(dtypes.UniversalBlockstore), modules.UniversalBlockstore),
If(cfg.EnableSplitstore,
If(cfg.Splitstore.ColdStoreType == "universal",
Override(new(dtypes.ColdBlockstore), From(new(dtypes.UniversalBlockstore)))),
If(cfg.Splitstore.ColdStoreType == "noop",
Override(new(dtypes.ColdBlockstore), modules.NoopColdBlockstore)),
If(cfg.Splitstore.HotStoreType == "badger",
Override(new(dtypes.HotBlockstore), modules.BadgerHotBlockstore)),
Override(new(dtypes.SplitBlockstore), modules.SplitBlockstore(cfg)),