fswatch

package
v1.29.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package fswatch provies Watch(), a utility function to watch a filesystem path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watch

func Watch(logger *logrus.Entry, path string, batchFor time.Duration, processEvent func()) (func(), error)

Watch watches the filesystem path `path`. When anything changes, changes are batched for the period `batchFor`, then `processEvent` is called.

Returns a cancel() function to terminate the watch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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