Add tower-h2 and more macro

This commit is contained in:
Lucio Franco
2019-08-11 13:48:13 -04:00
parent aef683fe35
commit 404f7d8931
16 changed files with 727 additions and 33 deletions
@@ -3,7 +3,6 @@
use std::time::Duration;
use tokio::timer::Delay;
use tonic::{Request, Response, Status};
use tonic_macros::grpc;
// #[derive(Debug)]
// struct HelloRequest;
@@ -15,7 +14,7 @@ struct MyGreeter {
data: String,
}
#[grpc(service = "proto/helloworld.proto")]
#[tonic::server(service = "proto/helloworld.proto")]
impl MyGreeter {
pub async fn say_hello(&self, request: Request<()>) -> Result<Response<()>, Status> {
println!("Got a request: {:?}", request);