This commit is contained in:
Sebastien Blot 2021-04-29 14:54:40 +02:00
parent bdea3a2167
commit 8af6685a07
No known key found for this signature in database
GPG key ID: DFC2902F40449F6A

View file

@ -24,9 +24,9 @@ import (
)
type FileConfiguration struct {
Filenames []string
Filename string
configuration.DataSourceCommonCfg
Filenames []string
Filename string
configuration.DataSourceCommonCfg `yaml:",inline"`
}
type FileSource struct {
@ -55,7 +55,6 @@ func (f *FileSource) Configure(Config []byte, logger *log.Entry) error {
return fmt.Errorf("[fileacquisition] no filename or filenames configuration provided")
}
f.config = fileConfig
f.config.Mode = configuration.TAIL_MODE // FIXME
f.watcher, err = fsnotify.NewWatcher()
if err != nil {
return errors.Wrapf(err, "[fileacquisition] Could not create fsnotify watcher")