mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Implement stream
This commit is contained in:
parent
687a97ee32
commit
1e374945e1
2 changed files with 10 additions and 2 deletions
|
@ -196,6 +196,10 @@ func (st *AclState) Invites() []crypto.PubKey {
|
|||
return invites
|
||||
}
|
||||
|
||||
func (st *AclState) Key() crypto.PrivKey {
|
||||
return st.key
|
||||
}
|
||||
|
||||
func (st *AclState) InviteIds() []string {
|
||||
var invites []string
|
||||
for invId := range st.inviteKeys {
|
||||
|
|
|
@ -66,8 +66,9 @@ type SpaceService interface {
|
|||
}
|
||||
|
||||
type Deps struct {
|
||||
SyncStatus syncstatus.StatusUpdater
|
||||
TreeSyncer treesyncer.TreeSyncer
|
||||
SyncStatus syncstatus.StatusUpdater
|
||||
TreeSyncer treesyncer.TreeSyncer
|
||||
AccountService accountservice.Service
|
||||
}
|
||||
|
||||
type spaceService struct {
|
||||
|
@ -176,6 +177,9 @@ func (s *spaceService) NewSpace(ctx context.Context, id string, deps Deps) (Spac
|
|||
return nil, err
|
||||
}
|
||||
spaceApp := s.app.ChildApp()
|
||||
if deps.AccountService != nil {
|
||||
spaceApp.Register(deps.AccountService)
|
||||
}
|
||||
spaceApp.Register(state).
|
||||
Register(deps.SyncStatus).
|
||||
Register(peerManager).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue