experiment with some tests

This commit is contained in:
Dominic Breuker
2018-02-23 22:26:57 +01:00
parent a517fe25de
commit d59ec7f1a8
7 changed files with 215 additions and 41 deletions

View File

@@ -6,6 +6,18 @@ import (
"golang.org/x/sys/unix"
)
type InotifyWatcher struct{}
func NewInotifyWatcher() *InotifyWatcher {
return &InotifyWatcher{}
}
func (i *InotifyWatcher) Setup(rdirs, dirs []string) (chan struct{}, chan string, error) {
triggerCh := make(chan struct{})
fsEventCh := make(chan string)
return triggerCh, fsEventCh, nil
}
type Inotify struct {
fd int
watchers map[int]*watcher