Skip to content
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

Allow passing readers to collector #52

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Allow passing readers to collector #52

merged 1 commit into from
Sep 26, 2023

Conversation

Itxaka
Copy link
Member

@Itxaka Itxaka commented Sep 25, 2023

This makes it possible to pass a series of readers to collector so when
we scan we get those readers read and merged into the config as if they
were files.

This allows a bit more of flexibility in what the collector consumes as
it makes it possible to receive configs from a different source than a
file and make them part of the final object

Signed-off-by: Itxaka itxaka@kairos.io

@Itxaka Itxaka requested a review from a team September 25, 2023 13:17
@jimmykarily
Copy link
Contributor

I'm assuming you plan to use this here: https://github.com/kairos-io/kairos-agent/pull/150/files . Can you change that PR to use this one so it's clear how this is meant to be used?

This makes it possible to pass a series of readers to collector so when
we scan we get those readers read and merged into the config as if they
were files.

This allows a bit more of flexibility in what the collector consumes as
it makes it possible to receive configs from a different source than a
file and make them part of the final object

Signed-off-by: Itxaka <itxaka@kairos.io>
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #52 (ac348c2) into main (699aa62) will increase coverage by 0.68%.
The diff coverage is 69.23%.

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   45.90%   46.59%   +0.68%     
==========================================
  Files          12       12              
  Lines         854      880      +26     
==========================================
+ Hits          392      410      +18     
- Misses        400      406       +6     
- Partials       62       64       +2     
Files Changed Coverage Δ
collector/collector.go 65.74% <61.90%> (-0.27%) ⬇️
collector/options.go 69.44% <100.00%> (+4.92%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Itxaka Itxaka merged commit 8f54324 into main Sep 26, 2023
4 checks passed
@Itxaka Itxaka deleted the collector_reader branch September 26, 2023 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants