Skip to main content

run_rustapi_and_grpc

Function run_rustapi_and_grpc 

Source
pub async fn run_rustapi_and_grpc<GF, GE>(
    app: RustApi,
    http_addr: impl AsRef<str>,
    grpc_future: GF,
) -> Result<()>
where GF: Future<Output = Result<(), GE>> + Send, GE: Error + Send + Sync + 'static,
Expand description

Run a RustApi HTTP server and any gRPC future side-by-side.

grpc_future is typically a Tonic server future: tonic::transport::Server::builder().add_service(...).serve(addr).