Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.36 KB

README.md

File metadata and controls

29 lines (19 loc) · 1.36 KB

remote-poller

GoDoc

Usage

This library is used to listen on directories typically remote ones for events such as:

  • File added
  • File modified
  • File deleted

This Library handles the polling and notifying the user of an event.

The client needs to provide a means of listing files at the remote location. This can be done by creating an implementation of PolledDirectory.

Instead of providing multiple adapters/implementations to cater for library specific types, this library provides Element.

remote-poller comes with FileElement. This type can be used to convert golang's os.FileInfo interface to Element and be used to create simple filesystem polling examples.

You can create your own Filter. Creating a filter and assigning it to the poller, tells the event manager what Elements you are interested in. This could be a regex filter, allowing events to only occur if Elements name's end in ".zip".

Examples