fswatcher

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FSWatcher added in v0.13.0

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

FSWatcher watches for changes to a directory on the filesystem and sends a notification to eventCh every time a file in the folder is changed. Although it's possible to watch for individual files, that's not recommended; watch for the file's parent folder instead. That is because, like in Kubernetes which uses system links on mounted volumes, the file may be deleted and recreated with a different inode.

func New added in v0.13.0

func New(opts Options) (*FSWatcher, error)

func (*FSWatcher) Run added in v0.13.0

func (f *FSWatcher) Run(ctx context.Context, eventCh chan<- struct{}) error

type Options added in v0.13.0

type Options struct {
	// Targets is a list of directories to watch for changes.
	Targets []string
}

Options are the options for the FSWatcher.

Jump to

Keyboard shortcuts

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