watcher

package
v0.0.0-...-a67a4a9 Latest Latest
Warning

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

Go to latest
Published: May 15, 2022 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchFile

func WatchFile(path string, handler func() error, clientID string) (*fsnotify.Watcher, error)

WatchFile is a resilient file watcher that handles file renames Special features:

  1. This debounces multiple quick changes before invoking the callback
  2. After the callback, resubscribe to the file to handle file renames that change the file inode clientID for logging of who is doing the watching. path to watch handler to invoke on change

This returns the fsnotify watcher. Close it when done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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