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

refactored plugin handlings #6

Merged
merged 8 commits into from
Apr 23, 2022
Merged

refactored plugin handlings #6

merged 8 commits into from
Apr 23, 2022

Conversation

sio4
Copy link
Member

@sio4 sio4 commented Apr 16, 2022

  • added an interface Plugin for Checker and Exporter
  • remove init() function and implemented Plugins() function with reflect package. Oh, this is over-engineering.
  • changed register functions to be compatible with the above changes
  • cleaned up and simplified exporters and checkers.

@codecov
Copy link

codecov bot commented Apr 16, 2022

Codecov Report

Merging #6 (98b56b9) into main (49e8706) will increase coverage by 42.13%.
The diff coverage is 68.32%.

@@             Coverage Diff             @@
##             main       #6       +/-   ##
===========================================
+ Coverage   29.58%   71.71%   +42.13%     
===========================================
  Files          16       17        +1     
  Lines         622      693       +71     
===========================================
+ Hits          184      497      +313     
+ Misses        438      183      -255     
- Partials        0       13       +13     
Impacted Files Coverage Δ
internal/common/gcp.go 100.00% <ø> (ø)
exporters/stackdriver.go 4.31% <7.24%> (+0.31%) ⬆️
meari/server.go 73.68% <33.33%> (+73.68%) ⬆️
cmd/bogo/main.go 35.48% <66.66%> (+35.48%) ⬆️
internal/common/context.go 88.88% <80.00%> (-11.12%) ⬇️
checks/ping.go 85.36% <80.95%> (+80.36%) ⬆️
exporters/exporters.go 82.60% <88.88%> (+36.45%) ⬆️
checks/checks.go 100.00% <100.00%> (+53.84%) ⬆️
checks/heartbeat.go 100.00% <100.00%> (+84.00%) ⬆️
exporters/stdout.go 100.00% <100.00%> (+83.33%) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49e8706...98b56b9. Read the comment docs.

@sio4 sio4 self-assigned this Apr 18, 2022
@sio4 sio4 merged commit 520a801 into main Apr 23, 2022
@sio4 sio4 deleted the refactoring branch April 23, 2022 03:57
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.

1 participant