watcher

package
v0.179.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Stop = errors.New("stop watching")

Functions

This section is empty.

Types

type Config

type Config struct {
	// WatchPaths is the list of filenames or directories to watch for changes.
	WatchPaths []*WatchPath
	// IgnorePaths is the list of patterns to ignore for changes.
	IgnorePaths []string
}

type WatchPath added in v0.99.3

type WatchPath struct {
	Optional bool
	Path     string
}

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

func NewWatcher

func NewWatcher(name string, config *Config, log *zap.Logger) *Watcher

func (*Watcher) Watch

func (b *Watcher) Watch(ctx context.Context, fn func(paths []string) error) error

Watch function

Jump to

Keyboard shortcuts

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