batcher

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 2 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 {
	*fsnotify.Watcher

	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(interval time.Duration) (*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's supported. To always use polling, set poll to true.

func (*Batcher) Close

func (b *Batcher) Close()

Close stops the watching of the files.

Jump to

Keyboard shortcuts

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