Closed heartforit closed 1 month ago
I tried: https://crates.io/crates/tonic-async-interceptor But it its apart from the current main implementation, but it seems to work.
Works with this matching version combination (took me hours to figure that out)
[dependencies]
tonic = "0.11"
prost = "0.12"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
tower = "0.4.13"
futures-util = "0.3.30"
tonic-async-interceptor = "0.11.1"
[build-dependencies]
tonic-build = "0.11"
Hi,
I was wondering after hours of research how to implement a simple async interceptor method without tons of boilerplate code. I scanned the examples folder without success. In my opinion, it should be easy for the developer to write and handle async code with rust. My ugly solution for now is
But this code is pretty bad. How can I improve it? I could not find anything useful.
Best