Refactor the output component #2086
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a follow up to #2063.
This PR is focused on re-organizing the newly created CollectorOutput component into its own namespace. It is also grouped together with the sensor formatter, since they are tightly couple at the moment, but this might change in the near future.
A formal
IClient
interface is introduced and implementers of if are grouped into their own namespaces, this should make it easier to implement new output types by simply adding a new client in a separate namespace and implementing the interface. Right now theIClient
interface only accounts for processes, but it will be extended in the near future to take aconst std::variant&
in order for it to also handle network information. This should also make it more flexible for adding newer message types in the future.Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why you did not do so. (Valid reasons include "CI is sufficient" or "No testable changes")
In addition to reviewing your code, reviewers must also review your testing instructions, and make sure they are sufficient.
For more details, ref the Confluence page about this section.