Skip to content

Initial refactoring to support production workers #214

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

Merged
merged 16 commits into from
Oct 23, 2022
Merged

Conversation

calebbrown
Copy link
Contributor

This PR is the initial part of refactoring to make it easier to support the various use-cases of the project - in-particular the productionization towards Milestone 2.

The following changes are in this PR:

  • rename collector.Collector to signal.Source
    • update docs as well
    • this change reduces the "overloading" of the term "Collector"
  • move most packages from cmd/collect_signals -> internal/collector
  • generalize input file opening
  • removes support for multiple input files - this makes the code simpler and less error prone
  • bumps some dep versions

This normalizes the logic of scorer and collect_signals.

If someone has multiple inputs to collect_signals they can be aggregated
by using cat. e.g: cat file1.txt file2.txt | collect_signals - out.csv

Signed-off-by: Caleb Brown <[email protected]>
Signed-off-by: Caleb Brown <[email protected]>
Signed-off-by: Caleb Brown <[email protected]>
Signed-off-by: Caleb Brown <[email protected]>
This is to free up the name "collector", and to represent better that
each of the structs is meant to represent a single source of signals.

This is a part of larger refactoring work to support productionization
and a simpler CLI tool.

Signed-off-by: Caleb Brown <[email protected]>
This allows the eventual simple reuse of signal collection across
binaries.

Signed-off-by: Caleb Brown <[email protected]>
Signed-off-by: Caleb Brown <[email protected]>
@calebbrown calebbrown merged commit 16ee912 into main Oct 23, 2022
@calebbrown calebbrown deleted the workerize branch October 23, 2022 23:31
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