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 DefaultDirForURI ¶ added in v0.8.0
DefaultDirForURI tries to find a default directory to display to user when they choose a specific endpoint. Currently only used for FS, returning ${HOMEDIR}/Cells
func EndpointFromURI ¶
EndpointFromURI parse an URI string to instantiate a proper Endpoint
func NewSnapshotFactory ¶
func NewSnapshotFactory(configPath string, left model.Endpoint, right model.Endpoint) model.SnapshotFactory
NewSnapshotFactory opens a new SnapshotFactory.
Types ¶
type PatchStore ¶
type PatchStore struct {
// contains filtered or unexported fields
}
PatchStore is a persistence layer for storing patches. It is based on BoltDB
func NewPatchStore ¶
func NewPatchStore(folderPath string, source model.Endpoint, target model.Endpoint) (*PatchStore, error)
NewPatchStore opens a new PatchStore
func (*PatchStore) Load ¶
func (p *PatchStore) Load(offset, limit int) (patches []merger.Patch, e error)
Load list all patches
func (*PatchStore) PublishPatch ¶
func (p *PatchStore) PublishPatch(patch merger.Patch)
PublishPatch pushes patch to the persist queue
func (*PatchStore) Store ¶
func (p *PatchStore) Store(patch merger.Patch)
Store pushes the patch to the DB.
type SnapshotFactory ¶
SnapshotFactory implements model.SnapshotProvider interface for persisting snapshots in a BoltDB.
func (*SnapshotFactory) Close ¶ added in v0.8.0
func (f *SnapshotFactory) Close(ctx context.Context) error
Close closes the BoltDB.
func (*SnapshotFactory) Load ¶
func (f *SnapshotFactory) Load(source model.PathSyncSource) (model.Snapshoter, error)
Load creates or loads an existing snapshot from within the application dir