mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Add object receive
This commit is contained in:
parent
3a22302fda
commit
56715227bf
3 changed files with 5 additions and 1 deletions
|
@ -128,7 +128,7 @@ func buildSyncTree(ctx context.Context, peerId string, deps BuildDeps) (t SyncTr
|
|||
headUpdate := syncTree.syncClient.CreateHeadUpdate(t, nil)
|
||||
// send to everybody, because everybody should know that the node or client got new tree
|
||||
syncTree.syncClient.Broadcast(headUpdate)
|
||||
deps.SyncStatus.HeadsApply(peerId, syncTree.Id(), syncTree.Heads(), true)
|
||||
deps.SyncStatus.ObjectReceive(peerId, syncTree.Id(), syncTree.Heads())
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
|
@ -23,6 +23,9 @@ func (n *noOpSyncStatus) Name() (name string) {
|
|||
func (n *noOpSyncStatus) HeadsChange(treeId string, heads []string) {
|
||||
}
|
||||
|
||||
func (n *noOpSyncStatus) ObjectReceive(senderId, treeId string, heads []string) {
|
||||
}
|
||||
|
||||
func (n *noOpSyncStatus) HeadsApply(senderId, treeId string, heads []string, allAdded bool) {
|
||||
}
|
||||
|
||||
|
|
|
@ -11,5 +11,6 @@ type StatusUpdater interface {
|
|||
|
||||
HeadsChange(treeId string, heads []string)
|
||||
HeadsReceive(senderId, treeId string, heads []string)
|
||||
ObjectReceive(senderId, treeId string, heads []string)
|
||||
HeadsApply(senderId, treeId string, heads []string, allAdded bool)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue