Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Files is the path to the files to watch Files []string // Rate is the rate at which the file is watched Rate time.Duration // Debug sets the debug mode on the filewatcher Debug bool // Logger is the logger used to print messages Logger nlogger.Provider }
Config is the config of a FileWatcher
type FileWatcher ¶
type FileWatcher struct {
// contains filtered or unexported fields
}
FileWatcher watches over a file given in the config
func New ¶
func New(cfg *Config) *FileWatcher
New creates a new FileWatcher from the given *Config cfg
func (*FileWatcher) Done ¶
func (fw *FileWatcher) Done() <-chan struct{}
Done indicates whether the filewatcher is done
func (*FileWatcher) Watch ¶
func (fw *FileWatcher) Watch() <-chan struct{}
Watch return the channel to which events are written
Click to show internal directories.
Click to hide internal directories.