top

Package notify implements access to filesystem events.

Notify is a high-level abstraction over filesystem watchers like inotify, kqueue, FSEvents, FEN or ReadDirectoryChangesW. Watcher implementations are split into two groups: ones that natively support recursive notifications (FSEvents and ReadDirectoryChangesW) and ones that do not (inotify, kqueue, FEN). For more details see watcher and recursiveWatcher interfaces in watcher.go source file.

On top of filesystem watchers notify maintains a watchpoint tree, which provides strategy for creating and closing filesystem watches and dispatching filesystem events to user channels.

An event set is just an event list joint using bitwise OR operator into a single event value.

A filesystem watch or just a watch is platform-specific entity which represents a single path registered for notifications for specific event set. Setting a watch means using platform-specific API calls for creating / initializing said watch. For each watcher the API call is:

- FSEvents: FSEventStreamCreate
- inotify:  notify_add_watch
- kqueue:   kevent
- ReadDirectoryChangesW: CreateFile+ReadDirectoryChangesW
- FEN:      port_get

To rewatch means to either shrink or expand an event set that was previously registered during watch operation for particular filesystem watch.

A watchpoint is a list of user channel and event set pairs for particular path (watchpoint tree's node). A single watchpoint can contain multiple different user channels registered to listen for one or more events. A single user channel can be registered in one or more watchpoints, recurisve and non-recursive ones as well.

Imported by 54 package(s)

  1. github.com/HaoZeke/goYoda/pkg/pandoc
  2. github.com/LicaSterian/unsub/users
  3. github.com/OrlovEvgeny/TinyJPG
  4. github.com/QubitProducts/logspray/sources/filesystem
  5. github.com/Travix-International/Travix.Core.Adk
  6. github.com/Travix-International/appix
  7. github.com/TrilliumIT/undocker-dns
  8. github.com/alecthomas/buildkit
  9. github.com/atelierdisko/dsk
  10. github.com/barakmich/livemd
  11. github.com/blackss2/utility/hotserver
  12. github.com/clarenceb/backend/watch
  13. github.com/cortesi/moddwatch
  14. github.com/cortex/gopass
  15. github.com/crackcomm/renderer/storage
  16. github.com/crackcomm/renderer/watcher
  17. github.com/cryptrol/nfa
  18. github.com/dwlnetnl/treewatch
  19. github.com/ekino/golisten
  20. github.com/fanyang1988/etcddir
  21. github.com/flesnuk/biku/osuhm
  22. github.com/g8os/controller/jswatcher
  23. github.com/gliderlabs/gosper/com/dev
  24. github.com/gorook/rook
  25. github.com/hlandau/degoutils/web/assetmgr
  26. github.com/jakdept/dir
  27. github.com/jonaz/devd/modd
  28. github.com/limetext/backend/watch
  29. github.com/limetext/lime-backend/watch
  30. github.com/lox/binarystar
  31. github.com/lox/golisten
  32. github.com/lucas-clemente/goldfish/git
  33. github.com/martinp/gounpack/dispatcher
  34. github.com/minio/mc/cmd
  35. github.com/mmatczuk/monitoring/check
  36. github.com/ncbray/crank/watch
  37. github.com/neil-ca-moore/language-tool
  38. github.com/nohupped/taken
  39. github.com/osuripple/hanayo
  40. github.com/pdxjohnny/freeze-tool/connected
  41. github.com/peppage/ComicLaser/monitor
  42. github.com/philpearl/watch
  43. github.com/rekby/etcddir
  44. github.com/rgburke/grv/cmd/grv
  45. github.com/rjeczalik/cmd/notify
  46. github.com/rrborja/brute
  47. github.com/supiyun/devd
  48. github.com/thatguystone/acrylic
  49. github.com/thehowl/dustman
  50. github.com/unbalancedparentheses/stalk
  51. github.com/vancluever/fspubsub/sub
  52. github.com/wangyuhere/devd/modd
  53. github.com/xpzouying/devd
  54. github.com/yml/degoutils/web/assetmgr

Imported only in test by 6 package(s)

  1. github.com/Fiery/notify
  2. github.com/adg/notify
  3. github.com/advanderveer/notify
  4. github.com/cortesi/notify
  5. github.com/fsnotify/notify
  6. github.com/pblaszczyk/notify