feat(health): Expose grpc_health_v1 file descriptor set (#620)
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
|
use std::env;
|
||||||
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
|
let grpc_health_v1_descriptor_set_path: PathBuf =
|
||||||
|
PathBuf::from(env::var("OUT_DIR").unwrap()).join("grpc_health_v1.bin");
|
||||||
tonic_build::configure()
|
tonic_build::configure()
|
||||||
|
.file_descriptor_set_path(grpc_health_v1_descriptor_set_path)
|
||||||
.build_server(true)
|
.build_server(true)
|
||||||
.build_client(true)
|
.build_client(true)
|
||||||
.format(false)
|
.format(false)
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ pub mod proto {
|
|||||||
#![allow(unreachable_pub)]
|
#![allow(unreachable_pub)]
|
||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
tonic::include_proto!("grpc.health.v1");
|
tonic::include_proto!("grpc.health.v1");
|
||||||
|
|
||||||
|
pub const GRPC_HEALTH_V1_FILE_DESCRIPTOR_SET: &'static [u8] =
|
||||||
|
tonic::include_file_descriptor_set!("grpc_health_v1");
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod server;
|
pub mod server;
|
||||||
|
|||||||
Reference in New Issue
Block a user