Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWatcher ¶
func CreateWatcher(ctx context.Context, desc string, opts *CreateWatcherOpts)
CreateWatcher creates a watcher labelled with the provided description and running with the provided options. The created watcher will create a subcontext from the provided ctx and register it with the process manager.
Types ¶
type CreateWatcherOpts ¶
type CreateWatcherOpts struct { // PathsCallback is used to set the required paths to watch PathsCallback func(func(path, name string, d fs.DirEntry, err error) error) error // BeforeCallback is called before any files are watched BeforeCallback func() // Between Callback is called between after a watched event has occurred BetweenCallback func() // AfterCallback is called as this watcher ends AfterCallback func() }
CreateWatcherOpts are options to configure the watcher
Click to show internal directories.
Click to hide internal directories.