feat(tvix/store): implement reflection

This implements grpc.reflection.v1alpha.ServerReflection, and will make tools
like evans automatically discover available services, without having to
specify the path to the .proto files client-side.

It's behind a reflection feature flag, which is enabled by default.

Change-Id: Icbcb5eb05ceede5b9952e38a2ba72eaa6fa8a437
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7435
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2022-11-26 01:14:02 +00:00 committed by flokli
parent 51243007f6
commit 0bf2b0ef11
7 changed files with 144 additions and 27 deletions

16
tvix/Cargo.lock generated
View file

@ -1987,6 +1987,21 @@ dependencies = [
"syn 1.0.103",
]
[[package]]
name = "tonic-reflection"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0455f730d540a1484bffc3c55c94100b18a662597b982c2e9073f2c55c602616"
dependencies = [
"bytes",
"prost",
"prost-types",
"tokio",
"tokio-stream",
"tonic",
"tonic-build",
]
[[package]]
name = "tower"
version = "0.4.13"
@ -2156,6 +2171,7 @@ dependencies = [
"tokio-stream",
"tonic",
"tonic-build",
"tonic-reflection",
]
[[package]]