sync

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Kind   EventKind
	Source string
	Result *source.SyncResult // nil for start events
	Err    error              // non-nil if source failed
}

Event is emitted during sync to report per-source progress.

type EventKind

type EventKind int

EventKind identifies the type of sync progress event.

const (
	EventSourceStart EventKind = iota
	EventSourceDone
	EventManifestError
)

type Options

type Options struct {
	SourceNames []string
	Force       bool
	DryRun      bool
	MaxParallel int
	Clean       bool
	OnEvent     func(Event) // optional; nil = silent
}

type RunResult

type RunResult struct {
	Sources    int
	Downloaded int
	Deleted    int
	Skipped    int
	Errors     int
}

RunResult contains aggregate counts from a completed sync run.

func Run

func Run(ctx context.Context, cfg *config.Config, opts Options) (*RunResult, error)

Jump to

Keyboard shortcuts

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