mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
19 lines
490 B
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
|
|
}
|