Client connection pools
Resolves #1479
TODO:
- [x] Web socket support is broken possibly due to the dynamic handler registration
- [x] Try to revert the channel after closed web socket for reuse, or invalidate it in the pool if that is not possible
- [x] Check if the current handlers already automatically handle the connect/keep-alive headers or if it has to be added
- [x] Invalidate the failed channels in the pool
- [x] Configuration for the pools
- [x] Cleanup
- [x] Tons of tests
Codecov Report
Base: 59.23% // Head: 59.70% // Increases project coverage by +0.47% :tada:
Coverage data is based on head (
8c52b48) compared to base (bdad790). Patch coverage: 77.30% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## main #1493 +/- ##
==========================================
+ Coverage 59.23% 59.70% +0.47%
==========================================
Files 111 113 +2
Lines 3949 4053 +104
Branches 117 118 +1
==========================================
+ Hits 2339 2420 +81
- Misses 1610 1633 +23
| Impacted Files | Coverage Δ | |
|---|---|---|
| zio-http/src/main/scala/zio/http/Channel.scala | 61.53% <ø> (ø) |
|
| ...ain/scala/zio/http/netty/NettyFutureExecutor.scala | 85.71% <ø> (ø) |
|
| ...io-http/src/main/scala/zio/http/ClientConfig.scala | 58.82% <33.33%> (-7.85%) |
:arrow_down: |
| ...ttp/netty/client/ClientResponseStreamHandler.scala | 62.50% <50.00%> (-37.50%) |
:arrow_down: |
| ...p/netty/client/ClientInboundStreamingHandler.scala | 87.50% <60.00%> (-2.50%) |
:arrow_down: |
| ...n/scala/zio/http/netty/client/ConnectionPool.scala | 71.08% <71.08%> (ø) |
|
| ...a/zio/http/netty/client/ClientInboundHandler.scala | 80.76% <87.50%> (+7.43%) |
:arrow_up: |
| zio-http/src/main/scala/zio/http/ZClient.scala | 49.25% <97.56%> (+3.79%) |
:arrow_up: |
| zio-http/src/main/scala/zio/http/Response.scala | 79.16% <100.00%> (ø) |
|
| ...ain/scala/zio/http/netty/client/ChannelState.scala | 100.00% <100.00%> (ø) |
|
| ... and 1 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@vigoo Should we just merge this?
If it's ok that it depends on a snapshot ZIO version we can merge it, otherwise wait for 2.0.3