treesyncer

package
v0.13.0-alpha.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.object.treesyncer"

Variables

This section is empty.

Functions

This section is empty.

Types

type PullFilter

type PullFilter interface {
	ShouldPull(ctx context.Context, objectId string, rootChange *treechangeproto.RawTreeChangeWithId, heads []string) bool
}

PullFilter is an optional extension of the registered TreeSyncer. When a head update arrives for a tree that does not exist locally, objectsync consults it before queueing the fetch: returning false swallows the update and the tree is not pulled. rootChange is the tree's raw root (carried by every head update; its header — including changeType — is cleartext) and heads are the sender's current heads. TreeSyncers that do not implement the interface keep the default always-pull behavior.

type TreeSyncer

type TreeSyncer interface {
	app.ComponentRunnable
	StartSync()
	StopSync()
	ShouldSync(peerId string) bool
	SyncAll(ctx context.Context, p peer.Peer, existing, missing []string) error
}

Directories

Path Synopsis
Package mock_treesyncer is a generated GoMock package.
Package mock_treesyncer is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL