headsync

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.commonspace.headsync"

Variables

This section is empty.

Functions

Types

type Client

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

type DiffManager added in v0.9.5

type DiffManager struct {
	// contains filtered or unexported fields
}

func NewDiffManager added in v0.9.5

func NewDiffManager(
	diffContainer ldiff.DiffContainer,
	storage spacestorage.SpaceStorage,
	syncAcl syncacl.SyncAcl,
	log logger.CtxLogger,
	ctx context.Context,
	deletionState deletionstate.ObjectDeletionState,
	keyValue kvinterfaces.KeyValueService,
) *DiffManager

func (*DiffManager) AllIds added in v0.9.5

func (dm *DiffManager) AllIds() []string

func (*DiffManager) FillDiff added in v0.9.5

func (dm *DiffManager) FillDiff(ctx context.Context) error

func (*DiffManager) HandleRangeRequest added in v0.9.5

func (dm *DiffManager) HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error)

func (*DiffManager) TryDiff added in v0.9.5

func (dm *DiffManager) TryDiff(ctx context.Context, rdiff RemoteDiff) (newIds, changedIds, removedIds []string, err error)

func (*DiffManager) UpdateHeads added in v0.9.5

func (dm *DiffManager) UpdateHeads(update headstorage.HeadsUpdate)

type DiffSyncer

type DiffSyncer interface {
	Sync(ctx context.Context) error
	Init()
	Close()
}

type HeadSync

type HeadSync interface {
	app.ComponentRunnable
	ExternalIds() []string
	AllIds() []string
	HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error)
}

func New added in v0.2.0

func New() HeadSync

type RemoteDiff added in v0.3.11

type RemoteDiff interface {
	ldiff.RemoteTypeChecker
	ldiff.Remote
}

func NewRemoteDiff

func NewRemoteDiff(spaceId string, client Client) RemoteDiff

type TreeHeads

type TreeHeads struct {
	Id    string
	Heads []string
}

Directories

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

Jump to

Keyboard shortcuts

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