-
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
Improve Filebeat organisiation and Cleanup #1894
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,16 +8,15 @@ import ( | |
) | ||
|
||
type ProspectorStdin struct { | ||
Prospector *Prospector | ||
harvester *harvester.Harvester | ||
started bool | ||
harvester *harvester.Harvester | ||
started bool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why we need 'started'? How often do we expect someone to call Run in ProspectorStdin? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember I introduced it because there was an issue in the past that it was started twice. Will have to check in more detail if it is still needed. Lots of changes have happened ;-) Will put in my list for future clean ups. |
||
} | ||
|
||
// NewProspectorStdin creates a new stdin prospector | ||
// This prospector contains one harvester which is reading from stdin | ||
func NewProspectorStdin(p *Prospector) (*ProspectorStdin, error) { | ||
|
||
prospectorer := &ProspectorStdin{ | ||
Prospector: p, | ||
} | ||
prospectorer := &ProspectorStdin{} | ||
|
||
var err error | ||
|
||
|
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.
can we change the go routine to:
The prospector shouldn't need to know someone is waiting for stop having finished. Simple form of abstraction leak.
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.
done