poc: shared loki source component #4645
Draft
+362
−18
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.
PR Description
We have talked about having a shared library / functionallity for loki.source.*
Reason for this is that they all follow the same pattern but having their own implementation.
We usually have to fix deadlocks and other issues for each of these so having a shared implementation that they all can re-use makes it easier for us to test and fix issues for all of them.
Most component have either one or more sources, a source could be a file, server etc. So with something like this it should be possible to implement most of them using this kind of library, will probably have to adjust it a bit once we start to port component.
The shared component will start up a consume loop and a scheduling loop. Each implementation till pass a factory that will create sources (file, server etc).
They will all also use the same way of running targets and closing mechanism.
Which issue(s) this PR fixes
Notes to the Reviewer
PR Checklist