diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-14 16:29:33 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-14 16:29:33 -0600 |
| commit | 0432cfbbb07f234dd2cd294cfe7dfa065b113182 (patch) | |
| tree | cab9f759b7d656dab92eab48694e5924c54b9644 /vendor/tonic-reflection/src | |
| parent | 5a74d3988d8a029f1c879da709db623611aa545a (diff) | |
| parent | e0b38f6ca22b28a0c4fe4192d642fceb48030737 (diff) | |
Merge branch 'the-spice-must-flow' into 'main'
Add SpiceDB Integration with Service-based Routing
See merge request gitlab-org/software-supply-chain-security/authorization/authzd!9
Diffstat (limited to 'vendor/tonic-reflection/src')
| -rw-r--r-- | vendor/tonic-reflection/src/generated/grpc_reflection_v1.rs | 461 | ||||
| -rw-r--r-- | vendor/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs | 461 | ||||
| -rw-r--r-- | vendor/tonic-reflection/src/generated/reflection_v1_fds.rs | 161 | ||||
| -rw-r--r-- | vendor/tonic-reflection/src/generated/reflection_v1alpha1_fds.rs | 153 | ||||
| -rw-r--r-- | vendor/tonic-reflection/src/lib.rs | 66 | ||||
| -rw-r--r-- | vendor/tonic-reflection/src/server/mod.rs | 326 | ||||
| -rw-r--r-- | vendor/tonic-reflection/src/server/v1.rs | 138 | ||||
| -rw-r--r-- | vendor/tonic-reflection/src/server/v1alpha.rs | 138 |
8 files changed, 0 insertions, 1904 deletions
diff --git a/vendor/tonic-reflection/src/generated/grpc_reflection_v1.rs b/vendor/tonic-reflection/src/generated/grpc_reflection_v1.rs deleted file mode 100644 index 569ee671..00000000 --- a/vendor/tonic-reflection/src/generated/grpc_reflection_v1.rs +++ /dev/null @@ -1,461 +0,0 @@ -// This file is @generated by prost-build. -/// The message sent by the client when calling ServerReflectionInfo method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ServerReflectionRequest { - #[prost(string, tag = "1")] - pub host: ::prost::alloc::string::String, - /// To use reflection service, the client should set one of the following - /// fields in message_request. The server distinguishes requests by their - /// defined field and then handles them using corresponding methods. - #[prost(oneof = "server_reflection_request::MessageRequest", tags = "3, 4, 5, 6, 7")] - pub message_request: ::core::option::Option< - server_reflection_request::MessageRequest, - >, -} -/// Nested message and enum types in `ServerReflectionRequest`. -pub mod server_reflection_request { - /// To use reflection service, the client should set one of the following - /// fields in message_request. The server distinguishes requests by their - /// defined field and then handles them using corresponding methods. - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum MessageRequest { - /// Find a proto file by the file name. - #[prost(string, tag = "3")] - FileByFilename(::prost::alloc::string::String), - /// Find the proto file that declares the given fully-qualified symbol name. - /// This field should be a fully-qualified symbol name - /// (e.g. <package>.<service>\[.<method>\] or <package>.<type>). - #[prost(string, tag = "4")] - FileContainingSymbol(::prost::alloc::string::String), - /// Find the proto file which defines an extension extending the given - /// message type with the given field number. - #[prost(message, tag = "5")] - FileContainingExtension(super::ExtensionRequest), - /// Finds the tag numbers used by all known extensions of the given message - /// type, and appends them to ExtensionNumberResponse in an undefined order. - /// Its corresponding method is best-effort: it's not guaranteed that the - /// reflection service will implement this method, and it's not guaranteed - /// that this method will provide all extensions. Returns - /// StatusCode::UNIMPLEMENTED if it's not implemented. - /// This field should be a fully-qualified type name. The format is - /// <package>.<type> - #[prost(string, tag = "6")] - AllExtensionNumbersOfType(::prost::alloc::string::String), - /// List the full names of registered services. The content will not be - /// checked. - #[prost(string, tag = "7")] - ListServices(::prost::alloc::string::String), - } -} -/// The type name and extension number sent by the client when requesting -/// file_containing_extension. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExtensionRequest { - /// Fully-qualified type name. The format should be <package>.<type> - #[prost(string, tag = "1")] - pub containing_type: ::prost::alloc::string::String, - #[prost(int32, tag = "2")] - pub extension_number: i32, -} -/// The message sent by the server to answer ServerReflectionInfo method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ServerReflectionResponse { - #[prost(string, tag = "1")] - pub valid_host: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub original_request: ::core::option::Option<ServerReflectionRequest>, - /// The server sets one of the following fields according to the message_request - /// in the request. - #[prost(oneof = "server_reflection_response::MessageResponse", tags = "4, 5, 6, 7")] - pub message_response: ::core::option::Option< - server_reflection_response::MessageResponse, - >, -} -/// Nested message and enum types in `ServerReflectionResponse`. -pub mod server_reflection_response { - /// The server sets one of the following fields according to the message_request - /// in the request. - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum MessageResponse { - /// This message is used to answer file_by_filename, file_containing_symbol, - /// file_containing_extension requests with transitive dependencies. - /// As the repeated label is not allowed in oneof fields, we use a - /// FileDescriptorResponse message to encapsulate the repeated fields. - /// The reflection service is allowed to avoid sending FileDescriptorProtos - /// that were previously sent in response to earlier requests in the stream. - #[prost(message, tag = "4")] - FileDescriptorResponse(super::FileDescriptorResponse), - /// This message is used to answer all_extension_numbers_of_type requests. - #[prost(message, tag = "5")] - AllExtensionNumbersResponse(super::ExtensionNumberResponse), - /// This message is used to answer list_services requests. - #[prost(message, tag = "6")] - ListServicesResponse(super::ListServiceResponse), - /// This message is used when an error occurs. - #[prost(message, tag = "7")] - ErrorResponse(super::ErrorResponse), - } -} -/// Serialized FileDescriptorProto messages sent by the server answering -/// a file_by_filename, file_containing_symbol, or file_containing_extension -/// request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FileDescriptorResponse { - /// Serialized FileDescriptorProto messages. We avoid taking a dependency on - /// descriptor.proto, which uses proto2 only features, by making them opaque - /// bytes instead. - #[prost(bytes = "vec", repeated, tag = "1")] - pub file_descriptor_proto: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>, -} -/// A list of extension numbers sent by the server answering -/// all_extension_numbers_of_type request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExtensionNumberResponse { - /// Full name of the base type, including the package name. The format - /// is <package>.<type> - #[prost(string, tag = "1")] - pub base_type_name: ::prost::alloc::string::String, - #[prost(int32, repeated, tag = "2")] - pub extension_number: ::prost::alloc::vec::Vec<i32>, -} -/// A list of ServiceResponse sent by the server answering list_services request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListServiceResponse { - /// The information of each service may be expanded in the future, so we use - /// ServiceResponse message to encapsulate it. - #[prost(message, repeated, tag = "1")] - pub service: ::prost::alloc::vec::Vec<ServiceResponse>, -} -/// The information of a single service used by ListServiceResponse to answer -/// list_services request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ServiceResponse { - /// Full name of a registered service, including its package name. The format - /// is <package>.<service> - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -/// The error code and error message sent by the server when an error occurs. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ErrorResponse { - /// This field uses the error codes defined in grpc::StatusCode. - #[prost(int32, tag = "1")] - pub error_code: i32, - #[prost(string, tag = "2")] - pub error_message: ::prost::alloc::string::String, -} -/// Generated client implementations. -pub mod server_reflection_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct ServerReflectionClient<T> { - inner: tonic::client::Grpc<T>, - } - impl<T> ServerReflectionClient<T> - where - T: tonic::client::GrpcService<tonic::body::Body>, - T::Error: Into<StdError>, - T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, - <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor<F>( - inner: T, - interceptor: F, - ) -> ServerReflectionClient<InterceptedService<T, F>> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request<tonic::body::Body>, - Response = http::Response< - <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody, - >, - >, - <T as tonic::codegen::Service< - http::Request<tonic::body::Body>, - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, - { - ServerReflectionClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// The reflection service is structured as a bidirectional stream, ensuring - /// all related requests go to a single server. - pub async fn server_reflection_info( - &mut self, - request: impl tonic::IntoStreamingRequest< - Message = super::ServerReflectionRequest, - >, - ) -> std::result::Result< - tonic::Response<tonic::codec::Streaming<super::ServerReflectionResponse>>, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/grpc.reflection.v1.ServerReflection/ServerReflectionInfo", - ); - let mut req = request.into_streaming_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "grpc.reflection.v1.ServerReflection", - "ServerReflectionInfo", - ), - ); - self.inner.streaming(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod server_reflection_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with ServerReflectionServer. - #[async_trait] - pub trait ServerReflection: std::marker::Send + std::marker::Sync + 'static { - /// Server streaming response type for the ServerReflectionInfo method. - type ServerReflectionInfoStream: tonic::codegen::tokio_stream::Stream< - Item = std::result::Result< - super::ServerReflectionResponse, - tonic::Status, - >, - > - + std::marker::Send - + 'static; - /// The reflection service is structured as a bidirectional stream, ensuring - /// all related requests go to a single server. - async fn server_reflection_info( - &self, - request: tonic::Request<tonic::Streaming<super::ServerReflectionRequest>>, - ) -> std::result::Result< - tonic::Response<Self::ServerReflectionInfoStream>, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct ServerReflectionServer<T> { - inner: Arc<T>, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option<usize>, - max_encoding_message_size: Option<usize>, - } - impl<T> ServerReflectionServer<T> { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc<T>) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor<F>( - inner: T, - interceptor: F, - ) -> InterceptedService<Self, F> - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl<T, B> tonic::codegen::Service<http::Request<B>> for ServerReflectionServer<T> - where - T: ServerReflection, - B: Body + std::marker::Send + 'static, - B::Error: Into<StdError> + std::marker::Send + 'static, - { - type Response = http::Response<tonic::body::Body>; - type Error = std::convert::Infallible; - type Future = BoxFuture<Self::Response, Self::Error>; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll<std::result::Result<(), Self::Error>> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request<B>) -> Self::Future { - match req.uri().path() { - "/grpc.reflection.v1.ServerReflection/ServerReflectionInfo" => { - #[allow(non_camel_case_types)] - struct ServerReflectionInfoSvc<T: ServerReflection>(pub Arc<T>); - impl< - T: ServerReflection, - > tonic::server::StreamingService<super::ServerReflectionRequest> - for ServerReflectionInfoSvc<T> { - type Response = super::ServerReflectionResponse; - type ResponseStream = T::ServerReflectionInfoStream; - type Future = BoxFuture< - tonic::Response<Self::ResponseStream>, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - tonic::Streaming<super::ServerReflectionRequest>, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - <T as ServerReflection>::server_reflection_info( - &inner, - request, - ) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = ServerReflectionInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.streaming(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - let mut response = http::Response::new( - tonic::body::Body::default(), - ); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }) - } - } - } - } - impl<T> Clone for ServerReflectionServer<T> { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "grpc.reflection.v1.ServerReflection"; - impl<T> tonic::server::NamedService for ServerReflectionServer<T> { - const NAME: &'static str = SERVICE_NAME; - } -} diff --git a/vendor/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs b/vendor/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs deleted file mode 100644 index 685d9b0a..00000000 --- a/vendor/tonic-reflection/src/generated/grpc_reflection_v1alpha.rs +++ /dev/null @@ -1,461 +0,0 @@ -// This file is @generated by prost-build. -/// The message sent by the client when calling ServerReflectionInfo method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ServerReflectionRequest { - #[prost(string, tag = "1")] - pub host: ::prost::alloc::string::String, - /// To use reflection service, the client should set one of the following - /// fields in message_request. The server distinguishes requests by their - /// defined field and then handles them using corresponding methods. - #[prost(oneof = "server_reflection_request::MessageRequest", tags = "3, 4, 5, 6, 7")] - pub message_request: ::core::option::Option< - server_reflection_request::MessageRequest, - >, -} -/// Nested message and enum types in `ServerReflectionRequest`. -pub mod server_reflection_request { - /// To use reflection service, the client should set one of the following - /// fields in message_request. The server distinguishes requests by their - /// defined field and then handles them using corresponding methods. - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum MessageRequest { - /// Find a proto file by the file name. - #[prost(string, tag = "3")] - FileByFilename(::prost::alloc::string::String), - /// Find the proto file that declares the given fully-qualified symbol name. - /// This field should be a fully-qualified symbol name - /// (e.g. <package>.<service>\[.<method>\] or <package>.<type>). - #[prost(string, tag = "4")] - FileContainingSymbol(::prost::alloc::string::String), - /// Find the proto file which defines an extension extending the given - /// message type with the given field number. - #[prost(message, tag = "5")] - FileContainingExtension(super::ExtensionRequest), - /// Finds the tag numbers used by all known extensions of extendee_type, and - /// appends them to ExtensionNumberResponse in an undefined order. - /// Its corresponding method is best-effort: it's not guaranteed that the - /// reflection service will implement this method, and it's not guaranteed - /// that this method will provide all extensions. Returns - /// StatusCode::UNIMPLEMENTED if it's not implemented. - /// This field should be a fully-qualified type name. The format is - /// <package>.<type> - #[prost(string, tag = "6")] - AllExtensionNumbersOfType(::prost::alloc::string::String), - /// List the full names of registered services. The content will not be - /// checked. - #[prost(string, tag = "7")] - ListServices(::prost::alloc::string::String), - } -} -/// The type name and extension number sent by the client when requesting -/// file_containing_extension. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExtensionRequest { - /// Fully-qualified type name. The format should be <package>.<type> - #[prost(string, tag = "1")] - pub containing_type: ::prost::alloc::string::String, - #[prost(int32, tag = "2")] - pub extension_number: i32, -} -/// The message sent by the server to answer ServerReflectionInfo method. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ServerReflectionResponse { - #[prost(string, tag = "1")] - pub valid_host: ::prost::alloc::string::String, - #[prost(message, optional, tag = "2")] - pub original_request: ::core::option::Option<ServerReflectionRequest>, - /// The server sets one of the following fields according to the - /// message_request in the request. - #[prost(oneof = "server_reflection_response::MessageResponse", tags = "4, 5, 6, 7")] - pub message_response: ::core::option::Option< - server_reflection_response::MessageResponse, - >, -} -/// Nested message and enum types in `ServerReflectionResponse`. -pub mod server_reflection_response { - /// The server sets one of the following fields according to the - /// message_request in the request. - #[derive(Clone, PartialEq, ::prost::Oneof)] - pub enum MessageResponse { - /// This message is used to answer file_by_filename, file_containing_symbol, - /// file_containing_extension requests with transitive dependencies. - /// As the repeated label is not allowed in oneof fields, we use a - /// FileDescriptorResponse message to encapsulate the repeated fields. - /// The reflection service is allowed to avoid sending FileDescriptorProtos - /// that were previously sent in response to earlier requests in the stream. - #[prost(message, tag = "4")] - FileDescriptorResponse(super::FileDescriptorResponse), - /// This message is used to answer all_extension_numbers_of_type requests. - #[prost(message, tag = "5")] - AllExtensionNumbersResponse(super::ExtensionNumberResponse), - /// This message is used to answer list_services requests. - #[prost(message, tag = "6")] - ListServicesResponse(super::ListServiceResponse), - /// This message is used when an error occurs. - #[prost(message, tag = "7")] - ErrorResponse(super::ErrorResponse), - } -} -/// Serialized FileDescriptorProto messages sent by the server answering -/// a file_by_filename, file_containing_symbol, or file_containing_extension -/// request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FileDescriptorResponse { - /// Serialized FileDescriptorProto messages. We avoid taking a dependency on - /// descriptor.proto, which uses proto2 only features, by making them opaque - /// bytes instead. - #[prost(bytes = "vec", repeated, tag = "1")] - pub file_descriptor_proto: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>, -} -/// A list of extension numbers sent by the server answering -/// all_extension_numbers_of_type request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ExtensionNumberResponse { - /// Full name of the base type, including the package name. The format - /// is <package>.<type> - #[prost(string, tag = "1")] - pub base_type_name: ::prost::alloc::string::String, - #[prost(int32, repeated, tag = "2")] - pub extension_number: ::prost::alloc::vec::Vec<i32>, -} -/// A list of ServiceResponse sent by the server answering list_services request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ListServiceResponse { - /// The information of each service may be expanded in the future, so we use - /// ServiceResponse message to encapsulate it. - #[prost(message, repeated, tag = "1")] - pub service: ::prost::alloc::vec::Vec<ServiceResponse>, -} -/// The information of a single service used by ListServiceResponse to answer -/// list_services request. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ServiceResponse { - /// Full name of a registered service, including its package name. The format - /// is <package>.<service> - #[prost(string, tag = "1")] - pub name: ::prost::alloc::string::String, -} -/// The error code and error message sent by the server when an error occurs. -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct ErrorResponse { - /// This field uses the error codes defined in grpc::StatusCode. - #[prost(int32, tag = "1")] - pub error_code: i32, - #[prost(string, tag = "2")] - pub error_message: ::prost::alloc::string::String, -} -/// Generated client implementations. -pub mod server_reflection_client { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - use tonic::codegen::http::Uri; - #[derive(Debug, Clone)] - pub struct ServerReflectionClient<T> { - inner: tonic::client::Grpc<T>, - } - impl<T> ServerReflectionClient<T> - where - T: tonic::client::GrpcService<tonic::body::Body>, - T::Error: Into<StdError>, - T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, - <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, - { - pub fn new(inner: T) -> Self { - let inner = tonic::client::Grpc::new(inner); - Self { inner } - } - pub fn with_origin(inner: T, origin: Uri) -> Self { - let inner = tonic::client::Grpc::with_origin(inner, origin); - Self { inner } - } - pub fn with_interceptor<F>( - inner: T, - interceptor: F, - ) -> ServerReflectionClient<InterceptedService<T, F>> - where - F: tonic::service::Interceptor, - T::ResponseBody: Default, - T: tonic::codegen::Service< - http::Request<tonic::body::Body>, - Response = http::Response< - <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody, - >, - >, - <T as tonic::codegen::Service< - http::Request<tonic::body::Body>, - >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync, - { - ServerReflectionClient::new(InterceptedService::new(inner, interceptor)) - } - /// Compress requests with the given encoding. - /// - /// This requires the server to support it otherwise it might respond with an - /// error. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.send_compressed(encoding); - self - } - /// Enable decompressing responses. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.inner = self.inner.accept_compressed(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_decoding_message_size(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.inner = self.inner.max_encoding_message_size(limit); - self - } - /// The reflection service is structured as a bidirectional stream, ensuring - /// all related requests go to a single server. - pub async fn server_reflection_info( - &mut self, - request: impl tonic::IntoStreamingRequest< - Message = super::ServerReflectionRequest, - >, - ) -> std::result::Result< - tonic::Response<tonic::codec::Streaming<super::ServerReflectionResponse>>, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic::codec::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo", - ); - let mut req = request.into_streaming_request(); - req.extensions_mut() - .insert( - GrpcMethod::new( - "grpc.reflection.v1alpha.ServerReflection", - "ServerReflectionInfo", - ), - ); - self.inner.streaming(req, path, codec).await - } - } -} -/// Generated server implementations. -pub mod server_reflection_server { - #![allow( - unused_variables, - dead_code, - missing_docs, - clippy::wildcard_imports, - clippy::let_unit_value, - )] - use tonic::codegen::*; - /// Generated trait containing gRPC methods that should be implemented for use with ServerReflectionServer. - #[async_trait] - pub trait ServerReflection: std::marker::Send + std::marker::Sync + 'static { - /// Server streaming response type for the ServerReflectionInfo method. - type ServerReflectionInfoStream: tonic::codegen::tokio_stream::Stream< - Item = std::result::Result< - super::ServerReflectionResponse, - tonic::Status, - >, - > - + std::marker::Send - + 'static; - /// The reflection service is structured as a bidirectional stream, ensuring - /// all related requests go to a single server. - async fn server_reflection_info( - &self, - request: tonic::Request<tonic::Streaming<super::ServerReflectionRequest>>, - ) -> std::result::Result< - tonic::Response<Self::ServerReflectionInfoStream>, - tonic::Status, - >; - } - #[derive(Debug)] - pub struct ServerReflectionServer<T> { - inner: Arc<T>, - accept_compression_encodings: EnabledCompressionEncodings, - send_compression_encodings: EnabledCompressionEncodings, - max_decoding_message_size: Option<usize>, - max_encoding_message_size: Option<usize>, - } - impl<T> ServerReflectionServer<T> { - pub fn new(inner: T) -> Self { - Self::from_arc(Arc::new(inner)) - } - pub fn from_arc(inner: Arc<T>) -> Self { - Self { - inner, - accept_compression_encodings: Default::default(), - send_compression_encodings: Default::default(), - max_decoding_message_size: None, - max_encoding_message_size: None, - } - } - pub fn with_interceptor<F>( - inner: T, - interceptor: F, - ) -> InterceptedService<Self, F> - where - F: tonic::service::Interceptor, - { - InterceptedService::new(Self::new(inner), interceptor) - } - /// Enable decompressing requests with the given encoding. - #[must_use] - pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.accept_compression_encodings.enable(encoding); - self - } - /// Compress responses with the given encoding, if the client supports it. - #[must_use] - pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { - self.send_compression_encodings.enable(encoding); - self - } - /// Limits the maximum size of a decoded message. - /// - /// Default: `4MB` - #[must_use] - pub fn max_decoding_message_size(mut self, limit: usize) -> Self { - self.max_decoding_message_size = Some(limit); - self - } - /// Limits the maximum size of an encoded message. - /// - /// Default: `usize::MAX` - #[must_use] - pub fn max_encoding_message_size(mut self, limit: usize) -> Self { - self.max_encoding_message_size = Some(limit); - self - } - } - impl<T, B> tonic::codegen::Service<http::Request<B>> for ServerReflectionServer<T> - where - T: ServerReflection, - B: Body + std::marker::Send + 'static, - B::Error: Into<StdError> + std::marker::Send + 'static, - { - type Response = http::Response<tonic::body::Body>; - type Error = std::convert::Infallible; - type Future = BoxFuture<Self::Response, Self::Error>; - fn poll_ready( - &mut self, - _cx: &mut Context<'_>, - ) -> Poll<std::result::Result<(), Self::Error>> { - Poll::Ready(Ok(())) - } - fn call(&mut self, req: http::Request<B>) -> Self::Future { - match req.uri().path() { - "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo" => { - #[allow(non_camel_case_types)] - struct ServerReflectionInfoSvc<T: ServerReflection>(pub Arc<T>); - impl< - T: ServerReflection, - > tonic::server::StreamingService<super::ServerReflectionRequest> - for ServerReflectionInfoSvc<T> { - type Response = super::ServerReflectionResponse; - type ResponseStream = T::ServerReflectionInfoStream; - type Future = BoxFuture< - tonic::Response<Self::ResponseStream>, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - tonic::Streaming<super::ServerReflectionRequest>, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - <T as ServerReflection>::server_reflection_info( - &inner, - request, - ) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = ServerReflectionInfoSvc(inner); - let codec = tonic::codec::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.streaming(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - _ => { - Box::pin(async move { - let mut response = http::Response::new( - tonic::body::Body::default(), - ); - let headers = response.headers_mut(); - headers - .insert( - tonic::Status::GRPC_STATUS, - (tonic::Code::Unimplemented as i32).into(), - ); - headers - .insert( - http::header::CONTENT_TYPE, - tonic::metadata::GRPC_CONTENT_TYPE, - ); - Ok(response) - }) - } - } - } - } - impl<T> Clone for ServerReflectionServer<T> { - fn clone(&self) -> Self { - let inner = self.inner.clone(); - Self { - inner, - accept_compression_encodings: self.accept_compression_encodings, - send_compression_encodings: self.send_compression_encodings, - max_decoding_message_size: self.max_decoding_message_size, - max_encoding_message_size: self.max_encoding_message_size, - } - } - } - /// Generated gRPC service name - pub const SERVICE_NAME: &str = "grpc.reflection.v1alpha.ServerReflection"; - impl<T> tonic::server::NamedService for ServerReflectionServer<T> { - const NAME: &'static str = SERVICE_NAME; - } -} diff --git a/vendor/tonic-reflection/src/generated/reflection_v1_fds.rs b/vendor/tonic-reflection/src/generated/reflection_v1_fds.rs deleted file mode 100644 index 4edd5c20..00000000 --- a/vendor/tonic-reflection/src/generated/reflection_v1_fds.rs +++ /dev/null @@ -1,161 +0,0 @@ -// This file is @generated by codegen. -// Copyright 2016 The gRPC Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// Service exported by server reflection. A more complete description of how -// server reflection works can be found at -// https://github.com/grpc/grpc/blob/master/doc/server-reflection.md -// -// The canonical version of this proto can be found at -// https://github.com/grpc/grpc-proto/blob/master/grpc/reflection/v1/reflection.proto -// -/// Byte encoded FILE_DESCRIPTOR_SET. -pub const FILE_DESCRIPTOR_SET: &[u8] = &[ - 10u8, 192u8, 13u8, 10u8, 19u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 95u8, 118u8, 49u8, 46u8, 112u8, 114u8, 111u8, 116u8, 111u8, 18u8, 18u8, - 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, - 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 34u8, 243u8, 2u8, 10u8, 23u8, 83u8, 101u8, - 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 18u8, 18u8, 10u8, 4u8, - 104u8, 111u8, 115u8, 116u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, 82u8, 4u8, 104u8, 111u8, - 115u8, 116u8, 18u8, 42u8, 10u8, 16u8, 102u8, 105u8, 108u8, 101u8, 95u8, 98u8, 121u8, - 95u8, 102u8, 105u8, 108u8, 101u8, 110u8, 97u8, 109u8, 101u8, 24u8, 3u8, 32u8, 1u8, - 40u8, 9u8, 72u8, 0u8, 82u8, 14u8, 102u8, 105u8, 108u8, 101u8, 66u8, 121u8, 70u8, - 105u8, 108u8, 101u8, 110u8, 97u8, 109u8, 101u8, 18u8, 54u8, 10u8, 22u8, 102u8, 105u8, - 108u8, 101u8, 95u8, 99u8, 111u8, 110u8, 116u8, 97u8, 105u8, 110u8, 105u8, 110u8, - 103u8, 95u8, 115u8, 121u8, 109u8, 98u8, 111u8, 108u8, 24u8, 4u8, 32u8, 1u8, 40u8, - 9u8, 72u8, 0u8, 82u8, 20u8, 102u8, 105u8, 108u8, 101u8, 67u8, 111u8, 110u8, 116u8, - 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 83u8, 121u8, 109u8, 98u8, 111u8, 108u8, - 18u8, 98u8, 10u8, 25u8, 102u8, 105u8, 108u8, 101u8, 95u8, 99u8, 111u8, 110u8, 116u8, - 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 95u8, 101u8, 120u8, 116u8, 101u8, 110u8, - 115u8, 105u8, 111u8, 110u8, 24u8, 5u8, 32u8, 1u8, 40u8, 11u8, 50u8, 36u8, 46u8, - 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, - 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 46u8, 69u8, 120u8, 116u8, 101u8, 110u8, - 115u8, 105u8, 111u8, 110u8, 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 72u8, - 0u8, 82u8, 23u8, 102u8, 105u8, 108u8, 101u8, 67u8, 111u8, 110u8, 116u8, 97u8, 105u8, - 110u8, 105u8, 110u8, 103u8, 69u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, - 110u8, 18u8, 66u8, 10u8, 29u8, 97u8, 108u8, 108u8, 95u8, 101u8, 120u8, 116u8, 101u8, - 110u8, 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, 117u8, 109u8, 98u8, 101u8, 114u8, - 115u8, 95u8, 111u8, 102u8, 95u8, 116u8, 121u8, 112u8, 101u8, 24u8, 6u8, 32u8, 1u8, - 40u8, 9u8, 72u8, 0u8, 82u8, 25u8, 97u8, 108u8, 108u8, 69u8, 120u8, 116u8, 101u8, - 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 115u8, - 79u8, 102u8, 84u8, 121u8, 112u8, 101u8, 18u8, 37u8, 10u8, 13u8, 108u8, 105u8, 115u8, - 116u8, 95u8, 115u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 115u8, 24u8, 7u8, 32u8, - 1u8, 40u8, 9u8, 72u8, 0u8, 82u8, 12u8, 108u8, 105u8, 115u8, 116u8, 83u8, 101u8, - 114u8, 118u8, 105u8, 99u8, 101u8, 115u8, 66u8, 17u8, 10u8, 15u8, 109u8, 101u8, 115u8, - 115u8, 97u8, 103u8, 101u8, 95u8, 114u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, - 34u8, 102u8, 10u8, 16u8, 69u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, - 110u8, 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 18u8, 39u8, 10u8, 15u8, 99u8, - 111u8, 110u8, 116u8, 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 95u8, 116u8, 121u8, - 112u8, 101u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, 82u8, 14u8, 99u8, 111u8, 110u8, 116u8, - 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 84u8, 121u8, 112u8, 101u8, 18u8, 41u8, 10u8, - 16u8, 101u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, - 117u8, 109u8, 98u8, 101u8, 114u8, 24u8, 2u8, 32u8, 1u8, 40u8, 5u8, 82u8, 15u8, 101u8, - 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, - 101u8, 114u8, 34u8, 174u8, 4u8, 10u8, 24u8, 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, - 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 82u8, 101u8, - 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 29u8, 10u8, 10u8, 118u8, 97u8, 108u8, - 105u8, 100u8, 95u8, 104u8, 111u8, 115u8, 116u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, - 82u8, 9u8, 118u8, 97u8, 108u8, 105u8, 100u8, 72u8, 111u8, 115u8, 116u8, 18u8, 86u8, - 10u8, 16u8, 111u8, 114u8, 105u8, 103u8, 105u8, 110u8, 97u8, 108u8, 95u8, 114u8, - 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 24u8, 2u8, 32u8, 1u8, 40u8, 11u8, 50u8, - 43u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, - 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 46u8, 83u8, 101u8, 114u8, 118u8, - 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, - 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 82u8, 15u8, 111u8, 114u8, 105u8, - 103u8, 105u8, 110u8, 97u8, 108u8, 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, - 18u8, 102u8, 10u8, 24u8, 102u8, 105u8, 108u8, 101u8, 95u8, 100u8, 101u8, 115u8, 99u8, - 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, - 110u8, 115u8, 101u8, 24u8, 4u8, 32u8, 1u8, 40u8, 11u8, 50u8, 42u8, 46u8, 103u8, - 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 46u8, 118u8, 49u8, 46u8, 70u8, 105u8, 108u8, 101u8, 68u8, 101u8, 115u8, - 99u8, 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, - 110u8, 115u8, 101u8, 72u8, 0u8, 82u8, 22u8, 102u8, 105u8, 108u8, 101u8, 68u8, 101u8, - 115u8, 99u8, 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, - 111u8, 110u8, 115u8, 101u8, 18u8, 114u8, 10u8, 30u8, 97u8, 108u8, 108u8, 95u8, 101u8, - 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, 117u8, 109u8, - 98u8, 101u8, 114u8, 115u8, 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, - 101u8, 24u8, 5u8, 32u8, 1u8, 40u8, 11u8, 50u8, 43u8, 46u8, 103u8, 114u8, 112u8, 99u8, - 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, - 118u8, 49u8, 46u8, 69u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, - 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, - 115u8, 101u8, 72u8, 0u8, 82u8, 27u8, 97u8, 108u8, 108u8, 69u8, 120u8, 116u8, 101u8, - 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 115u8, - 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 95u8, 10u8, 22u8, 108u8, - 105u8, 115u8, 116u8, 95u8, 115u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 115u8, - 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 24u8, 6u8, 32u8, 1u8, - 40u8, 11u8, 50u8, 39u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, - 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 46u8, 76u8, 105u8, - 115u8, 116u8, 83u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 82u8, 101u8, 115u8, - 112u8, 111u8, 110u8, 115u8, 101u8, 72u8, 0u8, 82u8, 20u8, 108u8, 105u8, 115u8, 116u8, - 83u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 115u8, 82u8, 101u8, 115u8, 112u8, - 111u8, 110u8, 115u8, 101u8, 18u8, 74u8, 10u8, 14u8, 101u8, 114u8, 114u8, 111u8, - 114u8, 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 24u8, 7u8, 32u8, - 1u8, 40u8, 11u8, 50u8, 33u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, - 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 46u8, 69u8, - 114u8, 114u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, - 72u8, 0u8, 82u8, 13u8, 101u8, 114u8, 114u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, - 111u8, 110u8, 115u8, 101u8, 66u8, 18u8, 10u8, 16u8, 109u8, 101u8, 115u8, 115u8, 97u8, - 103u8, 101u8, 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 34u8, - 76u8, 10u8, 22u8, 70u8, 105u8, 108u8, 101u8, 68u8, 101u8, 115u8, 99u8, 114u8, 105u8, - 112u8, 116u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, - 18u8, 50u8, 10u8, 21u8, 102u8, 105u8, 108u8, 101u8, 95u8, 100u8, 101u8, 115u8, 99u8, - 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 95u8, 112u8, 114u8, 111u8, 116u8, 111u8, - 24u8, 1u8, 32u8, 3u8, 40u8, 12u8, 82u8, 19u8, 102u8, 105u8, 108u8, 101u8, 68u8, - 101u8, 115u8, 99u8, 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 80u8, 114u8, 111u8, - 116u8, 111u8, 34u8, 106u8, 10u8, 23u8, 69u8, 120u8, 116u8, 101u8, 110u8, 115u8, - 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 82u8, 101u8, 115u8, - 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 36u8, 10u8, 14u8, 98u8, 97u8, 115u8, 101u8, - 95u8, 116u8, 121u8, 112u8, 101u8, 95u8, 110u8, 97u8, 109u8, 101u8, 24u8, 1u8, 32u8, - 1u8, 40u8, 9u8, 82u8, 12u8, 98u8, 97u8, 115u8, 101u8, 84u8, 121u8, 112u8, 101u8, - 78u8, 97u8, 109u8, 101u8, 18u8, 41u8, 10u8, 16u8, 101u8, 120u8, 116u8, 101u8, 110u8, - 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, 117u8, 109u8, 98u8, 101u8, 114u8, 24u8, 2u8, - 32u8, 3u8, 40u8, 5u8, 82u8, 15u8, 101u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, - 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 34u8, 84u8, 10u8, 19u8, 76u8, - 105u8, 115u8, 116u8, 83u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 82u8, 101u8, - 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 61u8, 10u8, 7u8, 115u8, 101u8, 114u8, - 118u8, 105u8, 99u8, 101u8, 24u8, 1u8, 32u8, 3u8, 40u8, 11u8, 50u8, 35u8, 46u8, 103u8, - 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 46u8, 118u8, 49u8, 46u8, 83u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, - 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 82u8, 7u8, 115u8, 101u8, - 114u8, 118u8, 105u8, 99u8, 101u8, 34u8, 37u8, 10u8, 15u8, 83u8, 101u8, 114u8, 118u8, - 105u8, 99u8, 101u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, - 18u8, 10u8, 4u8, 110u8, 97u8, 109u8, 101u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, 82u8, - 4u8, 110u8, 97u8, 109u8, 101u8, 34u8, 83u8, 10u8, 13u8, 69u8, 114u8, 114u8, 111u8, - 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 29u8, 10u8, 10u8, - 101u8, 114u8, 114u8, 111u8, 114u8, 95u8, 99u8, 111u8, 100u8, 101u8, 24u8, 1u8, 32u8, - 1u8, 40u8, 5u8, 82u8, 9u8, 101u8, 114u8, 114u8, 111u8, 114u8, 67u8, 111u8, 100u8, - 101u8, 18u8, 35u8, 10u8, 13u8, 101u8, 114u8, 114u8, 111u8, 114u8, 95u8, 109u8, 101u8, - 115u8, 115u8, 97u8, 103u8, 101u8, 24u8, 2u8, 32u8, 1u8, 40u8, 9u8, 82u8, 12u8, 101u8, - 114u8, 114u8, 111u8, 114u8, 77u8, 101u8, 115u8, 115u8, 97u8, 103u8, 101u8, 50u8, - 137u8, 1u8, 10u8, 16u8, 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, - 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 18u8, 117u8, 10u8, 20u8, 83u8, 101u8, - 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 73u8, 110u8, 102u8, 111u8, 18u8, 43u8, 46u8, 103u8, 114u8, 112u8, 99u8, - 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, - 118u8, 49u8, 46u8, 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, - 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 82u8, 101u8, 113u8, 117u8, 101u8, - 115u8, 116u8, 26u8, 44u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, - 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 46u8, 83u8, 101u8, - 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 40u8, 1u8, 48u8, - 1u8, 66u8, 102u8, 10u8, 21u8, 105u8, 111u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, - 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, - 49u8, 66u8, 21u8, 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, - 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 80u8, 114u8, 111u8, 116u8, 111u8, 80u8, 1u8, - 90u8, 52u8, 103u8, 111u8, 111u8, 103u8, 108u8, 101u8, 46u8, 103u8, 111u8, 108u8, - 97u8, 110u8, 103u8, 46u8, 111u8, 114u8, 103u8, 47u8, 103u8, 114u8, 112u8, 99u8, 47u8, - 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 47u8, 103u8, - 114u8, 112u8, 99u8, 95u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 95u8, 118u8, 49u8, 98u8, 6u8, 112u8, 114u8, 111u8, 116u8, 111u8, 51u8, -]; diff --git a/vendor/tonic-reflection/src/generated/reflection_v1alpha1_fds.rs b/vendor/tonic-reflection/src/generated/reflection_v1alpha1_fds.rs deleted file mode 100644 index 240b4cb0..00000000 --- a/vendor/tonic-reflection/src/generated/reflection_v1alpha1_fds.rs +++ /dev/null @@ -1,153 +0,0 @@ -// This file is @generated by codegen. -// Copyright 2016 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// Service exported by server reflection -// -/// Byte encoded FILE_DESCRIPTOR_SET. -pub const FILE_DESCRIPTOR_SET: &[u8] = &[ - 10u8, 143u8, 13u8, 10u8, 24u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, - 111u8, 110u8, 95u8, 118u8, 49u8, 97u8, 108u8, 112u8, 104u8, 97u8, 46u8, 112u8, 114u8, - 111u8, 116u8, 111u8, 18u8, 23u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, - 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 97u8, - 108u8, 112u8, 104u8, 97u8, 34u8, 248u8, 2u8, 10u8, 23u8, 83u8, 101u8, 114u8, 118u8, - 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, - 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 18u8, 18u8, 10u8, 4u8, 104u8, 111u8, - 115u8, 116u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, 82u8, 4u8, 104u8, 111u8, 115u8, 116u8, - 18u8, 42u8, 10u8, 16u8, 102u8, 105u8, 108u8, 101u8, 95u8, 98u8, 121u8, 95u8, 102u8, - 105u8, 108u8, 101u8, 110u8, 97u8, 109u8, 101u8, 24u8, 3u8, 32u8, 1u8, 40u8, 9u8, - 72u8, 0u8, 82u8, 14u8, 102u8, 105u8, 108u8, 101u8, 66u8, 121u8, 70u8, 105u8, 108u8, - 101u8, 110u8, 97u8, 109u8, 101u8, 18u8, 54u8, 10u8, 22u8, 102u8, 105u8, 108u8, 101u8, - 95u8, 99u8, 111u8, 110u8, 116u8, 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 95u8, - 115u8, 121u8, 109u8, 98u8, 111u8, 108u8, 24u8, 4u8, 32u8, 1u8, 40u8, 9u8, 72u8, 0u8, - 82u8, 20u8, 102u8, 105u8, 108u8, 101u8, 67u8, 111u8, 110u8, 116u8, 97u8, 105u8, - 110u8, 105u8, 110u8, 103u8, 83u8, 121u8, 109u8, 98u8, 111u8, 108u8, 18u8, 103u8, - 10u8, 25u8, 102u8, 105u8, 108u8, 101u8, 95u8, 99u8, 111u8, 110u8, 116u8, 97u8, 105u8, - 110u8, 105u8, 110u8, 103u8, 95u8, 101u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, - 111u8, 110u8, 24u8, 5u8, 32u8, 1u8, 40u8, 11u8, 50u8, 41u8, 46u8, 103u8, 114u8, - 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, - 110u8, 46u8, 118u8, 49u8, 97u8, 108u8, 112u8, 104u8, 97u8, 46u8, 69u8, 120u8, 116u8, - 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, - 116u8, 72u8, 0u8, 82u8, 23u8, 102u8, 105u8, 108u8, 101u8, 67u8, 111u8, 110u8, 116u8, - 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 69u8, 120u8, 116u8, 101u8, 110u8, 115u8, - 105u8, 111u8, 110u8, 18u8, 66u8, 10u8, 29u8, 97u8, 108u8, 108u8, 95u8, 101u8, 120u8, - 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, 117u8, 109u8, 98u8, - 101u8, 114u8, 115u8, 95u8, 111u8, 102u8, 95u8, 116u8, 121u8, 112u8, 101u8, 24u8, 6u8, - 32u8, 1u8, 40u8, 9u8, 72u8, 0u8, 82u8, 25u8, 97u8, 108u8, 108u8, 69u8, 120u8, 116u8, - 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, - 115u8, 79u8, 102u8, 84u8, 121u8, 112u8, 101u8, 18u8, 37u8, 10u8, 13u8, 108u8, 105u8, - 115u8, 116u8, 95u8, 115u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 115u8, 24u8, 7u8, - 32u8, 1u8, 40u8, 9u8, 72u8, 0u8, 82u8, 12u8, 108u8, 105u8, 115u8, 116u8, 83u8, 101u8, - 114u8, 118u8, 105u8, 99u8, 101u8, 115u8, 66u8, 17u8, 10u8, 15u8, 109u8, 101u8, 115u8, - 115u8, 97u8, 103u8, 101u8, 95u8, 114u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, - 34u8, 102u8, 10u8, 16u8, 69u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, - 110u8, 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 18u8, 39u8, 10u8, 15u8, 99u8, - 111u8, 110u8, 116u8, 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 95u8, 116u8, 121u8, - 112u8, 101u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, 82u8, 14u8, 99u8, 111u8, 110u8, 116u8, - 97u8, 105u8, 110u8, 105u8, 110u8, 103u8, 84u8, 121u8, 112u8, 101u8, 18u8, 41u8, 10u8, - 16u8, 101u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, - 117u8, 109u8, 98u8, 101u8, 114u8, 24u8, 2u8, 32u8, 1u8, 40u8, 5u8, 82u8, 15u8, 101u8, - 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, - 101u8, 114u8, 34u8, 199u8, 4u8, 10u8, 24u8, 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, - 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 82u8, 101u8, - 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 29u8, 10u8, 10u8, 118u8, 97u8, 108u8, - 105u8, 100u8, 95u8, 104u8, 111u8, 115u8, 116u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, - 82u8, 9u8, 118u8, 97u8, 108u8, 105u8, 100u8, 72u8, 111u8, 115u8, 116u8, 18u8, 91u8, - 10u8, 16u8, 111u8, 114u8, 105u8, 103u8, 105u8, 110u8, 97u8, 108u8, 95u8, 114u8, - 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 24u8, 2u8, 32u8, 1u8, 40u8, 11u8, 50u8, - 48u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, - 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 97u8, 108u8, 112u8, 104u8, 97u8, 46u8, - 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, - 116u8, 105u8, 111u8, 110u8, 82u8, 101u8, 113u8, 117u8, 101u8, 115u8, 116u8, 82u8, - 15u8, 111u8, 114u8, 105u8, 103u8, 105u8, 110u8, 97u8, 108u8, 82u8, 101u8, 113u8, - 117u8, 101u8, 115u8, 116u8, 18u8, 107u8, 10u8, 24u8, 102u8, 105u8, 108u8, 101u8, - 95u8, 100u8, 101u8, 115u8, 99u8, 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 95u8, - 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 24u8, 4u8, 32u8, 1u8, 40u8, - 11u8, 50u8, 47u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, - 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 97u8, 108u8, 112u8, - 104u8, 97u8, 46u8, 70u8, 105u8, 108u8, 101u8, 68u8, 101u8, 115u8, 99u8, 114u8, 105u8, - 112u8, 116u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, - 72u8, 0u8, 82u8, 22u8, 102u8, 105u8, 108u8, 101u8, 68u8, 101u8, 115u8, 99u8, 114u8, - 105u8, 112u8, 116u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, - 101u8, 18u8, 119u8, 10u8, 30u8, 97u8, 108u8, 108u8, 95u8, 101u8, 120u8, 116u8, 101u8, - 110u8, 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, 117u8, 109u8, 98u8, 101u8, 114u8, - 115u8, 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 24u8, 5u8, 32u8, - 1u8, 40u8, 11u8, 50u8, 48u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, - 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 97u8, - 108u8, 112u8, 104u8, 97u8, 46u8, 69u8, 120u8, 116u8, 101u8, 110u8, 115u8, 105u8, - 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 82u8, 101u8, 115u8, 112u8, - 111u8, 110u8, 115u8, 101u8, 72u8, 0u8, 82u8, 27u8, 97u8, 108u8, 108u8, 69u8, 120u8, - 116u8, 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, - 114u8, 115u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 100u8, - 10u8, 22u8, 108u8, 105u8, 115u8, 116u8, 95u8, 115u8, 101u8, 114u8, 118u8, 105u8, - 99u8, 101u8, 115u8, 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, - 24u8, 6u8, 32u8, 1u8, 40u8, 11u8, 50u8, 44u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, - 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, - 49u8, 97u8, 108u8, 112u8, 104u8, 97u8, 46u8, 76u8, 105u8, 115u8, 116u8, 83u8, 101u8, - 114u8, 118u8, 105u8, 99u8, 101u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, - 101u8, 72u8, 0u8, 82u8, 20u8, 108u8, 105u8, 115u8, 116u8, 83u8, 101u8, 114u8, 118u8, - 105u8, 99u8, 101u8, 115u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, - 18u8, 79u8, 10u8, 14u8, 101u8, 114u8, 114u8, 111u8, 114u8, 95u8, 114u8, 101u8, 115u8, - 112u8, 111u8, 110u8, 115u8, 101u8, 24u8, 7u8, 32u8, 1u8, 40u8, 11u8, 50u8, 38u8, - 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, 99u8, - 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 97u8, 108u8, 112u8, 104u8, 97u8, 46u8, - 69u8, 114u8, 114u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, - 101u8, 72u8, 0u8, 82u8, 13u8, 101u8, 114u8, 114u8, 111u8, 114u8, 82u8, 101u8, 115u8, - 112u8, 111u8, 110u8, 115u8, 101u8, 66u8, 18u8, 10u8, 16u8, 109u8, 101u8, 115u8, - 115u8, 97u8, 103u8, 101u8, 95u8, 114u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, - 101u8, 34u8, 76u8, 10u8, 22u8, 70u8, 105u8, 108u8, 101u8, 68u8, 101u8, 115u8, 99u8, - 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, - 115u8, 101u8, 18u8, 50u8, 10u8, 21u8, 102u8, 105u8, 108u8, 101u8, 95u8, 100u8, 101u8, - 115u8, 99u8, 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 95u8, 112u8, 114u8, 111u8, - 116u8, 111u8, 24u8, 1u8, 32u8, 3u8, 40u8, 12u8, 82u8, 19u8, 102u8, 105u8, 108u8, - 101u8, 68u8, 101u8, 115u8, 99u8, 114u8, 105u8, 112u8, 116u8, 111u8, 114u8, 80u8, - 114u8, 111u8, 116u8, 111u8, 34u8, 106u8, 10u8, 23u8, 69u8, 120u8, 116u8, 101u8, - 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 82u8, - 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 36u8, 10u8, 14u8, 98u8, 97u8, - 115u8, 101u8, 95u8, 116u8, 121u8, 112u8, 101u8, 95u8, 110u8, 97u8, 109u8, 101u8, - 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, 82u8, 12u8, 98u8, 97u8, 115u8, 101u8, 84u8, 121u8, - 112u8, 101u8, 78u8, 97u8, 109u8, 101u8, 18u8, 41u8, 10u8, 16u8, 101u8, 120u8, 116u8, - 101u8, 110u8, 115u8, 105u8, 111u8, 110u8, 95u8, 110u8, 117u8, 109u8, 98u8, 101u8, - 114u8, 24u8, 2u8, 32u8, 3u8, 40u8, 5u8, 82u8, 15u8, 101u8, 120u8, 116u8, 101u8, - 110u8, 115u8, 105u8, 111u8, 110u8, 78u8, 117u8, 109u8, 98u8, 101u8, 114u8, 34u8, - 89u8, 10u8, 19u8, 76u8, 105u8, 115u8, 116u8, 83u8, 101u8, 114u8, 118u8, 105u8, 99u8, - 101u8, 82u8, 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 66u8, 10u8, 7u8, - 115u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 24u8, 1u8, 32u8, 3u8, 40u8, 11u8, - 50u8, 40u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, 101u8, 102u8, 108u8, 101u8, - 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, 97u8, 108u8, 112u8, 104u8, 97u8, - 46u8, 83u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 82u8, 101u8, 115u8, 112u8, - 111u8, 110u8, 115u8, 101u8, 82u8, 7u8, 115u8, 101u8, 114u8, 118u8, 105u8, 99u8, - 101u8, 34u8, 37u8, 10u8, 15u8, 83u8, 101u8, 114u8, 118u8, 105u8, 99u8, 101u8, 82u8, - 101u8, 115u8, 112u8, 111u8, 110u8, 115u8, 101u8, 18u8, 18u8, 10u8, 4u8, 110u8, 97u8, - 109u8, 101u8, 24u8, 1u8, 32u8, 1u8, 40u8, 9u8, 82u8, 4u8, 110u8, 97u8, 109u8, 101u8, - 34u8, 83u8, 10u8, 13u8, 69u8, 114u8, 114u8, 111u8, 114u8, 82u8, 101u8, 115u8, 112u8, - 111u8, 110u8, 115u8, 101u8, 18u8, 29u8, 10u8, 10u8, 101u8, 114u8, 114u8, 111u8, - 114u8, 95u8, 99u8, 111u8, 100u8, 101u8, 24u8, 1u8, 32u8, 1u8, 40u8, 5u8, 82u8, 9u8, - 101u8, 114u8, 114u8, 111u8, 114u8, 67u8, 111u8, 100u8, 101u8, 18u8, 35u8, 10u8, 13u8, - 101u8, 114u8, 114u8, 111u8, 114u8, 95u8, 109u8, 101u8, 115u8, 115u8, 97u8, 103u8, - 101u8, 24u8, 2u8, 32u8, 1u8, 40u8, 9u8, 82u8, 12u8, 101u8, 114u8, 114u8, 111u8, - 114u8, 77u8, 101u8, 115u8, 115u8, 97u8, 103u8, 101u8, 50u8, 147u8, 1u8, 10u8, 16u8, - 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, - 116u8, 105u8, 111u8, 110u8, 18u8, 127u8, 10u8, 20u8, 83u8, 101u8, 114u8, 118u8, - 101u8, 114u8, 82u8, 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, - 73u8, 110u8, 102u8, 111u8, 18u8, 48u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, - 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, - 97u8, 108u8, 112u8, 104u8, 97u8, 46u8, 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, 82u8, - 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 82u8, 101u8, 113u8, - 117u8, 101u8, 115u8, 116u8, 26u8, 49u8, 46u8, 103u8, 114u8, 112u8, 99u8, 46u8, 114u8, - 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 46u8, 118u8, 49u8, - 97u8, 108u8, 112u8, 104u8, 97u8, 46u8, 83u8, 101u8, 114u8, 118u8, 101u8, 114u8, 82u8, - 101u8, 102u8, 108u8, 101u8, 99u8, 116u8, 105u8, 111u8, 110u8, 82u8, 101u8, 115u8, - 112u8, 111u8, 110u8, 115u8, 101u8, 40u8, 1u8, 48u8, 1u8, 98u8, 6u8, 112u8, 114u8, - 111u8, 116u8, 111u8, 51u8, -]; diff --git a/vendor/tonic-reflection/src/lib.rs b/vendor/tonic-reflection/src/lib.rs deleted file mode 100644 index 97ea3165..00000000 --- a/vendor/tonic-reflection/src/lib.rs +++ /dev/null @@ -1,66 +0,0 @@ -//! A `tonic` based gRPC Server Reflection implementation. - -#![doc( - html_logo_url = "https://github.com/hyperium/tonic/raw/master/.github/assets/tonic-docs.png" -)] -#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")] -#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))] -#![cfg_attr(docsrs, feature(doc_auto_cfg))] - -mod generated { - #![allow(unreachable_pub)] - #![allow(missing_docs)] - #![allow(rustdoc::invalid_html_tags)] - - #[rustfmt::skip] - pub mod grpc_reflection_v1alpha; - - #[rustfmt::skip] - pub mod grpc_reflection_v1; - - #[rustfmt::skip] - pub mod reflection_v1_fds; - - #[rustfmt::skip] - pub mod reflection_v1alpha1_fds; - - pub use reflection_v1_fds::FILE_DESCRIPTOR_SET as FILE_DESCRIPTOR_SET_V1; - pub use reflection_v1alpha1_fds::FILE_DESCRIPTOR_SET as FILE_DESCRIPTOR_SET_V1ALPHA; - - #[cfg(test)] - mod tests { - use super::{FILE_DESCRIPTOR_SET_V1, FILE_DESCRIPTOR_SET_V1ALPHA}; - use prost::Message as _; - - #[test] - fn v1alpha_file_descriptor_set_is_valid() { - prost_types::FileDescriptorSet::decode(FILE_DESCRIPTOR_SET_V1ALPHA).unwrap(); - } - - #[test] - fn v1_file_descriptor_set_is_valid() { - prost_types::FileDescriptorSet::decode(FILE_DESCRIPTOR_SET_V1).unwrap(); - } - } -} - -/// Generated protobuf types from the `grpc.reflection` namespace. -pub mod pb { - /// Generated protobuf types from the `grpc.reflection.v1` package. - pub mod v1 { - pub use crate::generated::{ - grpc_reflection_v1::*, FILE_DESCRIPTOR_SET_V1 as FILE_DESCRIPTOR_SET, - }; - } - - /// Generated protobuf types from the `grpc.reflection.v1alpha` package. - pub mod v1alpha { - pub use crate::generated::{ - grpc_reflection_v1alpha::*, FILE_DESCRIPTOR_SET_V1ALPHA as FILE_DESCRIPTOR_SET, - }; - } -} - -/// Implementation of the server component of gRPC Server Reflection. -#[cfg(feature = "server")] -pub mod server; diff --git a/vendor/tonic-reflection/src/server/mod.rs b/vendor/tonic-reflection/src/server/mod.rs deleted file mode 100644 index 2b1a806a..00000000 --- a/vendor/tonic-reflection/src/server/mod.rs +++ /dev/null @@ -1,326 +0,0 @@ -use std::collections::HashMap; -use std::fmt::{Display, Formatter}; -use std::sync::Arc; - -use prost::{DecodeError, Message}; -use prost_types::{ - DescriptorProto, EnumDescriptorProto, FieldDescriptorProto, FileDescriptorProto, - FileDescriptorSet, -}; -use tonic::Status; - -/// v1 interface for the gRPC Reflection Service server. -pub mod v1; -/// v1alpha interface for the gRPC Reflection Service server. -pub mod v1alpha; - -/// A builder used to construct a gRPC Reflection Service. -#[derive(Debug)] -pub struct Builder<'b> { - file_descriptor_sets: Vec<FileDescriptorSet>, - encoded_file_descriptor_sets: Vec<&'b [u8]>, - include_reflection_service: bool, - - service_names: Vec<String>, - use_all_service_names: bool, -} - -impl<'b> Builder<'b> { - /// Create a new builder that can configure a gRPC Reflection Service. - pub fn configure() -> Self { - Builder { - file_descriptor_sets: Vec::new(), - encoded_file_descriptor_sets: Vec::new(), - include_reflection_service: true, - - service_names: Vec::new(), - use_all_service_names: true, - } - } - - /// Registers an instance of `prost_types::FileDescriptorSet` with the gRPC Reflection - /// Service builder. - pub fn register_file_descriptor_set(mut self, file_descriptor_set: FileDescriptorSet) -> Self { - self.file_descriptor_sets.push(file_descriptor_set); - self - } - - /// Registers a byte slice containing an encoded `prost_types::FileDescriptorSet` with - /// the gRPC Reflection Service builder. - pub fn register_encoded_file_descriptor_set( - mut self, - encoded_file_descriptor_set: &'b [u8], - ) -> Self { - self.encoded_file_descriptor_sets - .push(encoded_file_descriptor_set); - self - } - - /// Serve the gRPC Reflection Service descriptor via the Reflection Service. This is enabled - /// by default - set `include` to false to disable. - pub fn include_reflection_service(mut self, include: bool) -> Self { - self.include_reflection_service = include; - self - } - - /// Advertise a fully-qualified gRPC service name. - /// - /// If not called, then all services present in the registered file descriptor sets - /// will be advertised. - pub fn with_service_name(mut self, name: impl Into<String>) -> Self { - self.use_all_service_names = false; - self.service_names.push(name.into()); - self - } - - /// Build a v1 gRPC Reflection Service to be served via Tonic. - pub fn build_v1( - mut self, - ) -> Result<v1::ServerReflectionServer<impl v1::ServerReflection>, Error> { - if self.include_reflection_service { - self = self.register_encoded_file_descriptor_set(crate::pb::v1::FILE_DESCRIPTOR_SET); - } - - Ok(v1::ServerReflectionServer::new( - v1::ReflectionService::from(ReflectionServiceState::new( - self.service_names, - self.encoded_file_descriptor_sets, - self.file_descriptor_sets, - self.use_all_service_names, - )?), - )) - } - - /// Build a v1alpha gRPC Reflection Service to be served via Tonic. - pub fn build_v1alpha( - mut self, - ) -> Result<v1alpha::ServerReflectionServer<impl v1alpha::ServerReflection>, Error> { - if self.include_reflection_service { - self = - self.register_encoded_file_descriptor_set(crate::pb::v1alpha::FILE_DESCRIPTOR_SET); - } - - Ok(v1alpha::ServerReflectionServer::new( - v1alpha::ReflectionService::from(ReflectionServiceState::new( - self.service_names, - self.encoded_file_descriptor_sets, - self.file_descriptor_sets, - self.use_all_service_names, - )?), - )) - } -} - -#[derive(Debug)] -struct ReflectionServiceState { - service_names: Vec<String>, - files: HashMap<String, Arc<FileDescriptorProto>>, - symbols: HashMap<String, Arc<FileDescriptorProto>>, -} - -impl ReflectionServiceState { - fn new( - service_names: Vec<String>, - encoded_file_descriptor_sets: Vec<&[u8]>, - mut file_descriptor_sets: Vec<FileDescriptorSet>, - use_all_service_names: bool, - ) -> Result<Self, Error> { - for encoded in encoded_file_descriptor_sets { - file_descriptor_sets.push(FileDescriptorSet::decode(encoded)?); - } - - let mut state = ReflectionServiceState { - service_names, - files: HashMap::new(), - symbols: HashMap::new(), - }; - - for fds in file_descriptor_sets { - for fd in fds.file { - let name = match fd.name.clone() { - None => { - return Err(Error::InvalidFileDescriptorSet("missing name".to_string())); - } - Some(n) => n, - }; - - if state.files.contains_key(&name) { - continue; - } - - let fd = Arc::new(fd); - state.files.insert(name, fd.clone()); - state.process_file(fd, use_all_service_names)?; - } - } - - Ok(state) - } - - fn process_file( - &mut self, - fd: Arc<FileDescriptorProto>, - use_all_service_names: bool, - ) -> Result<(), Error> { - let prefix = &fd.package.clone().unwrap_or_default(); - - for msg in &fd.message_type { - self.process_message(fd.clone(), prefix, msg)?; - } - - for en in &fd.enum_type { - self.process_enum(fd.clone(), prefix, en)?; - } - - for service in &fd.service { - let service_name = extract_name(prefix, "service", service.name.as_ref())?; - if use_all_service_names { - self.service_names.push(service_name.clone()); - } - self.symbols.insert(service_name.clone(), fd.clone()); - - for method in &service.method { - let method_name = extract_name(&service_name, "method", method.name.as_ref())?; - self.symbols.insert(method_name, fd.clone()); - } - } - - Ok(()) - } - - fn process_message( - &mut self, - fd: Arc<FileDescriptorProto>, - prefix: &str, - msg: &DescriptorProto, - ) -> Result<(), Error> { - let message_name = extract_name(prefix, "message", msg.name.as_ref())?; - self.symbols.insert(message_name.clone(), fd.clone()); - - for nested in &msg.nested_type { - self.process_message(fd.clone(), &message_name, nested)?; - } - - for en in &msg.enum_type { - self.process_enum(fd.clone(), &message_name, en)?; - } - - for field in &msg.field { - self.process_field(fd.clone(), &message_name, field)?; - } - - for oneof in &msg.oneof_decl { - let oneof_name = extract_name(&message_name, "oneof", oneof.name.as_ref())?; - self.symbols.insert(oneof_name, fd.clone()); - } - - Ok(()) - } - - fn process_enum( - &mut self, - fd: Arc<FileDescriptorProto>, - prefix: &str, - en: &EnumDescriptorProto, - ) -> Result<(), Error> { - let enum_name = extract_name(prefix, "enum", en.name.as_ref())?; - self.symbols.insert(enum_name.clone(), fd.clone()); - - for value in &en.value { - let value_name = extract_name(&enum_name, "enum value", value.name.as_ref())?; - self.symbols.insert(value_name, fd.clone()); - } - - Ok(()) - } - - fn process_field( - &mut self, - fd: Arc<FileDescriptorProto>, - prefix: &str, - field: &FieldDescriptorProto, - ) -> Result<(), Error> { - let field_name = extract_name(prefix, "field", field.name.as_ref())?; - self.symbols.insert(field_name, fd); - Ok(()) - } - - fn list_services(&self) -> &[String] { - &self.service_names - } - - fn symbol_by_name(&self, symbol: &str) -> Result<Vec<u8>, Status> { - match self.symbols.get(symbol) { - None => Err(Status::not_found(format!("symbol '{symbol}' not found"))), - Some(fd) => { - let mut encoded_fd = Vec::new(); - if fd.clone().encode(&mut encoded_fd).is_err() { - return Err(Status::internal("encoding error")); - }; - - Ok(encoded_fd) - } - } - } - - fn file_by_filename(&self, filename: &str) -> Result<Vec<u8>, Status> { - match self.files.get(filename) { - None => Err(Status::not_found(format!("file '{filename}' not found"))), - Some(fd) => { - let mut encoded_fd = Vec::new(); - if fd.clone().encode(&mut encoded_fd).is_err() { - return Err(Status::internal("encoding error")); - } - - Ok(encoded_fd) - } - } - } -} - -fn extract_name( - prefix: &str, - name_type: &str, - maybe_name: Option<&String>, -) -> Result<String, Error> { - match maybe_name { - None => Err(Error::InvalidFileDescriptorSet(format!( - "missing {name_type} name" - ))), - Some(name) => { - if prefix.is_empty() { - Ok(name.to_string()) - } else { - Ok(format!("{prefix}.{name}")) - } - } - } -} - -/// Represents an error in the construction of a gRPC Reflection Service. -#[derive(Debug)] -pub enum Error { - /// An error was encountered decoding a `prost_types::FileDescriptorSet` from a buffer. - DecodeError(prost::DecodeError), - /// An invalid `prost_types::FileDescriptorProto` was encountered. - InvalidFileDescriptorSet(String), -} - -impl From<DecodeError> for Error { - fn from(e: DecodeError) -> Self { - Error::DecodeError(e) - } -} - -impl std::error::Error for Error {} - -impl Display for Error { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - match self { - Error::DecodeError(_) => f.write_str("error decoding FileDescriptorSet from buffer"), - Error::InvalidFileDescriptorSet(s) => { - write!(f, "invalid FileDescriptorSet - {s}") - } - } - } -} diff --git a/vendor/tonic-reflection/src/server/v1.rs b/vendor/tonic-reflection/src/server/v1.rs deleted file mode 100644 index 6a5054f9..00000000 --- a/vendor/tonic-reflection/src/server/v1.rs +++ /dev/null @@ -1,138 +0,0 @@ -use std::{fmt, sync::Arc}; - -use tokio::sync::mpsc; -use tokio_stream::{Stream, StreamExt}; -use tonic::{Request, Response, Status, Streaming}; - -use super::ReflectionServiceState; -use crate::pb::v1::server_reflection_request::MessageRequest; -use crate::pb::v1::server_reflection_response::MessageResponse; -pub use crate::pb::v1::server_reflection_server::{ServerReflection, ServerReflectionServer}; -use crate::pb::v1::{ - ExtensionNumberResponse, FileDescriptorResponse, ListServiceResponse, ServerReflectionRequest, - ServerReflectionResponse, ServiceResponse, -}; - -/// An implementation for `ServerReflection`. -#[derive(Debug)] -pub struct ReflectionService { - state: Arc<ReflectionServiceState>, -} - -#[tonic::async_trait] -impl ServerReflection for ReflectionService { - type ServerReflectionInfoStream = ServerReflectionInfoStream; - - async fn server_reflection_info( - &self, - req: Request<Streaming<ServerReflectionRequest>>, - ) -> Result<Response<Self::ServerReflectionInfoStream>, Status> { - let mut req_rx = req.into_inner(); - let (resp_tx, resp_rx) = mpsc::channel::<Result<ServerReflectionResponse, Status>>(1); - - let state = self.state.clone(); - - tokio::spawn(async move { - while let Some(req) = req_rx.next().await { - let Ok(req) = req else { - return; - }; - - let resp_msg = match req.message_request.clone() { - None => Err(Status::invalid_argument("invalid MessageRequest")), - Some(msg) => match msg { - MessageRequest::FileByFilename(s) => state.file_by_filename(&s).map(|fd| { - MessageResponse::FileDescriptorResponse(FileDescriptorResponse { - file_descriptor_proto: vec![fd], - }) - }), - MessageRequest::FileContainingSymbol(s) => { - state.symbol_by_name(&s).map(|fd| { - MessageResponse::FileDescriptorResponse(FileDescriptorResponse { - file_descriptor_proto: vec![fd], - }) - }) - } - MessageRequest::FileContainingExtension(_) => { - Err(Status::not_found("extensions are not supported")) - } - MessageRequest::AllExtensionNumbersOfType(_) => { - // NOTE: Workaround. Some grpc clients (e.g. grpcurl) expect this method not to fail. - // https://github.com/hyperium/tonic/issues/1077 - Ok(MessageResponse::AllExtensionNumbersResponse( - ExtensionNumberResponse::default(), - )) - } - MessageRequest::ListServices(_) => { - Ok(MessageResponse::ListServicesResponse(ListServiceResponse { - service: state - .list_services() - .iter() - .map(|s| ServiceResponse { name: s.clone() }) - .collect(), - })) - } - }, - }; - - match resp_msg { - Ok(resp_msg) => { - let resp = ServerReflectionResponse { - valid_host: req.host.clone(), - original_request: Some(req.clone()), - message_response: Some(resp_msg), - }; - resp_tx.send(Ok(resp)).await.expect("send"); - } - Err(status) => { - resp_tx.send(Err(status)).await.expect("send"); - return; - } - } - } - }); - - Ok(Response::new(ServerReflectionInfoStream::new(resp_rx))) - } -} - -impl From<ReflectionServiceState> for ReflectionService { - fn from(state: ReflectionServiceState) -> Self { - Self { - state: Arc::new(state), - } - } -} - -/// A response stream. -pub struct ServerReflectionInfoStream { - inner: tokio_stream::wrappers::ReceiverStream<Result<ServerReflectionResponse, Status>>, -} - -impl ServerReflectionInfoStream { - fn new(resp_rx: mpsc::Receiver<Result<ServerReflectionResponse, Status>>) -> Self { - let inner = tokio_stream::wrappers::ReceiverStream::new(resp_rx); - Self { inner } - } -} - -impl Stream for ServerReflectionInfoStream { - type Item = Result<ServerReflectionResponse, Status>; - - fn poll_next( - mut self: std::pin::Pin<&mut Self>, - cx: &mut std::task::Context<'_>, - ) -> std::task::Poll<Option<Self::Item>> { - std::pin::Pin::new(&mut self.inner).poll_next(cx) - } - - fn size_hint(&self) -> (usize, Option<usize>) { - self.inner.size_hint() - } -} - -impl fmt::Debug for ServerReflectionInfoStream { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("ServerReflectionInfoStream").finish() - } -} diff --git a/vendor/tonic-reflection/src/server/v1alpha.rs b/vendor/tonic-reflection/src/server/v1alpha.rs deleted file mode 100644 index b21d8d91..00000000 --- a/vendor/tonic-reflection/src/server/v1alpha.rs +++ /dev/null @@ -1,138 +0,0 @@ -use std::{fmt, sync::Arc}; - -use tokio::sync::mpsc; -use tokio_stream::{Stream, StreamExt}; -use tonic::{Request, Response, Status, Streaming}; - -use super::ReflectionServiceState; -use crate::pb::v1alpha::server_reflection_request::MessageRequest; -use crate::pb::v1alpha::server_reflection_response::MessageResponse; -pub use crate::pb::v1alpha::server_reflection_server::{ServerReflection, ServerReflectionServer}; -use crate::pb::v1alpha::{ - ExtensionNumberResponse, FileDescriptorResponse, ListServiceResponse, ServerReflectionRequest, - ServerReflectionResponse, ServiceResponse, -}; - -/// An implementation for `ServerReflection`. -#[derive(Debug)] -pub struct ReflectionService { - state: Arc<ReflectionServiceState>, -} - -#[tonic::async_trait] -impl ServerReflection for ReflectionService { - type ServerReflectionInfoStream = ServerReflectionInfoStream; - - async fn server_reflection_info( - &self, - req: Request<Streaming<ServerReflectionRequest>>, - ) -> Result<Response<Self::ServerReflectionInfoStream>, Status> { - let mut req_rx = req.into_inner(); - let (resp_tx, resp_rx) = mpsc::channel::<Result<ServerReflectionResponse, Status>>(1); - - let state = self.state.clone(); - - tokio::spawn(async move { - while let Some(req) = req_rx.next().await { - let Ok(req) = req else { - return; - }; - - let resp_msg = match req.message_request.clone() { - None => Err(Status::invalid_argument("invalid MessageRequest")), - Some(msg) => match msg { - MessageRequest::FileByFilename(s) => state.file_by_filename(&s).map(|fd| { - MessageResponse::FileDescriptorResponse(FileDescriptorResponse { - file_descriptor_proto: vec![fd], - }) - }), - MessageRequest::FileContainingSymbol(s) => { - state.symbol_by_name(&s).map(|fd| { - MessageResponse::FileDescriptorResponse(FileDescriptorResponse { - file_descriptor_proto: vec![fd], - }) - }) - } - MessageRequest::FileContainingExtension(_) => { - Err(Status::not_found("extensions are not supported")) - } - MessageRequest::AllExtensionNumbersOfType(_) => { - // NOTE: Workaround. Some grpc clients (e.g. grpcurl) expect this method not to fail. - // https://github.com/hyperium/tonic/issues/1077 - Ok(MessageResponse::AllExtensionNumbersResponse( - ExtensionNumberResponse::default(), - )) - } - MessageRequest::ListServices(_) => { - Ok(MessageResponse::ListServicesResponse(ListServiceResponse { - service: state - .list_services() - .iter() - .map(|s| ServiceResponse { name: s.clone() }) - .collect(), - })) - } - }, - }; - - match resp_msg { - Ok(resp_msg) => { - let resp = ServerReflectionResponse { - valid_host: req.host.clone(), - original_request: Some(req.clone()), - message_response: Some(resp_msg), - }; - resp_tx.send(Ok(resp)).await.expect("send"); - } - Err(status) => { - resp_tx.send(Err(status)).await.expect("send"); - return; - } - } - } - }); - - Ok(Response::new(ServerReflectionInfoStream::new(resp_rx))) - } -} - -impl From<ReflectionServiceState> for ReflectionService { - fn from(state: ReflectionServiceState) -> Self { - Self { - state: Arc::new(state), - } - } -} - -/// A response stream. -pub struct ServerReflectionInfoStream { - inner: tokio_stream::wrappers::ReceiverStream<Result<ServerReflectionResponse, Status>>, -} - -impl ServerReflectionInfoStream { - fn new(resp_rx: mpsc::Receiver<Result<ServerReflectionResponse, Status>>) -> Self { - let inner = tokio_stream::wrappers::ReceiverStream::new(resp_rx); - Self { inner } - } -} - -impl Stream for ServerReflectionInfoStream { - type Item = Result<ServerReflectionResponse, Status>; - - fn poll_next( - mut self: std::pin::Pin<&mut Self>, - cx: &mut std::task::Context<'_>, - ) -> std::task::Poll<Option<Self::Item>> { - std::pin::Pin::new(&mut self.inner).poll_next(cx) - } - - fn size_hint(&self) -> (usize, Option<usize>) { - self.inner.size_hint() - } -} - -impl fmt::Debug for ServerReflectionInfoStream { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("ServerReflectionInfoStream").finish() - } -} |
