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

refactor common code from http and grpc subsystem into a service #82

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

huesflash
Copy link
Contributor

@huesflash huesflash commented Oct 10, 2023

Pros:

  • This will help keep common code in one place
  • flexibility for wrapping service code with various frameworks (ex: gin, fiber)
  • existing api is maintained

Cons:

  • some extra copies for translating protbufs into request arguments
  • naming isn't great

@huesflash huesflash changed the title refactor common code into service refactor common code from http and grpc subsystem into a service Oct 11, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #82 (c12c453) into main (6695ab3) will decrease coverage by 0.48%.
The diff coverage is 81.63%.

@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
- Coverage   67.87%   67.39%   -0.48%     
==========================================
  Files          54       55       +1     
  Lines        5892     5824      -68     
==========================================
- Hits         3999     3925      -74     
- Misses       1613     1616       +3     
- Partials      280      283       +3     
Files Coverage Δ
internal/app/subsystems/api/http/http.go 87.17% <100.00%> (+0.90%) ⬆️
internal/app/subsystems/api/http/promise.go 29.92% <67.50%> (-34.60%) ⬇️
internal/app/subsystems/api/grpc/grpc.go 80.21% <75.25%> (-3.55%) ⬇️
internal/app/subsystems/api/service/service.go 87.31% <87.31%> (ø)

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

@dfarr
Copy link
Member

dfarr commented Oct 16, 2023

🎉 🎉 Thank you so much @huesflash, your PR is the first open contribution to resonate!!!

I love the idea to factor out the common code into a delegated service. It also makes a lot of sense if (when) we decide to support additional protocols.

@dfarr dfarr self-requested a review October 16, 2023 20:57
@huesflash
Copy link
Contributor Author

Added the missing service test!
Should help with coverage as well

@dfarr
Copy link
Member

dfarr commented Oct 19, 2023

Thank you @huesflash !

@dfarr dfarr merged commit dfa76d9 into resonatehq:main Oct 19, 2023
3 of 4 checks passed
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