multiplex-tonic-hyper

Crates.iomultiplex-tonic-hyper
lib.rsmultiplex-tonic-hyper
version0.1.0
sourcesrc
created_at2022-09-11 00:12:54.001352
updated_at2022-09-11 00:12:54.001352
descriptionMerge a gRPC service and other HTTP service into one service
homepage
repositoryhttps://github.com/eduardo-gomes/multiplex-tonic-hyper/
max_upload_size
id662768
size56,779
Eduardo M Gomes (eduardo-gomes)

documentation

README

Multiplex tonic hyper

  • Note: This is the first crate I made. Just publishing to try crates.io

This implements a service that routes requests based on Content-Type. If starts with application/grpc it sends to the inner gRPC service. If it doesn't, then it sends to the other service.

Examples

Try the examples:

Open the server, them try the web service at http://[::1]:9999.

cargo run --example hello_world_server
cargo run --example hello_world_client
Commit count: 21

cargo fmt