Skip to content

Commit

Permalink
feat(health): Expose grpc_health_v1 file descriptor set (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
byblakeorriver committed Jul 13, 2021
1 parent 99fdc98 commit 6ee638d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tonic-health/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
use std::env;
use std::path::PathBuf;

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()
.file_descriptor_set_path(grpc_health_v1_descriptor_set_path)
.build_server(true)
.build_client(true)
.format(false)
Expand Down
3 changes: 3 additions & 0 deletions tonic-health/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ pub mod proto {
#![allow(unreachable_pub)]
#![allow(missing_docs)]
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;
Expand Down

0 comments on commit 6ee638d

Please sign in to comment.