Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IFace ¶
type IFace interface { Init() error Watch() Register(func(bts []byte)) UpdateBytes() error ReadFile() ([]byte, error) }
IFace interface for the the file system watcher.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher is a wrapper for `fsnotify` that provides the registration of a callback for WRITE events. It uses a 5 second polling fallback to periodically reload dcdr file changes, in the event that the watcher does not fire.
func (*Watcher) UpdateBytes ¶ added in v0.2.2
UpdateBytes reads the contents of `path` and passes the bytes to `writeCallback`.
Click to show internal directories.
Click to hide internal directories.