@@ -134,31 +134,6 @@ pub mod no_data_service_client {
|
||||
.insert(GrpcMethod::new("nodata.v1.NoDataService", "GetTopics"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn get_keys(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::GetKeysRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::GetKeysResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::new(
|
||||
tonic::Code::Unknown,
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/nodata.v1.NoDataService/GetKeys",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(GrpcMethod::new("nodata.v1.NoDataService", "GetKeys"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn subscribe(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::SubscribeRequest>,
|
||||
@@ -207,10 +182,6 @@ pub mod no_data_service_server {
|
||||
tonic::Response<super::GetTopicsResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
async fn get_keys(
|
||||
&self,
|
||||
request: tonic::Request<super::GetKeysRequest>,
|
||||
) -> std::result::Result<tonic::Response<super::GetKeysResponse>, tonic::Status>;
|
||||
/// Server streaming response type for the Subscribe method.
|
||||
type SubscribeStream: tonic::codegen::tokio_stream::Stream<
|
||||
Item = std::result::Result<super::SubscribeResponse, tonic::Status>,
|
||||
@@ -393,52 +364,6 @@ pub mod no_data_service_server {
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/nodata.v1.NoDataService/GetKeys" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct GetKeysSvc<T: NoDataService>(pub Arc<T>);
|
||||
impl<
|
||||
T: NoDataService,
|
||||
> tonic::server::UnaryService<super::GetKeysRequest>
|
||||
for GetKeysSvc<T> {
|
||||
type Response = super::GetKeysResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<super::GetKeysRequest>,
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as NoDataService>::get_keys(&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 inner = inner.0;
|
||||
let method = GetKeysSvc(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.unary(method, req).await;
|
||||
Ok(res)
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/nodata.v1.NoDataService/Subscribe" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct SubscribeSvc<T: NoDataService>(pub Arc<T>);
|
||||
|
Reference in New Issue
Block a user