Help us shape the future of Go! Take the 2026 Go Developer Survey

watcher

package
v0.153.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batcher

type Batcher struct {
	filenotify.FileWatcher

	Events chan []fsnotify.Event // Events are returned on this channel
	// contains filtered or unexported fields
}

Batcher batches file watch events in a given interval.

func New

func New(intervalBatcher, intervalPoll time.Duration, poll bool) (*Batcher, error)

New creates and starts a Batcher with the given time interval. It will fall back to a poll based watcher if native isn't supported. To always use polling, set poll to true.

func (*Batcher) Close

func (b *Batcher) Close()

Close stops the watching of the files.

Directories

Path Synopsis
Package filenotify provides a mechanism for watching file(s) for changes.
Package filenotify provides a mechanism for watching file(s) for changes.

Jump to

Keyboard shortcuts

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