Add space and document creation logic for client

This commit is contained in:
mcrakhman committed 2022-10-18 14:17:49 +02:00
1 parent 09e3eb3e54
commit 6201951e3b
14 files changed
+583 -376

No files matched your search

@@ -17,6 +17,7 @@ type DiffService interface {
HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error)
UpdateHeads(id string, heads []string)
RemoveObject(id string)
AllIds() []string
Init(objectIds []string)
Close() (err error)
@@ -72,6 +73,10 @@ func (d *diffService) UpdateHeads(id string, heads []string) {
})
}
func (d *diffService) AllIds() []string {
return d.diff.Ids()
}
func (d *diffService) RemoveObject(id string) {
// TODO: add space document to remove ids
d.diff.RemoveId(id)