synctree

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSyncTreeClosed  = errors.New("sync tree is closed")
	ErrSyncTreeDeleted = errors.New("sync tree is deleted")
)

Functions

This section is empty.

Types

type BuildDeps

type BuildDeps struct {
	SpaceId            string
	SyncClient         objectsync.SyncClient
	Configuration      nodeconf.NodeConf
	HeadNotifiable     HeadNotifiable
	Listener           updatelistener.UpdateListener
	AclList            list.AclList
	SpaceStorage       spacestorage.SpaceStorage
	TreeStorage        treestorage.TreeStorage
	OnClose            func(id string)
	SyncStatus         syncstatus.StatusUpdater
	PeerGetter         ResponsiblePeersGetter
	BuildObjectTree    objecttree.BuildObjectTreeFunc
	WaitTreeRemoteSync bool
}

type HeadNotifiable

type HeadNotifiable interface {
	UpdateHeads(id string, heads []string)
}

type ListenerSetter

type ListenerSetter interface {
	SetListener(listener updatelistener.UpdateListener)
}

type ReceiveQueue

type ReceiveQueue interface {
	AddMessage(senderId string, msg *treechangeproto.TreeSyncMessage, replyId string) (queueFull bool)
	GetMessage(senderId string) (msg *treechangeproto.TreeSyncMessage, replyId string, err error)
	ClearQueue(senderId string)
}

type ResponsiblePeersGetter

type ResponsiblePeersGetter interface {
	GetResponsiblePeers(ctx context.Context) (peers []peer.Peer, err error)
}

type SyncTree

type SyncTree interface {
	objecttree.ObjectTree
	synchandler.SyncHandler
	ListenerSetter
	SyncWithPeer(ctx context.Context, peerId string) (err error)
}

func BuildSyncTreeOrGetRemote

func BuildSyncTreeOrGetRemote(ctx context.Context, id string, deps BuildDeps) (t SyncTree, err error)

func PutSyncTree

func PutSyncTree(ctx context.Context, payload treestorage.TreeStorageCreatePayload, deps BuildDeps) (t SyncTree, err error)

Directories

Path Synopsis
Package mock_synctree is a generated GoMock package.
Package mock_synctree is a generated GoMock package.
mock_updatelistener
Package mock_updatelistener is a generated GoMock package.
Package mock_updatelistener is a generated GoMock package.

Jump to

Keyboard shortcuts

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