Removing unavailable endpoints from a balance channel
- Dominant language
- Rust
- Stars
- 12.5k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 24
Description
## Feature Request
### Crates
I suspect this is related to the transport module so this change would belong in the `tonic` crate?
### Motivation
This is somewhat related to https://github.com/hyperium/tonic/issues/643. Implementing the suggestion in this issue almost works, but the error given when an endpoint is unavailable is insufficient to complete the implementation. `Status` appears to contain the following in my case: `Status { code: Unavailable, message: "error trying to connect: tcp connect error: Connection refused (os error 111)", source: Some(tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })))) }`
Since the error doesn't actually say which endpoint was unavailable, it's not possible to know which endpoint to remove from the channel.
### Proposal
The unavailable endpoint should be a part of the `Status` struct.
Contributor guide
Assessment
This issue has not been assessed yet.