watcher

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IndexFunc

type IndexFunc func(ctx context.Context, projectName, rootPath string) error

IndexFunc is the callback signature for triggering a re-index.

type Watcher

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

Watcher polls indexed projects for file changes and triggers re-indexing.

func New

func New(r *store.StoreRouter, indexFn IndexFunc) *Watcher

New creates a Watcher. indexFn is called when file changes are detected.

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context)

Run blocks until ctx is cancelled. Ticks at baseInterval, polling each project only when its adaptive interval has elapsed.

Jump to

Keyboard shortcuts

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