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

View file

@ -3792,6 +3792,7 @@ rec {
"default" = [ "std" ];
"std" = [ "prost/std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"quick-error" = rec {
crateName = "quick-error";
@ -5501,7 +5502,7 @@ rec {
"time" = [ "tokio/time" ];
"tokio-util" = [ "dep:tokio-util" ];
};
resolvedDefaultFeatures = [ "default" "time" ];
resolvedDefaultFeatures = [ "default" "net" "time" ];
};
"tokio-util" = rec {
crateName = "tokio-util";
@ -5770,6 +5771,53 @@ rec {
};
resolvedDefaultFeatures = [ "default" "prost" "prost-build" "transport" ];
};
"tonic-reflection" = rec {
crateName = "tonic-reflection";
version = "0.5.0";
edition = "2018";
sha256 = "05i6c1fcbwkkj0p2r63vb5iac60b22a5rif3zx5li8a0slqgfm84";
authors = [
"James Nugent <james@jen20.com>"
"Samani G. Gikandi <samani@gojulas.com>"
];
dependencies = [
{
name = "bytes";
packageId = "bytes";
}
{
name = "prost";
packageId = "prost";
}
{
name = "prost-types";
packageId = "prost-types";
}
{
name = "tokio";
packageId = "tokio";
features = [ "sync" ];
}
{
name = "tokio-stream";
packageId = "tokio-stream";
features = [ "net" ];
}
{
name = "tonic";
packageId = "tonic";
features = [ "codegen" "prost" ];
}
];
buildDependencies = [
{
name = "tonic-build";
packageId = "tonic-build";
features = [ "transport" "prost" ];
}
];
};
"tower" = rec {
crateName = "tower";
version = "0.4.13";
@ -6429,6 +6477,11 @@ rec {
name = "tonic";
packageId = "tonic";
}
{
name = "tonic-reflection";
packageId = "tonic-reflection";
optional = true;
}
];
buildDependencies = [
{
@ -6446,7 +6499,12 @@ rec {
packageId = "test-case";
}
];
features = {
"default" = [ "reflection" ];
"reflection" = [ "tonic-reflection" ];
"tonic-reflection" = [ "dep:tonic-reflection" ];
};
resolvedDefaultFeatures = [ "default" "reflection" "tonic-reflection" ];
};
"typenum" = rec {
crateName = "typenum";