Add support for in-memory-based protocols for no-IO easier client-server testing
- Dominant language
- Rust
- Stars
- 12.5k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 24
Description
## Feature Request
### Crates
- `tonic`?
- `tokio-stream`?
### Motivation
When testing `tonic` routes in CI at scale, it may be beneficial to use tonic over a protocol that can be implemented in-process and in-memory in the interest of testing time.
### Proposal
Implement a `TcpListener`-like struct that satisfies the constraints of `tonic::transport::Server::server_with_incoming()`:
```
stream: impl tokio_stream::Stream>,
...
where
IO: AsyncRead + AsyncWrite + Connected + Unpin + Send + 'static,
IO::ConnectInfo: Clone + Send + Sync + 'static,
IE: std::error::Error + Send + Sync + 'static,
```
### Alternatives
You could implement this in `tokio-stream` somehow maybe?
Contributor guide
Assessment
This issue has not been assessed yet.