Documentation ¶
Index ¶
- Variables
- func DebounceOnGitOp(e Event) bool
- func IsGeneratedFile(e Event) bool
- type Event
- type Option
- type RecursiveWatcher
- func (rw *RecursiveWatcher) AddDir(path string) error
- func (rw *RecursiveWatcher) Errors() <-chan error
- func (rw *RecursiveWatcher) Events() <-chan Event
- func (rw *RecursiveWatcher) ReadOne(timeout time.Duration) (Event, error)
- func (rw *RecursiveWatcher) Start()
- func (rw *RecursiveWatcher) Stop(timeout time.Duration) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrReadTimeout = errors.New("failed to read an event within the timeout") ErrStopTimeout = errors.New("recursive watcher did not shutdown within the timeout") )
Functions ¶
func DebounceOnGitOp ¶
func IsGeneratedFile ¶
Types ¶
type Option ¶
type Option func(*RecursiveWatcher) error
func WithDetectGitRoot ¶
func WithDetectGitRoot() Option
func WithEventsChannel ¶
func WithGitRoot ¶
type RecursiveWatcher ¶
type RecursiveWatcher struct {
// contains filtered or unexported fields
}
func NewRecursiveWatcher ¶
func (*RecursiveWatcher) AddDir ¶
func (rw *RecursiveWatcher) AddDir(path string) error
func (*RecursiveWatcher) Errors ¶
func (rw *RecursiveWatcher) Errors() <-chan error
func (*RecursiveWatcher) Events ¶
func (rw *RecursiveWatcher) Events() <-chan Event
func (*RecursiveWatcher) ReadOne ¶
func (rw *RecursiveWatcher) ReadOne(timeout time.Duration) (Event, error)
func (*RecursiveWatcher) Start ¶
func (rw *RecursiveWatcher) Start()
Start starts the RecursiveWatcher by running the event loop in a separate goroutine. This method waits until the goroutine has started before returning. Call Stop to stop the watcher and wait for it to shut down.
Click to show internal directories.
Click to hide internal directories.