headsync

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteDiff

func NewRemoteDiff(spaceId string, client Client) ldiff.Remote

Types

type Client

type Client interface {
	HeadSync(ctx context.Context, in *spacesyncproto.HeadSyncRequest) (*spacesyncproto.HeadSyncResponse, error)
}

type DiffSyncer

type DiffSyncer interface {
	Sync(ctx context.Context) error
	RemoveObjects(ids []string)
	UpdateHeads(id string, heads []string)
	Init(deletionState settingsstate.ObjectDeletionState)
	Close() error
}

type HeadSync

type HeadSync interface {
	Init(objectIds []string, deletionState settingsstate.ObjectDeletionState)

	UpdateHeads(id string, heads []string)
	HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error)
	RemoveObjects(ids []string)
	AllIds() []string
	DebugAllHeads() (res []TreeHeads)

	Close() (err error)
}

func NewHeadSync

func NewHeadSync(
	spaceId string,
	spaceIsDeleted *atomic.Bool,
	syncPeriod int,
	configuration nodeconf.NodeConf,
	storage spacestorage.SpaceStorage,
	peerManager peermanager.PeerManager,
	cache treemanager.TreeManager,
	syncStatus syncstatus.StatusUpdater,
	credentialProvider credentialprovider.CredentialProvider,
	log logger.CtxLogger) HeadSync

type TreeHeads

type TreeHeads struct {
	Id    string
	Heads []string
}

Directories

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

Jump to

Keyboard shortcuts

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