watcher

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Debouncer

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

func NewDebouncer

func NewDebouncer(duration time.Duration) *Debouncer

func (*Debouncer) Stop added in v0.5.0

func (d *Debouncer) Stop()

func (*Debouncer) Trigger

func (d *Debouncer) Trigger(fn func())

type Watcher

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

func NewWatcher

func NewWatcher(paths []string, ignore []string) (*Watcher, error)

func NewWatcherWithDebounce added in v0.4.0

func NewWatcherWithDebounce(paths []string, ignore []string, debounce time.Duration) (*Watcher, error)

func (*Watcher) OnChange

func (w *Watcher) OnChange(fn func(path string))

func (*Watcher) Start

func (w *Watcher) Start(ctx context.Context) error

func (*Watcher) Stop

func (w *Watcher) Stop()

Jump to

Keyboard shortcuts

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