feat: Rename api related to protobuf (#1224)
This commit is contained in:
@@ -16,12 +16,13 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
||||
|
||||
/// Generated protobuf types from the `grpc.reflection.v1alpha` package.
|
||||
pub mod proto {
|
||||
pub mod pb {
|
||||
#![allow(unreachable_pub)]
|
||||
#![allow(missing_docs)]
|
||||
#![allow(rustdoc::invalid_html_tags)]
|
||||
include!("generated/grpc.reflection.v1alpha.rs");
|
||||
|
||||
/// Byte encoded FILE_DESCRIPTOR_SET.
|
||||
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("generated/reflection_v1alpha1.bin");
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::proto::server_reflection_request::MessageRequest;
|
||||
use crate::proto::server_reflection_response::MessageResponse;
|
||||
pub use crate::proto::server_reflection_server::{ServerReflection, ServerReflectionServer};
|
||||
use crate::proto::{
|
||||
use crate::pb::server_reflection_request::MessageRequest;
|
||||
use crate::pb::server_reflection_response::MessageResponse;
|
||||
pub use crate::pb::server_reflection_server::{ServerReflection, ServerReflectionServer};
|
||||
use crate::pb::{
|
||||
ExtensionNumberResponse, FileDescriptorResponse, ListServiceResponse, ServerReflectionRequest,
|
||||
ServerReflectionResponse, ServiceResponse,
|
||||
};
|
||||
@@ -109,7 +109,7 @@ impl<'b> Builder<'b> {
|
||||
/// Build a gRPC Reflection Service to be served via Tonic.
|
||||
pub fn build(mut self) -> Result<ServerReflectionServer<impl ServerReflection>, Error> {
|
||||
if self.include_reflection_service {
|
||||
self = self.register_encoded_file_descriptor_set(crate::proto::FILE_DESCRIPTOR_SET);
|
||||
self = self.register_encoded_file_descriptor_set(crate::pb::FILE_DESCRIPTOR_SET);
|
||||
}
|
||||
|
||||
for encoded in &self.encoded_file_descriptor_sets {
|
||||
|
||||
Reference in New Issue
Block a user