mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Add noopindexer
This commit is contained in:
parent
38d822ec48
commit
4054a914a7
1 changed files with 7 additions and 0 deletions
|
@ -14,6 +14,7 @@ import (
|
||||||
"github.com/anyproto/any-sync/commonspace/acl/aclclient"
|
"github.com/anyproto/any-sync/commonspace/acl/aclclient"
|
||||||
"github.com/anyproto/any-sync/commonspace/deletionmanager"
|
"github.com/anyproto/any-sync/commonspace/deletionmanager"
|
||||||
"github.com/anyproto/any-sync/commonspace/object/keyvalue"
|
"github.com/anyproto/any-sync/commonspace/object/keyvalue"
|
||||||
|
"github.com/anyproto/any-sync/commonspace/object/keyvalue/keyvaluestorage"
|
||||||
"github.com/anyproto/any-sync/commonspace/object/treesyncer"
|
"github.com/anyproto/any-sync/commonspace/object/treesyncer"
|
||||||
"github.com/anyproto/any-sync/commonspace/sync"
|
"github.com/anyproto/any-sync/commonspace/sync"
|
||||||
"github.com/anyproto/any-sync/commonspace/sync/objectsync"
|
"github.com/anyproto/any-sync/commonspace/sync/objectsync"
|
||||||
|
@ -70,6 +71,7 @@ type Deps struct {
|
||||||
SyncStatus syncstatus.StatusUpdater
|
SyncStatus syncstatus.StatusUpdater
|
||||||
TreeSyncer treesyncer.TreeSyncer
|
TreeSyncer treesyncer.TreeSyncer
|
||||||
AccountService accountservice.Service
|
AccountService accountservice.Service
|
||||||
|
Indexer keyvaluestorage.Indexer
|
||||||
}
|
}
|
||||||
|
|
||||||
type spaceService struct {
|
type spaceService struct {
|
||||||
|
@ -181,10 +183,15 @@ func (s *spaceService) NewSpace(ctx context.Context, id string, deps Deps) (Spac
|
||||||
if deps.AccountService != nil {
|
if deps.AccountService != nil {
|
||||||
spaceApp.Register(deps.AccountService)
|
spaceApp.Register(deps.AccountService)
|
||||||
}
|
}
|
||||||
|
var keyValueIndexer keyvaluestorage.Indexer = keyvaluestorage.NoOpIndexer{}
|
||||||
|
if deps.Indexer != nil {
|
||||||
|
keyValueIndexer = deps.Indexer
|
||||||
|
}
|
||||||
spaceApp.Register(state).
|
spaceApp.Register(state).
|
||||||
Register(deps.SyncStatus).
|
Register(deps.SyncStatus).
|
||||||
Register(peerManager).
|
Register(peerManager).
|
||||||
Register(st).
|
Register(st).
|
||||||
|
Register(keyValueIndexer).
|
||||||
Register(keyvalue.New()).
|
Register(keyvalue.New()).
|
||||||
Register(objectsync.New()).
|
Register(objectsync.New()).
|
||||||
Register(sync.NewSyncService()).
|
Register(sync.NewSyncService()).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue