#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindEntriesRequest {
#[prost(message, optional, tag = "1")]
pub filter: ::core::option::Option<EntryFilter>,
}
impl ::prost::Name for FindEntriesRequest {
const NAME: &'static str = "FindEntriesRequest";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.FindEntriesRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.FindEntriesRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FindEntriesResponse {
#[prost(message, repeated, tag = "1")]
pub entries: ::prost::alloc::vec::Vec<EntryDetails>,
}
impl ::prost::Name for FindEntriesResponse {
const NAME: &'static str = "FindEntriesResponse";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.FindEntriesResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.FindEntriesResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteEntryRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<super::super::common::v1alpha1::EntryId>,
}
impl ::prost::Name for DeleteEntryRequest {
const NAME: &'static str = "DeleteEntryRequest";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.DeleteEntryRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.DeleteEntryRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteEntryResponse {}
impl ::prost::Name for DeleteEntryResponse {
const NAME: &'static str = "DeleteEntryResponse";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.DeleteEntryResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.DeleteEntryResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatasetEntryRequest {
#[prost(string, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for CreateDatasetEntryRequest {
const NAME: &'static str = "CreateDatasetEntryRequest";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.CreateDatasetEntryRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.CreateDatasetEntryRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatasetEntryResponse {
#[prost(message, optional, tag = "1")]
pub dataset: ::core::option::Option<DatasetEntry>,
}
impl ::prost::Name for CreateDatasetEntryResponse {
const NAME: &'static str = "CreateDatasetEntryResponse";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.CreateDatasetEntryResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.CreateDatasetEntryResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReadDatasetEntryRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<super::super::common::v1alpha1::EntryId>,
}
impl ::prost::Name for ReadDatasetEntryRequest {
const NAME: &'static str = "ReadDatasetEntryRequest";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.ReadDatasetEntryRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.ReadDatasetEntryRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadDatasetEntryResponse {
#[prost(message, optional, tag = "1")]
pub dataset: ::core::option::Option<DatasetEntry>,
}
impl ::prost::Name for ReadDatasetEntryResponse {
const NAME: &'static str = "ReadDatasetEntryResponse";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.ReadDatasetEntryResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.ReadDatasetEntryResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReadTableEntryRequest {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<super::super::common::v1alpha1::EntryId>,
}
impl ::prost::Name for ReadTableEntryRequest {
const NAME: &'static str = "ReadTableEntryRequest";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.ReadTableEntryRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.ReadTableEntryRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadTableEntryResponse {
#[prost(message, optional, tag = "1")]
pub table: ::core::option::Option<TableEntry>,
}
impl ::prost::Name for ReadTableEntryResponse {
const NAME: &'static str = "ReadTableEntryResponse";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.ReadTableEntryResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.ReadTableEntryResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntryFilter {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<super::super::common::v1alpha1::EntryId>,
#[prost(string, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "EntryKind", optional, tag = "3")]
pub entry_kind: ::core::option::Option<i32>,
}
impl ::prost::Name for EntryFilter {
const NAME: &'static str = "EntryFilter";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.EntryFilter".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.EntryFilter".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntryDetails {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<super::super::common::v1alpha1::EntryId>,
#[prost(string, optional, tag = "2")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "EntryKind", tag = "3")]
pub entry_kind: i32,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for EntryDetails {
const NAME: &'static str = "EntryDetails";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.EntryDetails".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.EntryDetails".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DatasetEntry {
#[prost(message, optional, tag = "1")]
pub details: ::core::option::Option<EntryDetails>,
#[prost(message, optional, tag = "2")]
pub dataset_handle: ::core::option::Option<super::super::common::v1alpha1::DatasetHandle>,
}
impl ::prost::Name for DatasetEntry {
const NAME: &'static str = "DatasetEntry";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.DatasetEntry".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.DatasetEntry".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TableEntry {
#[prost(message, optional, tag = "1")]
pub details: ::core::option::Option<EntryDetails>,
#[prost(message, optional, tag = "2")]
pub schema: ::core::option::Option<super::super::common::v1alpha1::Schema>,
#[prost(message, optional, tag = "3")]
pub provider_details: ::core::option::Option<::prost_types::Any>,
}
impl ::prost::Name for TableEntry {
const NAME: &'static str = "TableEntry";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.TableEntry".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.TableEntry".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SystemTable {
#[prost(enumeration = "SystemTableKind", tag = "1")]
pub kind: i32,
}
impl ::prost::Name for SystemTable {
const NAME: &'static str = "SystemTable";
const PACKAGE: &'static str = "rerun.catalog.v1alpha1";
fn full_name() -> ::prost::alloc::string::String {
"rerun.catalog.v1alpha1.SystemTable".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/rerun.catalog.v1alpha1.SystemTable".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EntryKind {
Unspecified = 0,
Dataset = 1,
DatasetView = 2,
Table = 3,
TableView = 4,
}
impl EntryKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "ENTRY_KIND_UNSPECIFIED",
Self::Dataset => "ENTRY_KIND_DATASET",
Self::DatasetView => "ENTRY_KIND_DATASET_VIEW",
Self::Table => "ENTRY_KIND_TABLE",
Self::TableView => "ENTRY_KIND_TABLE_VIEW",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENTRY_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"ENTRY_KIND_DATASET" => Some(Self::Dataset),
"ENTRY_KIND_DATASET_VIEW" => Some(Self::DatasetView),
"ENTRY_KIND_TABLE" => Some(Self::Table),
"ENTRY_KIND_TABLE_VIEW" => Some(Self::TableView),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SystemTableKind {
Unspecified = 0,
Namespaces = 1,
Entries = 2,
}
impl SystemTableKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SYSTEM_TABLE_KIND_UNSPECIFIED",
Self::Namespaces => "SYSTEM_TABLE_KIND_NAMESPACES",
Self::Entries => "SYSTEM_TABLE_KIND_ENTRIES",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SYSTEM_TABLE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"SYSTEM_TABLE_KIND_NAMESPACES" => Some(Self::Namespaces),
"SYSTEM_TABLE_KIND_ENTRIES" => Some(Self::Entries),
_ => None,
}
}
}
pub mod catalog_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 CatalogServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> CatalogServiceClient<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,
) -> CatalogServiceClient<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,
{
CatalogServiceClient::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 find_entries(
&mut self,
request: impl tonic::IntoRequest<super::FindEntriesRequest>,
) -> std::result::Result<tonic::Response<super::FindEntriesResponse>, 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.catalog.v1alpha1.CatalogService/FindEntries",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.catalog.v1alpha1.CatalogService",
"FindEntries",
));
self.inner.unary(req, path, codec).await
}
pub async fn delete_entry(
&mut self,
request: impl tonic::IntoRequest<super::DeleteEntryRequest>,
) -> std::result::Result<tonic::Response<super::DeleteEntryResponse>, 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.catalog.v1alpha1.CatalogService/DeleteEntry",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.catalog.v1alpha1.CatalogService",
"DeleteEntry",
));
self.inner.unary(req, path, codec).await
}
pub async fn create_dataset_entry(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatasetEntryRequest>,
) -> std::result::Result<tonic::Response<super::CreateDatasetEntryResponse>, 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.catalog.v1alpha1.CatalogService/CreateDatasetEntry",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.catalog.v1alpha1.CatalogService",
"CreateDatasetEntry",
));
self.inner.unary(req, path, codec).await
}
pub async fn read_dataset_entry(
&mut self,
request: impl tonic::IntoRequest<super::ReadDatasetEntryRequest>,
) -> std::result::Result<tonic::Response<super::ReadDatasetEntryResponse>, 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.catalog.v1alpha1.CatalogService/ReadDatasetEntry",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.catalog.v1alpha1.CatalogService",
"ReadDatasetEntry",
));
self.inner.unary(req, path, codec).await
}
pub async fn read_table_entry(
&mut self,
request: impl tonic::IntoRequest<super::ReadTableEntryRequest>,
) -> std::result::Result<tonic::Response<super::ReadTableEntryResponse>, 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.catalog.v1alpha1.CatalogService/ReadTableEntry",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.catalog.v1alpha1.CatalogService",
"ReadTableEntry",
));
self.inner.unary(req, path, codec).await
}
}
}
pub mod catalog_service_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::*;
#[async_trait]
pub trait CatalogService: std::marker::Send + std::marker::Sync + 'static {
async fn find_entries(
&self,
request: tonic::Request<super::FindEntriesRequest>,
) -> std::result::Result<tonic::Response<super::FindEntriesResponse>, tonic::Status>;
async fn delete_entry(
&self,
request: tonic::Request<super::DeleteEntryRequest>,
) -> std::result::Result<tonic::Response<super::DeleteEntryResponse>, tonic::Status>;
async fn create_dataset_entry(
&self,
request: tonic::Request<super::CreateDatasetEntryRequest>,
) -> std::result::Result<tonic::Response<super::CreateDatasetEntryResponse>, tonic::Status>;
async fn read_dataset_entry(
&self,
request: tonic::Request<super::ReadDatasetEntryRequest>,
) -> std::result::Result<tonic::Response<super::ReadDatasetEntryResponse>, tonic::Status>;
async fn read_table_entry(
&self,
request: tonic::Request<super::ReadTableEntryRequest>,
) -> std::result::Result<tonic::Response<super::ReadTableEntryResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct CatalogServiceServer<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> CatalogServiceServer<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 CatalogServiceServer<T>
where
T: CatalogService,
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.catalog.v1alpha1.CatalogService/FindEntries" => {
#[allow(non_camel_case_types)]
struct FindEntriesSvc<T: CatalogService>(pub Arc<T>);
impl<T: CatalogService> tonic::server::UnaryService<super::FindEntriesRequest>
for FindEntriesSvc<T>
{
type Response = super::FindEntriesResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::FindEntriesRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CatalogService>::find_entries(&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 = FindEntriesSvc(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.catalog.v1alpha1.CatalogService/DeleteEntry" => {
#[allow(non_camel_case_types)]
struct DeleteEntrySvc<T: CatalogService>(pub Arc<T>);
impl<T: CatalogService> tonic::server::UnaryService<super::DeleteEntryRequest>
for DeleteEntrySvc<T>
{
type Response = super::DeleteEntryResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::DeleteEntryRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CatalogService>::delete_entry(&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 = DeleteEntrySvc(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.catalog.v1alpha1.CatalogService/CreateDatasetEntry" => {
#[allow(non_camel_case_types)]
struct CreateDatasetEntrySvc<T: CatalogService>(pub Arc<T>);
impl<T: CatalogService>
tonic::server::UnaryService<super::CreateDatasetEntryRequest>
for CreateDatasetEntrySvc<T>
{
type Response = super::CreateDatasetEntryResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::CreateDatasetEntryRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CatalogService>::create_dataset_entry(&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 = CreateDatasetEntrySvc(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.catalog.v1alpha1.CatalogService/ReadDatasetEntry" => {
#[allow(non_camel_case_types)]
struct ReadDatasetEntrySvc<T: CatalogService>(pub Arc<T>);
impl<T: CatalogService>
tonic::server::UnaryService<super::ReadDatasetEntryRequest>
for ReadDatasetEntrySvc<T>
{
type Response = super::ReadDatasetEntryResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::ReadDatasetEntryRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CatalogService>::read_dataset_entry(&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 = ReadDatasetEntrySvc(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.catalog.v1alpha1.CatalogService/ReadTableEntry" => {
#[allow(non_camel_case_types)]
struct ReadTableEntrySvc<T: CatalogService>(pub Arc<T>);
impl<T: CatalogService>
tonic::server::UnaryService<super::ReadTableEntryRequest>
for ReadTableEntrySvc<T>
{
type Response = super::ReadTableEntryResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::ReadTableEntryRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as CatalogService>::read_table_entry(&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 = ReadTableEntrySvc(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)
}
_ => 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 CatalogServiceServer<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.catalog.v1alpha1.CatalogService";
impl<T> tonic::server::NamedService for CatalogServiceServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}