Closed pixelspark closed 2 years ago
You need to pass a Service
that is Clone
.
All Service
s provided by axum
are Clone
by default.
RouterService
implements Clone
if service wrapped in it implements it. So you need to make sure wrapped gRPC service is Clone
.
I think it is a good idea to add HTTP+gRPC
example.
Let me know if this helps.
Let me know if this helps.
Absolutely, this works like a charm! Thanks so much (and indeed, good idea to add this example, should probably end up in this repo?)
Hey, I am implementing the same http+grpc , and I can see the example has been deleted , can I get it from anywhere ? Thank you
@itsyaasir I removed it because it wasn't up to date. I will write a new example for the new api and let you know when its done.
@itsyaasir I removed it because it wasn't up to date. I will write a new example for the new api and let you know when its done.
Thank you , I appreciate that
@itsyaasir Let me know if this example works for you.
@itsyaasir Let me know if this example works for you.
Absolutely, it worked, I got the general idea of the implementation. Thank you
I am trying to build a hybrid HTTP + gRPC server using Axum and Tonic following this example. I am struggling a bit however on how to combine this with axum-server to have both over TLS:
The issue seems to be that axum_server requires a 'Service' whereas the regular 'bind' accepts some sort of 'IntoService' (and the
hybrid
function, as well as grpc_service, create this). Any ideas?