mkopylec / charon-spring-boot-starter

Reverse proxy implementation in form of a Spring Boot starter.
Apache License 2.0
245 stars 55 forks source link

Support to implement LoadBalancer based on request method, url and headers #125

Closed moonfruit closed 3 years ago

codecov-commenter commented 3 years ago

Codecov Report

Merging #125 (03d9173) into master (f6311c9) will decrease coverage by 0.05%. The diff coverage is 88.23%.

:exclamation: Current head 03d9173 differs from pull request most recent head 66955b4. Consider uploading reports for the commit 66955b4 to get more accurate results Impacted file tree graph

@@             Coverage Diff              @@
##             master     #125      +/-   ##
============================================
- Coverage     90.80%   90.75%   -0.06%     
  Complexity      542      542              
============================================
  Files           167      168       +1     
  Lines          1849     1860      +11     
  Branches         54       54              
============================================
+ Hits           1679     1688       +9     
- Misses          148      150       +2     
  Partials         22       22              
Impacted Files Coverage Δ
...rding/interceptors/rewrite/RandomLoadBalancer.java 100.00% <ø> (ø)
...ding/interceptors/rewrite/BodilessHttpRequest.java 80.00% <80.00%> (ø)
...ptors/rewrite/CommonRequestServerNameRewriter.java 100.00% <100.00%> (ø)
...nterceptors/rewrite/RequestServerNameRewriter.java 100.00% <100.00%> (ø)
...nterceptors/rewrite/RequestServerNameRewriter.java 100.00% <100.00%> (ø)

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 f6311c9...66955b4. Read the comment docs.

mkopylec commented 3 years ago

Done in https://github.com/mkopylec/charon-spring-boot-starter/commit/03d9173795e114c6d0bf19f9b20ad64ca971d50e

mkopylec commented 3 years ago

Released in 4.10.0

moonfruit commented 3 years ago

@mkopylec I think both requests implement the same interface is better than create a new object contains the headers. Because it avoids memory allocation and gives the chance that implements LoadBanlancer for webmvc or webflux only. And use default methods in interface LoadBanlancer will keep the API stable and has no impact on any other implement by the third party.