Questions tagged [rust-tonic]

37 questions
0
votes
0 answers

How to add Channel with composite credential in rust Tonic like the gRPC c++ library

In gRPC C++ library, we can create a channel which based on a composite credentials. For example: auto call_credentials = grpc::MetadataCredentialsFromPlugin(std::unique_ptr( new…
R.yan
  • 2,214
  • 1
  • 16
  • 33
0
votes
0 answers

How to securely generate a session token that can be independently verified by Auth instances

I'm currently working on making an authentication gRPC microservice using Rust and Tonic. The simple idea is that my service generates a token that can later be used to reference back to the UserID. I save this token and user relationship in a redis…
Vinylize
  • 1
  • 1
0
votes
1 answer

oneshot::channel `tokio::sync::oneshot::Receiver<()>` is not an iterator add `use futures_util::FutureExt`

In the tokio tests I see they use oneshot::channel together with serve_with_shutdown but the the compiler tells me to add use futures_util::future::future::FutureExt but as you can see in the example below I already added that trait to the…
Cesc
  • 904
  • 1
  • 9
  • 17
0
votes
1 answer

Unable to acquire the right form of ownership to repository

I'm trying to write a small webapp communicating with a client (aka Slave in this code) over gRPC (using Tonic) and I'm getting stuck almost at the very beginning. I want the slave to be able to self-register by invoking the register() function over…
Kamil Janowski
  • 1,872
  • 2
  • 21
  • 43
0
votes
1 answer

Retrieving the request body in a tower layer to sign GRPC requests

I'm attempting to implement an authentication layer on top of grpc (through tonic) with the tower middleware layer functionality. In order to do that I need to get the body of the request, consisting of the protobuf payload that is being sent to the…
cdecker
  • 4,515
  • 8
  • 46
  • 75
0
votes
1 answer

Unpinning a BoxStream to send using Tonic gRPC stream

I am new to Rust and writing a simple application that will stream some values over gRPC, using Tonic. These values are initially acquired from an external library as a BoxStream (Pin>), and tonic's API requires something that implements…
0
votes
1 answer

How do I perform a half-close on a gRPC bidirectional stream using Tonic?

I am implementing a Rust library for Google's Dialogflow streaming detect intent utilizing gRPC using the Tonic library. Streaming works fine, but I need to send a half-close call once all audio data are pushed into stream. Without this, the detect…
Adam Bezecny
  • 195
  • 1
  • 11
1 2
3