feat: Implement gRPC Reflection Service (#340)

Co-authored-by: Samani G. Gikandi <[email protected]>
This commit is contained in:
James Nugent
2021-02-16 11:07:51 -05:00
committed by GitHub
co-authored by Samani G. Gikandi
parent f49d4bdf99
commit c54f24721c
15 changed files with 1524 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
use std::env;
use std::path::PathBuf;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let reflection_descriptor =
PathBuf::from(env::var("OUT_DIR").unwrap()).join("reflection_v1alpha1.bin");
tonic_build::configure()
.file_descriptor_set_path(&reflection_descriptor)
.build_server(true)
.build_client(true) // Client is only used for tests
.format(true)
.compile(&["proto/reflection.proto"], &["proto/"])?;
Ok(())
}