shuttle
shuttle copied to clipboard
[Improvement]: Bump shuttle-tower service to hyper 1.1.0
Describe the improvement
The shuttle-tower service is dependent on hyper 0.14. It would be nice to bump it to hyper 1.1, so that the shuttle-tower service is up to date and ready for the future.
I tried fiddling about this evening, but didn't get far.
The hyper::Server struct is leveraged to build a connection on which to share the Tower service. Hyper 1.1 has removed Server, in favour of eventually incorporating it into the hyper-util crate. The hyper docs provide a server example in which a loop is used to continually listen on a connection and pass the incoming stream to a handler function which is converted to a service using hyper::service_fn.
I'm unclear how to modify this in the context of Shuttle.
I will continue to think, just thought I'd open an issue and start a discussion.
Duplicate declaration
- [X] I have searched the issues and this improvement has not been requested before.
As far as i think, we have to do something like this, not sure I might be wrong too, but I will try after getting docker and setting up project with newer version.
Also serve_connection function takes IO
and Service Function
as a argument, not sure how to pass those two.
This implementation is only to show thinking process, not final code snippet : )