#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Task {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<super::super::common::v1alpha1::TaskId>,
#[prost(string, tag = "2")]
pub task_type: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "3")]
pub task_data: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for Task {
const NAME: &'static str = "Task";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.Task".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.Task".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitTasksRequest {
#[prost(message, repeated, tag = "1")]
pub tasks: ::prost::alloc::vec::Vec<Task>,
}
impl ::prost::Name for SubmitTasksRequest {
const NAME: &'static str = "SubmitTasksRequest";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.SubmitTasksRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.SubmitTasksRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubmitTasksResponse {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<super::super::common::v1alpha1::DataframePart>,
}
impl ::prost::Name for SubmitTasksResponse {
const NAME: &'static str = "SubmitTasksResponse";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.SubmitTasksResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.SubmitTasksResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTasksRequest {
#[prost(message, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<super::super::common::v1alpha1::TaskId>,
}
impl ::prost::Name for QueryTasksRequest {
const NAME: &'static str = "QueryTasksRequest";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.QueryTasksRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.QueryTasksRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTasksResponse {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<super::super::common::v1alpha1::DataframePart>,
}
impl ::prost::Name for QueryTasksResponse {
const NAME: &'static str = "QueryTasksResponse";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.QueryTasksResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.QueryTasksResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTasksOnCompletionRequest {
#[prost(message, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<super::super::common::v1alpha1::TaskId>,
#[prost(message, optional, tag = "2")]
pub timeout: ::core::option::Option<::prost_types::Duration>,
}
impl ::prost::Name for QueryTasksOnCompletionRequest {
const NAME: &'static str = "QueryTasksOnCompletionRequest";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.QueryTasksOnCompletionRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.QueryTasksOnCompletionRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryTasksOnCompletionResponse {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<super::super::common::v1alpha1::DataframePart>,
}
impl ::prost::Name for QueryTasksOnCompletionResponse {
const NAME: &'static str = "QueryTasksOnCompletionResponse";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.QueryTasksOnCompletionResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.QueryTasksOnCompletionResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchTaskOutputRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<super::super::common::v1alpha1::TaskId>,
}
impl ::prost::Name for FetchTaskOutputRequest {
const NAME: &'static str = "FetchTaskOutputRequest";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.FetchTaskOutputRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.FetchTaskOutputRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchTaskOutputResponse {
#[prost(message, optional, tag = "1")]
pub data: ::core::option::Option<super::super::common::v1alpha1::DataframePart>,
}
impl ::prost::Name for FetchTaskOutputResponse {
const NAME: &'static str = "FetchTaskOutputResponse";
const PACKAGE: &'static str = "rerun.redap_tasks.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.redap_tasks.v1alpha1.FetchTaskOutputResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.redap_tasks.v1alpha1.FetchTaskOutputResponse".into()
}
}
pub mod tasks_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::http::Uri;
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct TasksServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> TasksServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
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,
) -> TasksServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + std::marker::Send + std::marker::Sync,
{
TasksServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn submit_tasks(
&mut self,
request: impl tonic::IntoRequest<super::SubmitTasksRequest>,
) -> std::result::Result<tonic::Response<super::SubmitTasksResponse>, 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(
"/rerun.redap_tasks.v1alpha1.TasksService/SubmitTasks",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.redap_tasks.v1alpha1.TasksService",
"SubmitTasks",
));
self.inner.unary(req, path, codec).await
}
pub async fn query_tasks(
&mut self,
request: impl tonic::IntoRequest<super::QueryTasksRequest>,
) -> std::result::Result<tonic::Response<super::QueryTasksResponse>, 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(
"/rerun.redap_tasks.v1alpha1.TasksService/QueryTasks",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.redap_tasks.v1alpha1.TasksService",
"QueryTasks",
));
self.inner.unary(req, path, codec).await
}
pub async fn fetch_task_output(
&mut self,
request: impl tonic::IntoRequest<super::FetchTaskOutputRequest>,
) -> std::result::Result<tonic::Response<super::FetchTaskOutputResponse>, 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(
"/rerun.redap_tasks.v1alpha1.TasksService/FetchTaskOutput",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.redap_tasks.v1alpha1.TasksService",
"FetchTaskOutput",
));
self.inner.unary(req, path, codec).await
}
pub async fn query_tasks_on_completion(
&mut self,
request: impl tonic::IntoRequest<super::QueryTasksOnCompletionRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::QueryTasksOnCompletionResponse>>,
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(
"/rerun.redap_tasks.v1alpha1.TasksService/QueryTasksOnCompletion",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.redap_tasks.v1alpha1.TasksService",
"QueryTasksOnCompletion",
));
self.inner.server_streaming(req, path, codec).await
}
}
}
pub mod tasks_service_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::*;
#[async_trait]
pub trait TasksService: std::marker::Send + std::marker::Sync + 'static {
async fn submit_tasks(
&self,
request: tonic::Request<super::SubmitTasksRequest>,
) -> std::result::Result<tonic::Response<super::SubmitTasksResponse>, tonic::Status>;
async fn query_tasks(
&self,
request: tonic::Request<super::QueryTasksRequest>,
) -> std::result::Result<tonic::Response<super::QueryTasksResponse>, tonic::Status>;
async fn fetch_task_output(
&self,
request: tonic::Request<super::FetchTaskOutputRequest>,
) -> std::result::Result<tonic::Response<super::FetchTaskOutputResponse>, tonic::Status>;
type QueryTasksOnCompletionStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::QueryTasksOnCompletionResponse, tonic::Status>,
> + std::marker::Send
+ 'static;
async fn query_tasks_on_completion(
&self,
request: tonic::Request<super::QueryTasksOnCompletionRequest>,
) -> std::result::Result<tonic::Response<Self::QueryTasksOnCompletionStream>, tonic::Status>;
}
#[derive(Debug)]
pub struct TasksServiceServer<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> TasksServiceServer<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)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[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 TasksServiceServer<T>
where
T: TasksService,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::BoxBody>;
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() {
"/rerun.redap_tasks.v1alpha1.TasksService/SubmitTasks" => {
#[allow(non_camel_case_types)]
struct SubmitTasksSvc<T: TasksService>(pub Arc<T>);
impl<T: TasksService> tonic::server::UnaryService<super::SubmitTasksRequest> for SubmitTasksSvc<T> {
type Response = super::SubmitTasksResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::SubmitTasksRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TasksService>::submit_tasks(&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 = SubmitTasksSvc(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)
}
"/rerun.redap_tasks.v1alpha1.TasksService/QueryTasks" => {
#[allow(non_camel_case_types)]
struct QueryTasksSvc<T: TasksService>(pub Arc<T>);
impl<T: TasksService> tonic::server::UnaryService<super::QueryTasksRequest> for QueryTasksSvc<T> {
type Response = super::QueryTasksResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryTasksRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TasksService>::query_tasks(&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 = QueryTasksSvc(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)
}
"/rerun.redap_tasks.v1alpha1.TasksService/FetchTaskOutput" => {
#[allow(non_camel_case_types)]
struct FetchTaskOutputSvc<T: TasksService>(pub Arc<T>);
impl<T: TasksService> tonic::server::UnaryService<super::FetchTaskOutputRequest>
for FetchTaskOutputSvc<T>
{
type Response = super::FetchTaskOutputResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::FetchTaskOutputRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TasksService>::fetch_task_output(&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 = FetchTaskOutputSvc(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)
}
"/rerun.redap_tasks.v1alpha1.TasksService/QueryTasksOnCompletion" => {
#[allow(non_camel_case_types)]
struct QueryTasksOnCompletionSvc<T: TasksService>(pub Arc<T>);
impl<T: TasksService>
tonic::server::ServerStreamingService<super::QueryTasksOnCompletionRequest>
for QueryTasksOnCompletionSvc<T>
{
type Response = super::QueryTasksOnCompletionResponse;
type ResponseStream = T::QueryTasksOnCompletionStream;
type Future =
BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryTasksOnCompletionRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as TasksService>::query_tasks_on_completion(&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 = QueryTasksOnCompletionSvc(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.server_streaming(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => Box::pin(async move {
let mut response = http::Response::new(empty_body());
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 TasksServiceServer<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,
}
}
}
pub const SERVICE_NAME: &str = "rerun.redap_tasks.v1alpha1.TasksService";
impl<T> tonic::server::NamedService for TasksServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}