Skip to main content
-1 votes
2 answers
100 views

I try to send a message into a tonic stream, but I get SendError { .. } I do pub struct EventRoute { tx: mpsc::Sender<Result<Message, Status>>, } #[tonic::async_trait] mpl Event for ...
Vana's user avatar
  • 980
0 votes
2 answers
129 views

Setup I'm playing with tonic helloworld tutorial. The only changes I made is that in say_hello, just before returning the reply, I added: std::thread::sleep(std::time::Duration::from_millis(10000)); ...
Colin Pitrat's user avatar
  • 2,102
1 vote
1 answer
91 views

I follow https://github.com/hyperium/tonic/blob/master/examples/src/tower/server.rs to capture body content of a rpc request before calling logic request. But I get: type mismatch resolving `<...
Vana's user avatar
  • 980
3 votes
2 answers
314 views

I have axum and tonic running on the same server like the following: let state = AppState { rate_limiter: Arc::new(RateLimiter::new(10, Duration::from_secs(60))), // 10 requests per minute ...
danthegoodman's user avatar
0 votes
1 answer
183 views

I need to serve a folder created by vitejs. I do pub fn serve_dir() -> Router { let serve_dir = ServeDir::new("web/dist"); Router::new() .route_service("/", ...
Vana's user avatar
  • 980
0 votes
0 answers
125 views

I would like to return error from tower middleware and tonic. But I don't know how to do that. I tried to return Err, like a Result Returning Ok work I do #[derive(Debug, Clone)] struct MyMiddleware&...
Vana's user avatar
  • 980
0 votes
1 answer
150 views

I’m trying to perform a simple upload to Google Cloud Storage using gRPC and the generated protos, but I’m running into an issue with the WriteObjectRequest. The error I’m getting is: An x-goog-...
Aman Kumar's user avatar
0 votes
1 answer
297 views

I have two versions of a layer, EndpointTimer_1 and EndpointTimer_2 which track slightly different metrics. I want EndpointTimer_1 to be applied to Server_1 and EndpointTimer_2 to applied to Server_2. ...
gmoss's user avatar
  • 997
0 votes
1 answer
392 views

I want to export spans using the OpenTelemetry Protocol from inside of a tonic service. My attempts to do this seemingly result in deadlock. I've created a minimal example here. Here's a summary: I ...
Alex Martin's user avatar
0 votes
2 answers
874 views

I have a web server in actix-web and recently I built a different C++ server. I decided to implement gRPC as a communication bridge between the 2. But I don't know how to integrate actix web + tonic (...
Chris Kay's user avatar
2 votes
0 answers
238 views

I have a server-side streaming RPC server and the stream returned by the function is meant to "drop" intermediate updates (in the sense of not returning the from .next()) based on how fast ....
dspyz's user avatar
  • 5,604
0 votes
0 answers
133 views

When doing server-side streaming in tonic, the generated async function is expected to return something which implements Stream. If I construct my stream by taking a receiver and then calling .map(...
dspyz's user avatar
  • 5,604
0 votes
1 answer
1k views

I developed middleware using Tower and have been applying it to tonic services via the layer method. However layer applies middleware to all services. I need to apply my middleware to particular ...
Teimuraz's user avatar
  • 9,435
1 vote
1 answer
701 views

I'm using tonic-web combined with a React web frontend using @protobuf-ts/grpcweb-transport and @protobuf-ts/plugin. I'm following this tutorial https://www.youtube.com/watch?v=kerKXChDmsE (no need to ...
qaxdxzh3fi's user avatar
0 votes
0 answers
273 views

I don't have much experience with Tonic (or Rust) and I'm trying to figure out the correct pattern for setting up a service. Basically, I have the following code: Server::builder() .add_service(...
eof's user avatar
  • 609

15 30 50 per page