sync

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

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

func NewDaemon

func NewDaemon(engine *Engine, notesDir string, interval time.Duration) *Daemon

func (*Daemon) SetObsidianDir

func (d *Daemon) SetObsidianDir(dir string)

func (*Daemon) Start

func (d *Daemon) Start() error

func (*Daemon) Status

func (d *Daemon) Status() (bool, int, error)

func (*Daemon) Stop

func (d *Daemon) Stop() error

type Engine

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

func NewEngine

func NewEngine(store *storage.NoteStore, notesDir string) *Engine

func (*Engine) AllSyncStatuses

func (e *Engine) AllSyncStatuses() ([]*storage.SyncState, error)

func (*Engine) Connectors

func (e *Engine) Connectors() map[string]connectors.Connector

func (*Engine) ListConflicts

func (e *Engine) ListConflicts() ([]*storage.SyncState, error)

func (*Engine) ProcessQueue

func (e *Engine) ProcessQueue() (int, error)

func (*Engine) PullAll

func (e *Engine) PullAll() error

func (*Engine) PullNote

func (e *Engine) PullNote(noteID string) error

func (*Engine) PushAll

func (e *Engine) PushAll() error

func (*Engine) PushNote

func (e *Engine) PushNote(noteID string) error

func (*Engine) QueueLength

func (e *Engine) QueueLength() (int, error)

func (*Engine) RegisterConnector

func (e *Engine) RegisterConnector(name string, c connectors.Connector)

func (*Engine) ResolveConflict

func (e *Engine) ResolveConflict(noteID, backend, strategy string) error

func (*Engine) SetHooks

func (e *Engine) SetHooks(preSync, postSync, onConflict string)

func (*Engine) SetRetryLimit

func (e *Engine) SetRetryLimit(limit int)

func (*Engine) SyncAll

func (e *Engine) SyncAll() error

func (*Engine) SyncStatus

func (e *Engine) SyncStatus(noteID string) ([]*storage.SyncState, error)

type Status

type Status int
const (
	StatusUnknown Status = iota
	StatusSynced
	StatusPending
	StatusConflict
	StatusFailed
	StatusLocalOnly
)

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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