chore(rpc): regenerate after removing metrics endpoints
This commit is contained in:
parent
4fb58de1a0
commit
6b3b77384e
@ -305,58 +305,6 @@ pub mod session_admin_client {
|
||||
.insert(GrpcMethod::new("admin.SessionAdmin", "IsUserOnline"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn get_metrics(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<
|
||||
crate::admin::generated::admin::GetMetricsRequest,
|
||||
>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<crate::admin::generated::admin::GetMetricsResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/admin.SessionAdmin/GetMetrics",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(GrpcMethod::new("admin.SessionAdmin", "GetMetrics"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn export_metrics_csv(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<
|
||||
crate::admin::generated::admin::ExportMetricsCsvRequest,
|
||||
>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<crate::admin::generated::admin::ExportMetricsCsvResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/admin.SessionAdmin/ExportMetricsCsv",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(GrpcMethod::new("admin.SessionAdmin", "ExportMetricsCsv"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Generated server implementations.
|
||||
@ -442,22 +390,6 @@ pub mod session_admin_server {
|
||||
tonic::Response<crate::admin::generated::admin::IsUserOnlineResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
async fn get_metrics(
|
||||
&self,
|
||||
request: tonic::Request<crate::admin::generated::admin::GetMetricsRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<crate::admin::generated::admin::GetMetricsResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
async fn export_metrics_csv(
|
||||
&self,
|
||||
request: tonic::Request<
|
||||
crate::admin::generated::admin::ExportMetricsCsvRequest,
|
||||
>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<crate::admin::generated::admin::ExportMetricsCsvResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
}
|
||||
#[derive(Debug)]
|
||||
pub struct SessionAdminServer<T> {
|
||||
@ -932,103 +864,6 @@ pub mod session_admin_server {
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/admin.SessionAdmin/GetMetrics" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct GetMetricsSvc<T: SessionAdmin>(pub Arc<T>);
|
||||
impl<
|
||||
T: SessionAdmin,
|
||||
> tonic::server::UnaryService<
|
||||
crate::admin::generated::admin::GetMetricsRequest,
|
||||
> for GetMetricsSvc<T> {
|
||||
type Response = crate::admin::generated::admin::GetMetricsResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<
|
||||
crate::admin::generated::admin::GetMetricsRequest,
|
||||
>,
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as SessionAdmin>::get_metrics(&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 = GetMetricsSvc(inner);
|
||||
let codec = tonic_prost::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)
|
||||
}
|
||||
"/admin.SessionAdmin/ExportMetricsCsv" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct ExportMetricsCsvSvc<T: SessionAdmin>(pub Arc<T>);
|
||||
impl<
|
||||
T: SessionAdmin,
|
||||
> tonic::server::UnaryService<
|
||||
crate::admin::generated::admin::ExportMetricsCsvRequest,
|
||||
> for ExportMetricsCsvSvc<T> {
|
||||
type Response = crate::admin::generated::admin::ExportMetricsCsvResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<
|
||||
crate::admin::generated::admin::ExportMetricsCsvRequest,
|
||||
>,
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as SessionAdmin>::export_metrics_csv(&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 = ExportMetricsCsvSvc(inner);
|
||||
let codec = tonic_prost::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(
|
||||
|
||||
@ -109,49 +109,6 @@ pub struct IsUserOnlineResponse {
|
||||
#[prost(bool, tag = "1")]
|
||||
pub online: bool,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct GetMetricsRequest {
|
||||
/// filter by instance_id substring
|
||||
#[prost(string, tag = "1")]
|
||||
pub instance_filter: ::prost::alloc::string::String,
|
||||
/// max snapshots per instance (default 100)
|
||||
#[prost(uint32, tag = "2")]
|
||||
pub limit: u32,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct GetMetricsResponse {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub instances: ::prost::alloc::vec::Vec<InstanceMetrics>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct InstanceMetrics {
|
||||
#[prost(string, tag = "1")]
|
||||
pub instance_id: ::prost::alloc::string::String,
|
||||
#[prost(int64, tag = "2")]
|
||||
pub timestamp_secs: i64,
|
||||
/// HTTP metrics, key = metric name, value = JSON value
|
||||
#[prost(map = "string, string", tag = "3")]
|
||||
pub http: ::std::collections::HashMap<
|
||||
::prost::alloc::string::String,
|
||||
::prost::alloc::string::String,
|
||||
>,
|
||||
/// Room/room metrics
|
||||
#[prost(map = "string, string", tag = "4")]
|
||||
pub room: ::std::collections::HashMap<
|
||||
::prost::alloc::string::String,
|
||||
::prost::alloc::string::String,
|
||||
>,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct ExportMetricsCsvRequest {
|
||||
#[prost(string, tag = "1")]
|
||||
pub instance_filter: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct ExportMetricsCsvResponse {
|
||||
#[prost(string, tag = "1")]
|
||||
pub csv: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct SyncModelsRequest {}
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
@ -576,54 +533,6 @@ pub mod session_admin_client {
|
||||
.insert(GrpcMethod::new("admin.SessionAdmin", "IsUserOnline"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn get_metrics(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::GetMetricsRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::GetMetricsResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/admin.SessionAdmin/GetMetrics",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(GrpcMethod::new("admin.SessionAdmin", "GetMetrics"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
pub async fn export_metrics_csv(
|
||||
&mut self,
|
||||
request: impl tonic::IntoRequest<super::ExportMetricsCsvRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::ExportMetricsCsvResponse>,
|
||||
tonic::Status,
|
||||
> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::unknown(
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic_prost::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/admin.SessionAdmin/ExportMetricsCsv",
|
||||
);
|
||||
let mut req = request.into_request();
|
||||
req.extensions_mut()
|
||||
.insert(GrpcMethod::new("admin.SessionAdmin", "ExportMetricsCsv"));
|
||||
self.inner.unary(req, path, codec).await
|
||||
}
|
||||
/// AI
|
||||
pub async fn sync_models(
|
||||
&mut self,
|
||||
@ -973,20 +882,6 @@ pub mod session_admin_server {
|
||||
tonic::Response<super::IsUserOnlineResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
async fn get_metrics(
|
||||
&self,
|
||||
request: tonic::Request<super::GetMetricsRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::GetMetricsResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
async fn export_metrics_csv(
|
||||
&self,
|
||||
request: tonic::Request<super::ExportMetricsCsvRequest>,
|
||||
) -> std::result::Result<
|
||||
tonic::Response<super::ExportMetricsCsvResponse>,
|
||||
tonic::Status,
|
||||
>;
|
||||
/// AI
|
||||
async fn sync_models(
|
||||
&self,
|
||||
@ -1504,97 +1399,6 @@ pub mod session_admin_server {
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/admin.SessionAdmin/GetMetrics" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct GetMetricsSvc<T: SessionAdmin>(pub Arc<T>);
|
||||
impl<
|
||||
T: SessionAdmin,
|
||||
> tonic::server::UnaryService<super::GetMetricsRequest>
|
||||
for GetMetricsSvc<T> {
|
||||
type Response = super::GetMetricsResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<super::GetMetricsRequest>,
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as SessionAdmin>::get_metrics(&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 = GetMetricsSvc(inner);
|
||||
let codec = tonic_prost::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)
|
||||
}
|
||||
"/admin.SessionAdmin/ExportMetricsCsv" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct ExportMetricsCsvSvc<T: SessionAdmin>(pub Arc<T>);
|
||||
impl<
|
||||
T: SessionAdmin,
|
||||
> tonic::server::UnaryService<super::ExportMetricsCsvRequest>
|
||||
for ExportMetricsCsvSvc<T> {
|
||||
type Response = super::ExportMetricsCsvResponse;
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<super::ExportMetricsCsvRequest>,
|
||||
) -> Self::Future {
|
||||
let inner = Arc::clone(&self.0);
|
||||
let fut = async move {
|
||||
<T as SessionAdmin>::export_metrics_csv(&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 = ExportMetricsCsvSvc(inner);
|
||||
let codec = tonic_prost::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)
|
||||
}
|
||||
"/admin.SessionAdmin/SyncModels" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct SyncModelsSvc<T: SessionAdmin>(pub Arc<T>);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user