#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecordingId {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Timeline {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeRange {
#[prost(int64, tag = "1")]
pub start: i64,
#[prost(int64, tag = "2")]
pub end: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schema {
#[prost(bytes = "vec", tag = "1")]
pub arrow_schema: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Query {
#[prost(message, optional, tag = "1")]
pub view_contents: ::core::option::Option<ViewContents>,
#[prost(bool, tag = "2")]
pub include_semantically_empty_columns: bool,
#[prost(bool, tag = "3")]
pub include_indicator_columns: bool,
#[prost(bool, tag = "4")]
pub include_tombstone_columns: bool,
#[prost(message, optional, tag = "5")]
pub filtered_index: ::core::option::Option<IndexColumnSelector>,
#[prost(message, optional, tag = "6")]
pub filtered_index_range: ::core::option::Option<IndexRange>,
#[prost(message, optional, tag = "7")]
pub filtered_index_values: ::core::option::Option<IndexValues>,
#[prost(message, optional, tag = "8")]
pub using_index_values: ::core::option::Option<IndexValues>,
#[prost(message, optional, tag = "9")]
pub filtered_is_not_null: ::core::option::Option<ComponentColumnSelector>,
#[prost(message, optional, tag = "10")]
pub column_selection: ::core::option::Option<ColumnSelection>,
#[prost(enumeration = "SparseFillStrategy", tag = "11")]
pub sparse_fill_strategy: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnSelection {
#[prost(message, repeated, tag = "1")]
pub columns: ::prost::alloc::vec::Vec<ColumnSelector>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnSelector {
#[prost(oneof = "column_selector::SelectorType", tags = "2, 3")]
pub selector_type: ::core::option::Option<column_selector::SelectorType>,
}
pub mod column_selector {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum SelectorType {
#[prost(message, tag = "2")]
ComponentColumn(super::ComponentColumnSelector),
#[prost(message, tag = "3")]
TimeColumn(super::TimeColumnSelector),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexColumnSelector {
#[prost(message, optional, tag = "1")]
pub timeline: ::core::option::Option<Timeline>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct IndexRange {
#[prost(message, optional, tag = "1")]
pub time_range: ::core::option::Option<TimeRange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexValues {
#[prost(message, repeated, tag = "1")]
pub time_points: ::prost::alloc::vec::Vec<TimeInt>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SampledIndexValues {
#[prost(message, repeated, tag = "1")]
pub sample_points: ::prost::alloc::vec::Vec<TimeInt>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeInt {
#[prost(int64, tag = "1")]
pub time: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViewContents {
#[prost(message, repeated, tag = "1")]
pub contents: ::prost::alloc::vec::Vec<ViewContentsPart>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ViewContentsPart {
#[prost(message, optional, tag = "1")]
pub path: ::core::option::Option<EntityPath>,
#[prost(message, optional, tag = "2")]
pub components: ::core::option::Option<ComponentsSet>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComponentsSet {
#[prost(message, repeated, tag = "1")]
pub components: ::prost::alloc::vec::Vec<Component>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityPath {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Component {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeColumnSelector {
#[prost(message, optional, tag = "1")]
pub timeline: ::core::option::Option<Timeline>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComponentColumnSelector {
#[prost(message, optional, tag = "1")]
pub entity_path: ::core::option::Option<EntityPath>,
#[prost(message, optional, tag = "2")]
pub component: ::core::option::Option<Component>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SparseFillStrategy {
None = 0,
LatestAtGlobal = 1,
}
impl SparseFillStrategy {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::None => "NONE",
Self::LatestAtGlobal => "LATEST_AT_GLOBAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NONE" => Some(Self::None),
"LATEST_AT_GLOBAL" => Some(Self::LatestAtGlobal),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ErrorCode {
Unused = 0,
ObjectStoreError = 1,
MetadataDbError = 2,
}
impl ErrorCode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unused => "_UNUSED",
Self::ObjectStoreError => "OBJECT_STORE_ERROR",
Self::MetadataDbError => "METADATA_DB_ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"_UNUSED" => Some(Self::Unused),
"OBJECT_STORE_ERROR" => Some(Self::ObjectStoreError),
"METADATA_DB_ERROR" => Some(Self::MetadataDbError),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterRecordingRequest {
#[prost(string, tag = "1")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub storage_url: ::prost::alloc::string::String,
#[prost(enumeration = "RecordingType", tag = "3")]
pub typ: i32,
#[prost(message, optional, tag = "4")]
pub metadata: ::core::option::Option<RecordingMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecordingMetadata {
#[prost(enumeration = "EncoderVersion", tag = "1")]
pub encoder_version: i32,
#[prost(bytes = "vec", tag = "2")]
pub payload: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterRecordingResponse {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<RecordingId>,
#[prost(message, optional, tag = "2")]
pub metadata: ::core::option::Option<RecordingMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegistrationError {
#[prost(enumeration = "ErrorCode", tag = "1")]
pub code: i32,
#[prost(string, tag = "2")]
pub storage_url: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRecordingMetadataRequest {
#[prost(message, optional, tag = "1")]
pub recording_id: ::core::option::Option<RecordingId>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetRecordingMetadataResponse {
#[prost(message, optional, tag = "1")]
pub id: ::core::option::Option<RecordingId>,
#[prost(message, optional, tag = "2")]
pub metadata: ::core::option::Option<RecordingMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeMetadata {
#[prost(message, optional, tag = "1")]
pub timeline: ::core::option::Option<Timeline>,
#[prost(message, optional, tag = "2")]
pub time_range: ::core::option::Option<TimeRange>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateRecordingMetadataRequest {
#[prost(message, optional, tag = "1")]
pub recording_id: ::core::option::Option<RecordingId>,
#[prost(message, optional, tag = "2")]
pub metadata: ::core::option::Option<RecordingMetadata>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UpdateRecordingMetadataResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRequest {
#[prost(message, optional, tag = "1")]
pub recording_id: ::core::option::Option<RecordingId>,
#[prost(message, optional, tag = "3")]
pub query: ::core::option::Option<Query>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryResponse {
#[prost(enumeration = "EncoderVersion", tag = "1")]
pub encoder_version: i32,
#[prost(bytes = "vec", tag = "2")]
pub payload: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRecordingsRequest {
#[prost(message, optional, tag = "1")]
pub column_projection: ::core::option::Option<ColumnProjection>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ColumnProjection {
#[prost(string, repeated, tag = "1")]
pub columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRecordingsResponse {
#[prost(message, repeated, tag = "1")]
pub recordings: ::prost::alloc::vec::Vec<RecordingMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchRecordingRequest {
#[prost(message, optional, tag = "1")]
pub recording_id: ::core::option::Option<RecordingId>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FetchRecordingResponse {
#[prost(enumeration = "EncoderVersion", tag = "1")]
pub encoder_version: i32,
#[prost(bytes = "vec", tag = "2")]
pub payload: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum EncoderVersion {
V0 = 0,
}
impl EncoderVersion {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::V0 => "V0",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"V0" => Some(Self::V0),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RecordingType {
Rrd = 0,
}
impl RecordingType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Rrd => "RRD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"RRD" => Some(Self::Rrd),
_ => None,
}
}
}
pub mod storage_node_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 StorageNodeClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> StorageNodeClient<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,
) -> StorageNodeClient<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,
{
StorageNodeClient::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 query(
&mut self,
request: impl tonic::IntoRequest<super::QueryRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::QueryResponse>>,
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.remote_store.v0.StorageNode/Query");
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.remote_store.v0.StorageNode",
"Query",
));
self.inner.server_streaming(req, path, codec).await
}
pub async fn fetch_recording(
&mut self,
request: impl tonic::IntoRequest<super::FetchRecordingRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::FetchRecordingResponse>>,
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.remote_store.v0.StorageNode/FetchRecording",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.remote_store.v0.StorageNode",
"FetchRecording",
));
self.inner.server_streaming(req, path, codec).await
}
pub async fn list_recordings(
&mut self,
request: impl tonic::IntoRequest<super::ListRecordingsRequest>,
) -> std::result::Result<tonic::Response<super::ListRecordingsResponse>, 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.remote_store.v0.StorageNode/ListRecordings",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.remote_store.v0.StorageNode",
"ListRecordings",
));
self.inner.unary(req, path, codec).await
}
pub async fn get_recording_metadata(
&mut self,
request: impl tonic::IntoRequest<super::GetRecordingMetadataRequest>,
) -> std::result::Result<tonic::Response<super::GetRecordingMetadataResponse>, 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.remote_store.v0.StorageNode/GetRecordingMetadata",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.remote_store.v0.StorageNode",
"GetRecordingMetadata",
));
self.inner.unary(req, path, codec).await
}
pub async fn update_recording_metadata(
&mut self,
request: impl tonic::IntoRequest<super::UpdateRecordingMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateRecordingMetadataResponse>,
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.remote_store.v0.StorageNode/UpdateRecordingMetadata",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.remote_store.v0.StorageNode",
"UpdateRecordingMetadata",
));
self.inner.unary(req, path, codec).await
}
pub async fn register_recording(
&mut self,
request: impl tonic::IntoRequest<super::RegisterRecordingRequest>,
) -> std::result::Result<tonic::Response<super::RegisterRecordingResponse>, 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.remote_store.v0.StorageNode/RegisterRecording",
);
let mut req = request.into_request();
req.extensions_mut().insert(GrpcMethod::new(
"rerun.remote_store.v0.StorageNode",
"RegisterRecording",
));
self.inner.unary(req, path, codec).await
}
}
}
pub mod storage_node_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value
)]
use tonic::codegen::*;
#[async_trait]
pub trait StorageNode: std::marker::Send + std::marker::Sync + 'static {
type QueryStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::QueryResponse, tonic::Status>,
> + std::marker::Send
+ 'static;
async fn query(
&self,
request: tonic::Request<super::QueryRequest>,
) -> std::result::Result<tonic::Response<Self::QueryStream>, tonic::Status>;
type FetchRecordingStream: tonic::codegen::tokio_stream::Stream<
Item = std::result::Result<super::FetchRecordingResponse, tonic::Status>,
> + std::marker::Send
+ 'static;
async fn fetch_recording(
&self,
request: tonic::Request<super::FetchRecordingRequest>,
) -> std::result::Result<tonic::Response<Self::FetchRecordingStream>, tonic::Status>;
async fn list_recordings(
&self,
request: tonic::Request<super::ListRecordingsRequest>,
) -> std::result::Result<tonic::Response<super::ListRecordingsResponse>, tonic::Status>;
async fn get_recording_metadata(
&self,
request: tonic::Request<super::GetRecordingMetadataRequest>,
) -> std::result::Result<tonic::Response<super::GetRecordingMetadataResponse>, tonic::Status>;
async fn update_recording_metadata(
&self,
request: tonic::Request<super::UpdateRecordingMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::UpdateRecordingMetadataResponse>,
tonic::Status,
>;
async fn register_recording(
&self,
request: tonic::Request<super::RegisterRecordingRequest>,
) -> std::result::Result<tonic::Response<super::RegisterRecordingResponse>, tonic::Status>;
}
#[derive(Debug)]
pub struct StorageNodeServer<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> StorageNodeServer<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 StorageNodeServer<T>
where
T: StorageNode,
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.remote_store.v0.StorageNode/Query" => {
#[allow(non_camel_case_types)]
struct QuerySvc<T: StorageNode>(pub Arc<T>);
impl<T: StorageNode> tonic::server::ServerStreamingService<super::QueryRequest> for QuerySvc<T> {
type Response = super::QueryResponse;
type ResponseStream = T::QueryStream;
type Future =
BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::QueryRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut =
async move { <T as StorageNode>::query(&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 = QuerySvc(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)
}
"/rerun.remote_store.v0.StorageNode/FetchRecording" => {
#[allow(non_camel_case_types)]
struct FetchRecordingSvc<T: StorageNode>(pub Arc<T>);
impl<T: StorageNode>
tonic::server::ServerStreamingService<super::FetchRecordingRequest>
for FetchRecordingSvc<T>
{
type Response = super::FetchRecordingResponse;
type ResponseStream = T::FetchRecordingStream;
type Future =
BoxFuture<tonic::Response<Self::ResponseStream>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::FetchRecordingRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StorageNode>::fetch_recording(&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 = FetchRecordingSvc(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)
}
"/rerun.remote_store.v0.StorageNode/ListRecordings" => {
#[allow(non_camel_case_types)]
struct ListRecordingsSvc<T: StorageNode>(pub Arc<T>);
impl<T: StorageNode> tonic::server::UnaryService<super::ListRecordingsRequest>
for ListRecordingsSvc<T>
{
type Response = super::ListRecordingsResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::ListRecordingsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StorageNode>::list_recordings(&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 = ListRecordingsSvc(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.remote_store.v0.StorageNode/GetRecordingMetadata" => {
#[allow(non_camel_case_types)]
struct GetRecordingMetadataSvc<T: StorageNode>(pub Arc<T>);
impl<T: StorageNode>
tonic::server::UnaryService<super::GetRecordingMetadataRequest>
for GetRecordingMetadataSvc<T>
{
type Response = super::GetRecordingMetadataResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::GetRecordingMetadataRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StorageNode>::get_recording_metadata(&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 = GetRecordingMetadataSvc(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.remote_store.v0.StorageNode/UpdateRecordingMetadata" => {
#[allow(non_camel_case_types)]
struct UpdateRecordingMetadataSvc<T: StorageNode>(pub Arc<T>);
impl<T: StorageNode>
tonic::server::UnaryService<super::UpdateRecordingMetadataRequest>
for UpdateRecordingMetadataSvc<T>
{
type Response = super::UpdateRecordingMetadataResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::UpdateRecordingMetadataRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StorageNode>::update_recording_metadata(&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 = UpdateRecordingMetadataSvc(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.remote_store.v0.StorageNode/RegisterRecording" => {
#[allow(non_camel_case_types)]
struct RegisterRecordingSvc<T: StorageNode>(pub Arc<T>);
impl<T: StorageNode>
tonic::server::UnaryService<super::RegisterRecordingRequest>
for RegisterRecordingSvc<T>
{
type Response = super::RegisterRecordingResponse;
type Future = BoxFuture<tonic::Response<Self::Response>, tonic::Status>;
fn call(
&mut self,
request: tonic::Request<super::RegisterRecordingRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as StorageNode>::register_recording(&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 = RegisterRecordingSvc(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 StorageNodeServer<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.remote_store.v0.StorageNode";
impl<T> tonic::server::NamedService for StorageNodeServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}