github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/filesystem/watching/watch_recursive.go (about)

     1  package watching
     2  
     3  // RecursiveWatcher is the interface implemented by recursive filesystem
     4  // watching implementations. It is not safe for concurrent usage, though the
     5  // channels returned by its methods may (and should) be polled simultaneously.
     6  type RecursiveWatcher interface {
     7  	// Events returns a channel that provides the paths of event notifications.
     8  	Events() <-chan string
     9  	// Errors returns a channel that is populated if a watch error occurs. If an
    10  	// error occurs, then the watcher should be terminated. If Terminate is
    11  	// invoked before any other error occurs, then it will be populated by
    12  	// ErrWatchTerminated.
    13  	Errors() <-chan error
    14  	// Terminate terminates all watching operations and releases any resources
    15  	// associated with the watcher.
    16  	Terminate() error
    17  }