watch

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: AGPL-3.0 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 {
	Path      string
	Op        fsnotify.Op
	Timestamp time.Time
}

Event represents a filesystem event

type IncrementalIndexer

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

IncrementalIndexer handles incremental indexing of changed files

func NewIncrementalIndexer

func NewIncrementalIndexer(vaultRoot string, cfg *config.Config, db *sql.DB) *IncrementalIndexer

NewIncrementalIndexer creates a new incremental indexer

func (*IncrementalIndexer) ProcessEvent

func (ii *IncrementalIndexer) ProcessEvent(event Event) error

ProcessEvent processes a single filesystem event Uses transaction-per-batch pattern: opens DB, applies updates in transaction, commits and closes

type Watcher

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

Watcher manages filesystem watching for a vault

func NewWatcher

func NewWatcher(vaultRoot string) (*Watcher, error)

NewWatcher creates a new filesystem watcher

func (*Watcher) Errors

func (w *Watcher) Errors() <-chan error

Errors returns the errors channel

func (*Watcher) Events

func (w *Watcher) Events() <-chan Event

Events returns the events channel

func (*Watcher) Start

func (w *Watcher) Start() error

Start starts watching the filesystem

func (*Watcher) Stop

func (w *Watcher) Stop() error

Stop stops watching

Jump to

Keyboard shortcuts

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