endpoint

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: GPL-3.0 Imports: 22 Imported by: 2

Documentation

Overview

Package endpoint provides some specific factories to provide Endpoints to the sync library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndpointFromURI

func EndpointFromURI(uri string, otherUri string, browseOnly ...bool) (ep model.Endpoint, e error)

EndpointFromURI parse an URI string to instantiate a proper Endpoint

func NewSnapshotFactory

func NewSnapshotFactory(configPath string, left model.Endpoint, right model.Endpoint) model.SnapshotFactory

Types

type PatchStore

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

func NewPatchStore

func NewPatchStore(folderPath string, source model.Endpoint, target model.Endpoint) (*PatchStore, error)

func (*PatchStore) Load

func (p *PatchStore) Load(offset, limit int) (patches []merger.Patch, e error)

func (*PatchStore) PublishPatch

func (p *PatchStore) PublishPatch(patch merger.Patch)

PublishPatch pushes patch to the persist queue

func (*PatchStore) Stop

func (p *PatchStore) Stop()

func (*PatchStore) Store

func (p *PatchStore) Store(patch merger.Patch)

type SnapshotFactory

type SnapshotFactory struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*SnapshotFactory) Load

Load creates or loads an existing snapshot from within the application dir

func (*SnapshotFactory) Reset

func (f *SnapshotFactory) Reset(ctx context.Context) error

Reset clears all snapshots (left and right)

Jump to

Keyboard shortcuts

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