Skip to content

Commit

Permalink
Add missing configuration annotations (#21736)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch authored Oct 13, 2020
1 parent 7addb4d commit b0fbfae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion filebeat/input/filestream/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type config struct {

Paths []string `config:"paths"`
Close closerConfig `config:"close"`
FileWatcher *common.ConfigNamespace `config:"file_watcher"`
FileWatcher *common.ConfigNamespace `config:"prospector"`
FileIdentity *common.ConfigNamespace `config:"file_identity"`
CleanInactive time.Duration `config:"clean_inactive" validate:"min=0"`
CleanRemoved bool `config:"clean_removed"`
Expand Down
11 changes: 5 additions & 6 deletions filebeat/input/filestream/fswatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ type fileScanner struct {

type fileWatcherConfig struct {
// Interval is the time between two scans.
Interval time.Duration
Interval time.Duration `config:"check_interval"`
// Scanner is the configuration of the scanner.
Scanner fileScannerConfig
Scanner fileScannerConfig `config:",inline"`
}

// fileWatcher gets the list of files from a FSWatcher and creates events by
Expand Down Expand Up @@ -212,10 +212,9 @@ func (w *fileWatcher) Event() loginp.FSEvent {
}

type fileScannerConfig struct {
Paths []string
ExcludedFiles []match.Matcher
Symlinks bool
RecursiveGlob bool
ExcludedFiles []match.Matcher `config:"exclude_files"`
Symlinks bool `config:"symlinks"`
RecursiveGlob bool `config:"recursive_glob"`
}

func defaultFileScannerConfig() fileScannerConfig {
Expand Down

0 comments on commit b0fbfae

Please sign in to comment.