1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00
any-sync/commonspace/object/treesyncer/treesyncer.go

19 lines
490 B
Go

//go:generate mockgen -destination mock_treesyncer/mock_treesyncer.go github.com/anyproto/any-sync/commonspace/object/treesyncer TreeSyncer
package treesyncer
import (
"context"
"github.com/anyproto/any-sync/app"
"github.com/anyproto/any-sync/net/peer"
)
const CName = "common.object.treesyncer"
type TreeSyncer interface {
app.ComponentRunnable
StartSync()
StopSync()
ShouldSync(peerId string) bool
SyncAll(ctx context.Context, p peer.Peer, existing, missing []string) error
}