1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-10 18:10:54 +09:00

Add tree and acl sync objects

This commit is contained in:
mcrakhman 2024-06-14 23:16:20 +02:00
parent 4186db2b1e
commit ac08c01120
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
21 changed files with 319 additions and 528 deletions

View file

@ -14,6 +14,7 @@ type BroadcastOptions struct {
type InnerHeadUpdate interface {
Marshall(data ObjectMeta) ([]byte, error)
Heads() []string
}
type ObjectMeta struct {

View file

@ -55,6 +55,7 @@ func (o *objectSync) HandleHeadUpdate(ctx context.Context, headUpdate drpc.Messa
if !ok {
return nil, fmt.Errorf("object %s does not support sync", obj.Id())
}
// TODO: add heads receive check somewhere (on object level?)
return objHandler.HandleHeadUpdate(ctx, update)
}

View file

@ -1,7 +1,3 @@
package syncdeps
type Response interface {
// heads []string
// changes []*treechangeproto.RawTreeChangeWithId
// root *treechangeproto.RawTreeChangeWithId
}
type Response interface{}