feat: add gRPC reflection service (#17)

* feat: add grpc reflection

* feat: add grpc reflection
This commit is contained in:
LFC
2023-03-20 21:23:58 +08:00
committed by GitHub
parent dcf253314a
commit eb760d2192
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -12,8 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use std::path::PathBuf;
fn main() {
let out_dir = PathBuf::from(
std::env::var("OUT_DIR")
.expect("cargo built-in env value 'OUT_DIR' must be set during compilation"),
);
tonic_build::configure()
.file_descriptor_set_path(out_dir.join("greptime_grpc_desc.bin"))
.compile(
&[
"proto/greptime/v1/database.proto",
+2
View File
@@ -14,4 +14,6 @@
tonic::include_proto!("greptime.v1");
pub const GREPTIME_GRPC_DESC: &[u8] = tonic::include_file_descriptor_set!("greptime_grpc_desc");
pub mod meta;