Documentation ¶ Index ¶ Variables type Config type WatchPath type Watcher func NewWatcher(name string, config *Config, log *zap.Logger) *Watcher func (b *Watcher) Watch(ctx context.Context, fn func(paths []string) error) error 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 Source Files ¶ View all Source files watcher.go Click to show internal directories. Click to hide internal directories.