-
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
Restructure topbeat to make functions available as library #1172
Conversation
Not directly related to the PR, but it would be time to update the new Beat dev guide. It's using Topbeat so this will make it even more outdated, but we'd anyway have to speak about the generator, about the single repo, etc. OTOH, the guide doesn't really seem to be required :-). |
@tsg Fully agree for the Dev Guide. Needs urgently an update / restructuring. I think it needs to be less focused on the first step of creating the beat, but then how to proceed from there. What are sync / async publisher, how to use ucfg etc. |
@@ -0,0 +1,19 @@ | |||
package system |
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 am not sure if sigar.go
is the best name for this file especially after you split the sigar functions into multiple dedicated files. As it contains for now only Round
function, I would go for common.go
and it can be considered the place for all the common system functions.
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 renamed it to common.go
LGTM |
@ruflin Please rebase to master, so I can easily merge it. |
Topbeat has lots of functionality which can be reused in other libraries, especially topbeat. To decouple the functionality from topbeat, this PR restructures Topbeat into the beater part and the library part. This makes is possible to reuse and share the functionality between Topbeat and Metricbeat. Further steps should be taken later to also better split up the testing and introduce ucfg in topbeat. This refactoring did not change any functionality or output of topbeat.
@monicasarbu Rebase done and newest version pushed. |
@ruflin Great, thanks |
Restructure topbeat to make functions available as library
Topbeat has lots of functionality which can be reused in other libraries, especially topbeat. To decouple the functionality from topbeat, this PR restructures Topbeat into the beater part and the library part. This makes is possible to reuse and share the functionality between Topbeat and Metricbeat.
Further steps should be taken later to also better split up the testing and introduce ucfg in topbeat.
This refactoring did not change any functionality or output of topbeat.