-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup Filebeat code #1975
Cleanup Filebeat code #1975
Conversation
CloseEOF bool | ||
Backoff time.Duration | ||
MaxBackoff time.Duration | ||
BackoffFactor int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I like BackoffDuration better, as we've got 3 configs with Backoff here. Alternatively:
type BackoffConfig struct {
Duration time.Duration
Max time.Duration
Factor float32
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The naming change is to make reader configs consitent with the harvester config names.
+1 on the suggested struct, but then we should have it in libbeat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what we currently have in libbeat: https://github.com/elastic/beats/blob/master/libbeat/common/backoff.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have the factor as it is just uses *2
. We should do a more generic cleanup across all beats in an other PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -39,6 +27,7 @@ func New(spooler *spooler.Spooler, prospectorConfigs []*common.Config) (*Crawler | |||
return &Crawler{ | |||
spooler: spooler, | |||
prospectorConfigs: prospectorConfigs, | |||
wg: sync.WaitGroup{}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line isn't necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
* Cleanup variable names in filebeat.yml.j2 * Cleanup spooler * Unify variable names
Some simplifications / cleanup to the filebeat code.
Meta issue: #1913