watcher

package
v0.125.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 3 Imported by: 38

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