headsync

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

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

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()
	Close() error
}

type HeadSync

type HeadSync interface {
	app.ComponentRunnable
	ExternalIds() []string
	DebugAllHeads() (res []TreeHeads)
	AllIds() []string
	UpdateHeads(id string, heads []string)
	HandleRangeRequest(ctx context.Context, req *spacesyncproto.HeadSyncRequest) (resp *spacesyncproto.HeadSyncResponse, err error)
	RemoveObjects(ids []string)
}

func New added in v0.2.0

func New() 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