1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct StackTraceRequest {
5 #[prost(enumeration = "stack_trace_request::ActorTracesFormat", tag = "1")]
6 pub actor_traces_format: i32,
7}
8pub mod stack_trace_request {
10 #[derive(prost_helpers::AnyPB)]
11 #[derive(
12 Clone,
13 Copy,
14 Debug,
15 PartialEq,
16 Eq,
17 Hash,
18 PartialOrd,
19 Ord,
20 ::prost::Enumeration
21 )]
22 #[repr(i32)]
23 pub enum ActorTracesFormat {
24 Unspecified = 0,
25 Json = 1,
26 Text = 2,
27 }
28 impl ActorTracesFormat {
29 pub fn as_str_name(&self) -> &'static str {
34 match self {
35 Self::Unspecified => "UNSPECIFIED",
36 Self::Json => "JSON",
37 Self::Text => "TEXT",
38 }
39 }
40 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
42 match value {
43 "UNSPECIFIED" => Some(Self::Unspecified),
44 "JSON" => Some(Self::Json),
45 "TEXT" => Some(Self::Text),
46 _ => None,
47 }
48 }
49 }
50}
51#[derive(prost_helpers::AnyPB)]
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct StackTraceResponse {
54 #[prost(btree_map = "uint32, string", tag = "1")]
55 pub actor_traces: ::prost::alloc::collections::BTreeMap<
56 u32,
57 ::prost::alloc::string::String,
58 >,
59 #[prost(btree_map = "string, string", tag = "2")]
60 pub rpc_traces: ::prost::alloc::collections::BTreeMap<
61 ::prost::alloc::string::String,
62 ::prost::alloc::string::String,
63 >,
64 #[prost(btree_map = "string, string", tag = "3")]
65 pub compaction_task_traces: ::prost::alloc::collections::BTreeMap<
66 ::prost::alloc::string::String,
67 ::prost::alloc::string::String,
68 >,
69 #[prost(btree_map = "uint64, string", tag = "4")]
70 pub inflight_barrier_traces: ::prost::alloc::collections::BTreeMap<
71 u64,
72 ::prost::alloc::string::String,
73 >,
74 #[prost(btree_map = "uint32, string", tag = "5")]
76 pub barrier_worker_state: ::prost::alloc::collections::BTreeMap<
77 u32,
78 ::prost::alloc::string::String,
79 >,
80 #[prost(btree_map = "uint32, string", tag = "6")]
82 pub jvm_stack_traces: ::prost::alloc::collections::BTreeMap<
83 u32,
84 ::prost::alloc::string::String,
85 >,
86 #[prost(btree_map = "string, string", tag = "7")]
87 pub meta_traces: ::prost::alloc::collections::BTreeMap<
88 ::prost::alloc::string::String,
89 ::prost::alloc::string::String,
90 >,
91}
92#[derive(prost_helpers::AnyPB)]
94#[derive(Clone, Copy, PartialEq, ::prost::Message)]
95pub struct ProfilingRequest {
96 #[prost(uint64, tag = "1")]
98 pub sleep_s: u64,
99}
100#[derive(prost_helpers::AnyPB)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct ProfilingResponse {
103 #[prost(bytes = "vec", tag = "1")]
104 pub result: ::prost::alloc::vec::Vec<u8>,
105}
106#[derive(prost_helpers::AnyPB)]
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct HeapProfilingRequest {
110 #[prost(string, tag = "1")]
112 pub dir: ::prost::alloc::string::String,
113}
114#[derive(prost_helpers::AnyPB)]
115#[derive(Clone, Copy, PartialEq, ::prost::Message)]
116pub struct HeapProfilingResponse {}
117#[derive(prost_helpers::AnyPB)]
118#[derive(Clone, Copy, PartialEq, ::prost::Message)]
119pub struct ListHeapProfilingRequest {}
120#[derive(prost_helpers::AnyPB)]
121#[derive(Clone, PartialEq, ::prost::Message)]
122pub struct ListHeapProfilingResponse {
123 #[prost(string, tag = "1")]
124 pub dir: ::prost::alloc::string::String,
125 #[prost(string, repeated, tag = "2")]
126 pub name_manually: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
127 #[prost(string, repeated, tag = "3")]
128 pub name_auto: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
129}
130#[derive(prost_helpers::AnyPB)]
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct AnalyzeHeapRequest {
134 #[prost(string, tag = "1")]
136 pub path: ::prost::alloc::string::String,
137}
138#[derive(prost_helpers::AnyPB)]
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct AnalyzeHeapResponse {
141 #[prost(bytes = "vec", tag = "1")]
142 pub result: ::prost::alloc::vec::Vec<u8>,
143}
144#[derive(prost_helpers::AnyPB)]
146#[derive(Clone, Copy, PartialEq, ::prost::Message)]
147pub struct GetStreamingStatsRequest {}
148#[derive(prost_helpers::AnyPB)]
149#[derive(Clone, Copy, PartialEq, ::prost::Message)]
150pub struct ChannelStats {
151 #[prost(uint32, tag = "1")]
155 pub actor_count: u32,
156 #[prost(double, tag = "2")]
158 pub output_blocking_duration: f64,
159 #[prost(uint64, tag = "3")]
161 pub recv_row_count: u64,
162 #[prost(uint64, tag = "4")]
164 pub send_row_count: u64,
165}
166#[derive(prost_helpers::AnyPB)]
167#[derive(Clone, Copy, PartialEq, ::prost::Message)]
168pub struct ChannelDeltaStats {
169 #[prost(uint32, tag = "1")]
170 pub actor_count: u32,
171 #[prost(double, tag = "2")]
173 pub backpressure_rate: f64,
174 #[prost(double, tag = "3")]
176 pub recv_throughput: f64,
177 #[prost(double, tag = "4")]
179 pub send_throughput: f64,
180}
181#[derive(prost_helpers::AnyPB)]
182#[derive(Clone, Copy, PartialEq, ::prost::Message)]
183pub struct FragmentStats {
184 #[prost(uint32, tag = "2")]
185 pub actor_count: u32,
186 #[prost(uint64, tag = "3")]
187 pub current_epoch: u64,
188}
189#[derive(prost_helpers::AnyPB)]
190#[derive(Clone, Copy, PartialEq, ::prost::Message)]
191pub struct RelationStats {
192 #[prost(uint32, tag = "2")]
193 pub actor_count: u32,
194 #[prost(uint64, tag = "3")]
195 pub current_epoch: u64,
196}
197#[derive(prost_helpers::AnyPB)]
198#[derive(Clone, PartialEq, ::prost::Message)]
199pub struct GetStreamingStatsResponse {
200 #[prost(map = "string, message", tag = "1")]
202 pub channel_stats: ::std::collections::HashMap<
203 ::prost::alloc::string::String,
204 ChannelStats,
205 >,
206 #[prost(map = "uint32, message", tag = "2")]
207 pub fragment_stats: ::std::collections::HashMap<u32, FragmentStats>,
208 #[prost(map = "uint32, message", tag = "3")]
209 pub relation_stats: ::std::collections::HashMap<u32, RelationStats>,
210}
211#[derive(prost_helpers::AnyPB)]
212#[derive(Clone, PartialEq, ::prost::Message)]
213pub struct GetStreamingPrometheusStatsResponse {
214 #[prost(map = "string, message", tag = "1")]
216 pub channel_stats: ::std::collections::HashMap<
217 ::prost::alloc::string::String,
218 ChannelDeltaStats,
219 >,
220 #[prost(map = "uint32, message", tag = "2")]
221 pub fragment_stats: ::std::collections::HashMap<u32, FragmentStats>,
222 #[prost(map = "uint32, message", tag = "3")]
223 pub relation_stats: ::std::collections::HashMap<u32, RelationStats>,
224}
225#[derive(prost_helpers::AnyPB)]
226#[derive(Clone, Copy, PartialEq, ::prost::Message)]
227pub struct TieredCacheTracingRequest {
228 #[prost(bool, tag = "1")]
229 pub enable: bool,
230 #[prost(uint32, optional, tag = "2")]
231 pub record_hybrid_insert_threshold_ms: ::core::option::Option<u32>,
232 #[prost(uint32, optional, tag = "3")]
233 pub record_hybrid_get_threshold_ms: ::core::option::Option<u32>,
234 #[prost(uint32, optional, tag = "4")]
235 pub record_hybrid_obtain_threshold_ms: ::core::option::Option<u32>,
236 #[prost(uint32, optional, tag = "5")]
237 pub record_hybrid_remove_threshold_ms: ::core::option::Option<u32>,
238 #[prost(uint32, optional, tag = "6")]
239 pub record_hybrid_fetch_threshold_ms: ::core::option::Option<u32>,
240}
241#[derive(prost_helpers::AnyPB)]
242#[derive(Clone, Copy, PartialEq, ::prost::Message)]
243pub struct TieredCacheTracingResponse {}
244#[derive(prost_helpers::AnyPB)]
245#[derive(Clone, PartialEq, ::prost::Message)]
246pub struct GetProfileStatsRequest {
247 #[prost(uint64, repeated, tag = "1")]
249 pub executor_ids: ::prost::alloc::vec::Vec<u64>,
250 #[prost(uint32, repeated, tag = "2")]
253 pub dispatcher_fragment_ids: ::prost::alloc::vec::Vec<u32>,
254}
255#[derive(prost_helpers::AnyPB)]
256#[derive(Clone, PartialEq, ::prost::Message)]
257pub struct GetProfileStatsResponse {
258 #[prost(map = "uint64, uint64", tag = "1")]
259 pub stream_node_output_row_count: ::std::collections::HashMap<u64, u64>,
260 #[prost(map = "uint64, uint64", tag = "2")]
261 pub stream_node_output_blocking_duration_ns: ::std::collections::HashMap<u64, u64>,
262 #[prost(map = "uint32, uint64", tag = "3")]
263 pub dispatch_fragment_output_row_count: ::std::collections::HashMap<u32, u64>,
264 #[prost(map = "uint32, uint64", tag = "4")]
265 pub dispatch_fragment_output_blocking_duration_ns: ::std::collections::HashMap<
266 u32,
267 u64,
268 >,
269}
270pub mod monitor_service_client {
272 #![allow(
273 unused_variables,
274 dead_code,
275 missing_docs,
276 clippy::wildcard_imports,
277 clippy::let_unit_value,
278 )]
279 use tonic::codegen::*;
280 use tonic::codegen::http::Uri;
281 #[derive(Debug, Clone)]
282 pub struct MonitorServiceClient<T> {
283 inner: tonic::client::Grpc<T>,
284 }
285 impl MonitorServiceClient<tonic::transport::Channel> {
286 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
288 where
289 D: TryInto<tonic::transport::Endpoint>,
290 D::Error: Into<StdError>,
291 {
292 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
293 Ok(Self::new(conn))
294 }
295 }
296 impl<T> MonitorServiceClient<T>
297 where
298 T: tonic::client::GrpcService<tonic::body::BoxBody>,
299 T::Error: Into<StdError>,
300 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
301 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
302 {
303 pub fn new(inner: T) -> Self {
304 let inner = tonic::client::Grpc::new(inner);
305 Self { inner }
306 }
307 pub fn with_origin(inner: T, origin: Uri) -> Self {
308 let inner = tonic::client::Grpc::with_origin(inner, origin);
309 Self { inner }
310 }
311 pub fn with_interceptor<F>(
312 inner: T,
313 interceptor: F,
314 ) -> MonitorServiceClient<InterceptedService<T, F>>
315 where
316 F: tonic::service::Interceptor,
317 T::ResponseBody: Default,
318 T: tonic::codegen::Service<
319 http::Request<tonic::body::BoxBody>,
320 Response = http::Response<
321 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
322 >,
323 >,
324 <T as tonic::codegen::Service<
325 http::Request<tonic::body::BoxBody>,
326 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
327 {
328 MonitorServiceClient::new(InterceptedService::new(inner, interceptor))
329 }
330 #[must_use]
335 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
336 self.inner = self.inner.send_compressed(encoding);
337 self
338 }
339 #[must_use]
341 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
342 self.inner = self.inner.accept_compressed(encoding);
343 self
344 }
345 #[must_use]
349 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
350 self.inner = self.inner.max_decoding_message_size(limit);
351 self
352 }
353 #[must_use]
357 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
358 self.inner = self.inner.max_encoding_message_size(limit);
359 self
360 }
361 pub async fn stack_trace(
362 &mut self,
363 request: impl tonic::IntoRequest<super::StackTraceRequest>,
364 ) -> std::result::Result<
365 tonic::Response<super::StackTraceResponse>,
366 tonic::Status,
367 > {
368 self.inner
369 .ready()
370 .await
371 .map_err(|e| {
372 tonic::Status::unknown(
373 format!("Service was not ready: {}", e.into()),
374 )
375 })?;
376 let codec = tonic::codec::ProstCodec::default();
377 let path = http::uri::PathAndQuery::from_static(
378 "/monitor_service.MonitorService/StackTrace",
379 );
380 let mut req = request.into_request();
381 req.extensions_mut()
382 .insert(GrpcMethod::new("monitor_service.MonitorService", "StackTrace"));
383 self.inner.unary(req, path, codec).await
384 }
385 pub async fn profiling(
386 &mut self,
387 request: impl tonic::IntoRequest<super::ProfilingRequest>,
388 ) -> std::result::Result<
389 tonic::Response<super::ProfilingResponse>,
390 tonic::Status,
391 > {
392 self.inner
393 .ready()
394 .await
395 .map_err(|e| {
396 tonic::Status::unknown(
397 format!("Service was not ready: {}", e.into()),
398 )
399 })?;
400 let codec = tonic::codec::ProstCodec::default();
401 let path = http::uri::PathAndQuery::from_static(
402 "/monitor_service.MonitorService/Profiling",
403 );
404 let mut req = request.into_request();
405 req.extensions_mut()
406 .insert(GrpcMethod::new("monitor_service.MonitorService", "Profiling"));
407 self.inner.unary(req, path, codec).await
408 }
409 pub async fn heap_profiling(
410 &mut self,
411 request: impl tonic::IntoRequest<super::HeapProfilingRequest>,
412 ) -> std::result::Result<
413 tonic::Response<super::HeapProfilingResponse>,
414 tonic::Status,
415 > {
416 self.inner
417 .ready()
418 .await
419 .map_err(|e| {
420 tonic::Status::unknown(
421 format!("Service was not ready: {}", e.into()),
422 )
423 })?;
424 let codec = tonic::codec::ProstCodec::default();
425 let path = http::uri::PathAndQuery::from_static(
426 "/monitor_service.MonitorService/HeapProfiling",
427 );
428 let mut req = request.into_request();
429 req.extensions_mut()
430 .insert(
431 GrpcMethod::new("monitor_service.MonitorService", "HeapProfiling"),
432 );
433 self.inner.unary(req, path, codec).await
434 }
435 pub async fn list_heap_profiling(
436 &mut self,
437 request: impl tonic::IntoRequest<super::ListHeapProfilingRequest>,
438 ) -> std::result::Result<
439 tonic::Response<super::ListHeapProfilingResponse>,
440 tonic::Status,
441 > {
442 self.inner
443 .ready()
444 .await
445 .map_err(|e| {
446 tonic::Status::unknown(
447 format!("Service was not ready: {}", e.into()),
448 )
449 })?;
450 let codec = tonic::codec::ProstCodec::default();
451 let path = http::uri::PathAndQuery::from_static(
452 "/monitor_service.MonitorService/ListHeapProfiling",
453 );
454 let mut req = request.into_request();
455 req.extensions_mut()
456 .insert(
457 GrpcMethod::new(
458 "monitor_service.MonitorService",
459 "ListHeapProfiling",
460 ),
461 );
462 self.inner.unary(req, path, codec).await
463 }
464 pub async fn analyze_heap(
465 &mut self,
466 request: impl tonic::IntoRequest<super::AnalyzeHeapRequest>,
467 ) -> std::result::Result<
468 tonic::Response<super::AnalyzeHeapResponse>,
469 tonic::Status,
470 > {
471 self.inner
472 .ready()
473 .await
474 .map_err(|e| {
475 tonic::Status::unknown(
476 format!("Service was not ready: {}", e.into()),
477 )
478 })?;
479 let codec = tonic::codec::ProstCodec::default();
480 let path = http::uri::PathAndQuery::from_static(
481 "/monitor_service.MonitorService/AnalyzeHeap",
482 );
483 let mut req = request.into_request();
484 req.extensions_mut()
485 .insert(
486 GrpcMethod::new("monitor_service.MonitorService", "AnalyzeHeap"),
487 );
488 self.inner.unary(req, path, codec).await
489 }
490 pub async fn get_streaming_stats(
491 &mut self,
492 request: impl tonic::IntoRequest<super::GetStreamingStatsRequest>,
493 ) -> std::result::Result<
494 tonic::Response<super::GetStreamingStatsResponse>,
495 tonic::Status,
496 > {
497 self.inner
498 .ready()
499 .await
500 .map_err(|e| {
501 tonic::Status::unknown(
502 format!("Service was not ready: {}", e.into()),
503 )
504 })?;
505 let codec = tonic::codec::ProstCodec::default();
506 let path = http::uri::PathAndQuery::from_static(
507 "/monitor_service.MonitorService/GetStreamingStats",
508 );
509 let mut req = request.into_request();
510 req.extensions_mut()
511 .insert(
512 GrpcMethod::new(
513 "monitor_service.MonitorService",
514 "GetStreamingStats",
515 ),
516 );
517 self.inner.unary(req, path, codec).await
518 }
519 pub async fn tiered_cache_tracing(
520 &mut self,
521 request: impl tonic::IntoRequest<super::TieredCacheTracingRequest>,
522 ) -> std::result::Result<
523 tonic::Response<super::TieredCacheTracingResponse>,
524 tonic::Status,
525 > {
526 self.inner
527 .ready()
528 .await
529 .map_err(|e| {
530 tonic::Status::unknown(
531 format!("Service was not ready: {}", e.into()),
532 )
533 })?;
534 let codec = tonic::codec::ProstCodec::default();
535 let path = http::uri::PathAndQuery::from_static(
536 "/monitor_service.MonitorService/TieredCacheTracing",
537 );
538 let mut req = request.into_request();
539 req.extensions_mut()
540 .insert(
541 GrpcMethod::new(
542 "monitor_service.MonitorService",
543 "TieredCacheTracing",
544 ),
545 );
546 self.inner.unary(req, path, codec).await
547 }
548 pub async fn get_profile_stats(
549 &mut self,
550 request: impl tonic::IntoRequest<super::GetProfileStatsRequest>,
551 ) -> std::result::Result<
552 tonic::Response<super::GetProfileStatsResponse>,
553 tonic::Status,
554 > {
555 self.inner
556 .ready()
557 .await
558 .map_err(|e| {
559 tonic::Status::unknown(
560 format!("Service was not ready: {}", e.into()),
561 )
562 })?;
563 let codec = tonic::codec::ProstCodec::default();
564 let path = http::uri::PathAndQuery::from_static(
565 "/monitor_service.MonitorService/GetProfileStats",
566 );
567 let mut req = request.into_request();
568 req.extensions_mut()
569 .insert(
570 GrpcMethod::new("monitor_service.MonitorService", "GetProfileStats"),
571 );
572 self.inner.unary(req, path, codec).await
573 }
574 }
575}
576pub mod monitor_service_server {
578 #![allow(
579 unused_variables,
580 dead_code,
581 missing_docs,
582 clippy::wildcard_imports,
583 clippy::let_unit_value,
584 )]
585 use tonic::codegen::*;
586 #[async_trait]
588 pub trait MonitorService: std::marker::Send + std::marker::Sync + 'static {
589 async fn stack_trace(
590 &self,
591 request: tonic::Request<super::StackTraceRequest>,
592 ) -> std::result::Result<
593 tonic::Response<super::StackTraceResponse>,
594 tonic::Status,
595 >;
596 async fn profiling(
597 &self,
598 request: tonic::Request<super::ProfilingRequest>,
599 ) -> std::result::Result<
600 tonic::Response<super::ProfilingResponse>,
601 tonic::Status,
602 >;
603 async fn heap_profiling(
604 &self,
605 request: tonic::Request<super::HeapProfilingRequest>,
606 ) -> std::result::Result<
607 tonic::Response<super::HeapProfilingResponse>,
608 tonic::Status,
609 >;
610 async fn list_heap_profiling(
611 &self,
612 request: tonic::Request<super::ListHeapProfilingRequest>,
613 ) -> std::result::Result<
614 tonic::Response<super::ListHeapProfilingResponse>,
615 tonic::Status,
616 >;
617 async fn analyze_heap(
618 &self,
619 request: tonic::Request<super::AnalyzeHeapRequest>,
620 ) -> std::result::Result<
621 tonic::Response<super::AnalyzeHeapResponse>,
622 tonic::Status,
623 >;
624 async fn get_streaming_stats(
625 &self,
626 request: tonic::Request<super::GetStreamingStatsRequest>,
627 ) -> std::result::Result<
628 tonic::Response<super::GetStreamingStatsResponse>,
629 tonic::Status,
630 >;
631 async fn tiered_cache_tracing(
632 &self,
633 request: tonic::Request<super::TieredCacheTracingRequest>,
634 ) -> std::result::Result<
635 tonic::Response<super::TieredCacheTracingResponse>,
636 tonic::Status,
637 >;
638 async fn get_profile_stats(
639 &self,
640 request: tonic::Request<super::GetProfileStatsRequest>,
641 ) -> std::result::Result<
642 tonic::Response<super::GetProfileStatsResponse>,
643 tonic::Status,
644 >;
645 }
646 #[derive(Debug)]
647 pub struct MonitorServiceServer<T> {
648 inner: Arc<T>,
649 accept_compression_encodings: EnabledCompressionEncodings,
650 send_compression_encodings: EnabledCompressionEncodings,
651 max_decoding_message_size: Option<usize>,
652 max_encoding_message_size: Option<usize>,
653 }
654 impl<T> MonitorServiceServer<T> {
655 pub fn new(inner: T) -> Self {
656 Self::from_arc(Arc::new(inner))
657 }
658 pub fn from_arc(inner: Arc<T>) -> Self {
659 Self {
660 inner,
661 accept_compression_encodings: Default::default(),
662 send_compression_encodings: Default::default(),
663 max_decoding_message_size: None,
664 max_encoding_message_size: None,
665 }
666 }
667 pub fn with_interceptor<F>(
668 inner: T,
669 interceptor: F,
670 ) -> InterceptedService<Self, F>
671 where
672 F: tonic::service::Interceptor,
673 {
674 InterceptedService::new(Self::new(inner), interceptor)
675 }
676 #[must_use]
678 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
679 self.accept_compression_encodings.enable(encoding);
680 self
681 }
682 #[must_use]
684 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
685 self.send_compression_encodings.enable(encoding);
686 self
687 }
688 #[must_use]
692 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
693 self.max_decoding_message_size = Some(limit);
694 self
695 }
696 #[must_use]
700 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
701 self.max_encoding_message_size = Some(limit);
702 self
703 }
704 }
705 impl<T, B> tonic::codegen::Service<http::Request<B>> for MonitorServiceServer<T>
706 where
707 T: MonitorService,
708 B: Body + std::marker::Send + 'static,
709 B::Error: Into<StdError> + std::marker::Send + 'static,
710 {
711 type Response = http::Response<tonic::body::BoxBody>;
712 type Error = std::convert::Infallible;
713 type Future = BoxFuture<Self::Response, Self::Error>;
714 fn poll_ready(
715 &mut self,
716 _cx: &mut Context<'_>,
717 ) -> Poll<std::result::Result<(), Self::Error>> {
718 Poll::Ready(Ok(()))
719 }
720 fn call(&mut self, req: http::Request<B>) -> Self::Future {
721 match req.uri().path() {
722 "/monitor_service.MonitorService/StackTrace" => {
723 #[allow(non_camel_case_types)]
724 struct StackTraceSvc<T: MonitorService>(pub Arc<T>);
725 impl<
726 T: MonitorService,
727 > tonic::server::UnaryService<super::StackTraceRequest>
728 for StackTraceSvc<T> {
729 type Response = super::StackTraceResponse;
730 type Future = BoxFuture<
731 tonic::Response<Self::Response>,
732 tonic::Status,
733 >;
734 fn call(
735 &mut self,
736 request: tonic::Request<super::StackTraceRequest>,
737 ) -> Self::Future {
738 let inner = Arc::clone(&self.0);
739 let fut = async move {
740 <T as MonitorService>::stack_trace(&inner, request).await
741 };
742 Box::pin(fut)
743 }
744 }
745 let accept_compression_encodings = self.accept_compression_encodings;
746 let send_compression_encodings = self.send_compression_encodings;
747 let max_decoding_message_size = self.max_decoding_message_size;
748 let max_encoding_message_size = self.max_encoding_message_size;
749 let inner = self.inner.clone();
750 let fut = async move {
751 let method = StackTraceSvc(inner);
752 let codec = tonic::codec::ProstCodec::default();
753 let mut grpc = tonic::server::Grpc::new(codec)
754 .apply_compression_config(
755 accept_compression_encodings,
756 send_compression_encodings,
757 )
758 .apply_max_message_size_config(
759 max_decoding_message_size,
760 max_encoding_message_size,
761 );
762 let res = grpc.unary(method, req).await;
763 Ok(res)
764 };
765 Box::pin(fut)
766 }
767 "/monitor_service.MonitorService/Profiling" => {
768 #[allow(non_camel_case_types)]
769 struct ProfilingSvc<T: MonitorService>(pub Arc<T>);
770 impl<
771 T: MonitorService,
772 > tonic::server::UnaryService<super::ProfilingRequest>
773 for ProfilingSvc<T> {
774 type Response = super::ProfilingResponse;
775 type Future = BoxFuture<
776 tonic::Response<Self::Response>,
777 tonic::Status,
778 >;
779 fn call(
780 &mut self,
781 request: tonic::Request<super::ProfilingRequest>,
782 ) -> Self::Future {
783 let inner = Arc::clone(&self.0);
784 let fut = async move {
785 <T as MonitorService>::profiling(&inner, request).await
786 };
787 Box::pin(fut)
788 }
789 }
790 let accept_compression_encodings = self.accept_compression_encodings;
791 let send_compression_encodings = self.send_compression_encodings;
792 let max_decoding_message_size = self.max_decoding_message_size;
793 let max_encoding_message_size = self.max_encoding_message_size;
794 let inner = self.inner.clone();
795 let fut = async move {
796 let method = ProfilingSvc(inner);
797 let codec = tonic::codec::ProstCodec::default();
798 let mut grpc = tonic::server::Grpc::new(codec)
799 .apply_compression_config(
800 accept_compression_encodings,
801 send_compression_encodings,
802 )
803 .apply_max_message_size_config(
804 max_decoding_message_size,
805 max_encoding_message_size,
806 );
807 let res = grpc.unary(method, req).await;
808 Ok(res)
809 };
810 Box::pin(fut)
811 }
812 "/monitor_service.MonitorService/HeapProfiling" => {
813 #[allow(non_camel_case_types)]
814 struct HeapProfilingSvc<T: MonitorService>(pub Arc<T>);
815 impl<
816 T: MonitorService,
817 > tonic::server::UnaryService<super::HeapProfilingRequest>
818 for HeapProfilingSvc<T> {
819 type Response = super::HeapProfilingResponse;
820 type Future = BoxFuture<
821 tonic::Response<Self::Response>,
822 tonic::Status,
823 >;
824 fn call(
825 &mut self,
826 request: tonic::Request<super::HeapProfilingRequest>,
827 ) -> Self::Future {
828 let inner = Arc::clone(&self.0);
829 let fut = async move {
830 <T as MonitorService>::heap_profiling(&inner, request).await
831 };
832 Box::pin(fut)
833 }
834 }
835 let accept_compression_encodings = self.accept_compression_encodings;
836 let send_compression_encodings = self.send_compression_encodings;
837 let max_decoding_message_size = self.max_decoding_message_size;
838 let max_encoding_message_size = self.max_encoding_message_size;
839 let inner = self.inner.clone();
840 let fut = async move {
841 let method = HeapProfilingSvc(inner);
842 let codec = tonic::codec::ProstCodec::default();
843 let mut grpc = tonic::server::Grpc::new(codec)
844 .apply_compression_config(
845 accept_compression_encodings,
846 send_compression_encodings,
847 )
848 .apply_max_message_size_config(
849 max_decoding_message_size,
850 max_encoding_message_size,
851 );
852 let res = grpc.unary(method, req).await;
853 Ok(res)
854 };
855 Box::pin(fut)
856 }
857 "/monitor_service.MonitorService/ListHeapProfiling" => {
858 #[allow(non_camel_case_types)]
859 struct ListHeapProfilingSvc<T: MonitorService>(pub Arc<T>);
860 impl<
861 T: MonitorService,
862 > tonic::server::UnaryService<super::ListHeapProfilingRequest>
863 for ListHeapProfilingSvc<T> {
864 type Response = super::ListHeapProfilingResponse;
865 type Future = BoxFuture<
866 tonic::Response<Self::Response>,
867 tonic::Status,
868 >;
869 fn call(
870 &mut self,
871 request: tonic::Request<super::ListHeapProfilingRequest>,
872 ) -> Self::Future {
873 let inner = Arc::clone(&self.0);
874 let fut = async move {
875 <T as MonitorService>::list_heap_profiling(&inner, request)
876 .await
877 };
878 Box::pin(fut)
879 }
880 }
881 let accept_compression_encodings = self.accept_compression_encodings;
882 let send_compression_encodings = self.send_compression_encodings;
883 let max_decoding_message_size = self.max_decoding_message_size;
884 let max_encoding_message_size = self.max_encoding_message_size;
885 let inner = self.inner.clone();
886 let fut = async move {
887 let method = ListHeapProfilingSvc(inner);
888 let codec = tonic::codec::ProstCodec::default();
889 let mut grpc = tonic::server::Grpc::new(codec)
890 .apply_compression_config(
891 accept_compression_encodings,
892 send_compression_encodings,
893 )
894 .apply_max_message_size_config(
895 max_decoding_message_size,
896 max_encoding_message_size,
897 );
898 let res = grpc.unary(method, req).await;
899 Ok(res)
900 };
901 Box::pin(fut)
902 }
903 "/monitor_service.MonitorService/AnalyzeHeap" => {
904 #[allow(non_camel_case_types)]
905 struct AnalyzeHeapSvc<T: MonitorService>(pub Arc<T>);
906 impl<
907 T: MonitorService,
908 > tonic::server::UnaryService<super::AnalyzeHeapRequest>
909 for AnalyzeHeapSvc<T> {
910 type Response = super::AnalyzeHeapResponse;
911 type Future = BoxFuture<
912 tonic::Response<Self::Response>,
913 tonic::Status,
914 >;
915 fn call(
916 &mut self,
917 request: tonic::Request<super::AnalyzeHeapRequest>,
918 ) -> Self::Future {
919 let inner = Arc::clone(&self.0);
920 let fut = async move {
921 <T as MonitorService>::analyze_heap(&inner, request).await
922 };
923 Box::pin(fut)
924 }
925 }
926 let accept_compression_encodings = self.accept_compression_encodings;
927 let send_compression_encodings = self.send_compression_encodings;
928 let max_decoding_message_size = self.max_decoding_message_size;
929 let max_encoding_message_size = self.max_encoding_message_size;
930 let inner = self.inner.clone();
931 let fut = async move {
932 let method = AnalyzeHeapSvc(inner);
933 let codec = tonic::codec::ProstCodec::default();
934 let mut grpc = tonic::server::Grpc::new(codec)
935 .apply_compression_config(
936 accept_compression_encodings,
937 send_compression_encodings,
938 )
939 .apply_max_message_size_config(
940 max_decoding_message_size,
941 max_encoding_message_size,
942 );
943 let res = grpc.unary(method, req).await;
944 Ok(res)
945 };
946 Box::pin(fut)
947 }
948 "/monitor_service.MonitorService/GetStreamingStats" => {
949 #[allow(non_camel_case_types)]
950 struct GetStreamingStatsSvc<T: MonitorService>(pub Arc<T>);
951 impl<
952 T: MonitorService,
953 > tonic::server::UnaryService<super::GetStreamingStatsRequest>
954 for GetStreamingStatsSvc<T> {
955 type Response = super::GetStreamingStatsResponse;
956 type Future = BoxFuture<
957 tonic::Response<Self::Response>,
958 tonic::Status,
959 >;
960 fn call(
961 &mut self,
962 request: tonic::Request<super::GetStreamingStatsRequest>,
963 ) -> Self::Future {
964 let inner = Arc::clone(&self.0);
965 let fut = async move {
966 <T as MonitorService>::get_streaming_stats(&inner, request)
967 .await
968 };
969 Box::pin(fut)
970 }
971 }
972 let accept_compression_encodings = self.accept_compression_encodings;
973 let send_compression_encodings = self.send_compression_encodings;
974 let max_decoding_message_size = self.max_decoding_message_size;
975 let max_encoding_message_size = self.max_encoding_message_size;
976 let inner = self.inner.clone();
977 let fut = async move {
978 let method = GetStreamingStatsSvc(inner);
979 let codec = tonic::codec::ProstCodec::default();
980 let mut grpc = tonic::server::Grpc::new(codec)
981 .apply_compression_config(
982 accept_compression_encodings,
983 send_compression_encodings,
984 )
985 .apply_max_message_size_config(
986 max_decoding_message_size,
987 max_encoding_message_size,
988 );
989 let res = grpc.unary(method, req).await;
990 Ok(res)
991 };
992 Box::pin(fut)
993 }
994 "/monitor_service.MonitorService/TieredCacheTracing" => {
995 #[allow(non_camel_case_types)]
996 struct TieredCacheTracingSvc<T: MonitorService>(pub Arc<T>);
997 impl<
998 T: MonitorService,
999 > tonic::server::UnaryService<super::TieredCacheTracingRequest>
1000 for TieredCacheTracingSvc<T> {
1001 type Response = super::TieredCacheTracingResponse;
1002 type Future = BoxFuture<
1003 tonic::Response<Self::Response>,
1004 tonic::Status,
1005 >;
1006 fn call(
1007 &mut self,
1008 request: tonic::Request<super::TieredCacheTracingRequest>,
1009 ) -> Self::Future {
1010 let inner = Arc::clone(&self.0);
1011 let fut = async move {
1012 <T as MonitorService>::tiered_cache_tracing(&inner, request)
1013 .await
1014 };
1015 Box::pin(fut)
1016 }
1017 }
1018 let accept_compression_encodings = self.accept_compression_encodings;
1019 let send_compression_encodings = self.send_compression_encodings;
1020 let max_decoding_message_size = self.max_decoding_message_size;
1021 let max_encoding_message_size = self.max_encoding_message_size;
1022 let inner = self.inner.clone();
1023 let fut = async move {
1024 let method = TieredCacheTracingSvc(inner);
1025 let codec = tonic::codec::ProstCodec::default();
1026 let mut grpc = tonic::server::Grpc::new(codec)
1027 .apply_compression_config(
1028 accept_compression_encodings,
1029 send_compression_encodings,
1030 )
1031 .apply_max_message_size_config(
1032 max_decoding_message_size,
1033 max_encoding_message_size,
1034 );
1035 let res = grpc.unary(method, req).await;
1036 Ok(res)
1037 };
1038 Box::pin(fut)
1039 }
1040 "/monitor_service.MonitorService/GetProfileStats" => {
1041 #[allow(non_camel_case_types)]
1042 struct GetProfileStatsSvc<T: MonitorService>(pub Arc<T>);
1043 impl<
1044 T: MonitorService,
1045 > tonic::server::UnaryService<super::GetProfileStatsRequest>
1046 for GetProfileStatsSvc<T> {
1047 type Response = super::GetProfileStatsResponse;
1048 type Future = BoxFuture<
1049 tonic::Response<Self::Response>,
1050 tonic::Status,
1051 >;
1052 fn call(
1053 &mut self,
1054 request: tonic::Request<super::GetProfileStatsRequest>,
1055 ) -> Self::Future {
1056 let inner = Arc::clone(&self.0);
1057 let fut = async move {
1058 <T as MonitorService>::get_profile_stats(&inner, request)
1059 .await
1060 };
1061 Box::pin(fut)
1062 }
1063 }
1064 let accept_compression_encodings = self.accept_compression_encodings;
1065 let send_compression_encodings = self.send_compression_encodings;
1066 let max_decoding_message_size = self.max_decoding_message_size;
1067 let max_encoding_message_size = self.max_encoding_message_size;
1068 let inner = self.inner.clone();
1069 let fut = async move {
1070 let method = GetProfileStatsSvc(inner);
1071 let codec = tonic::codec::ProstCodec::default();
1072 let mut grpc = tonic::server::Grpc::new(codec)
1073 .apply_compression_config(
1074 accept_compression_encodings,
1075 send_compression_encodings,
1076 )
1077 .apply_max_message_size_config(
1078 max_decoding_message_size,
1079 max_encoding_message_size,
1080 );
1081 let res = grpc.unary(method, req).await;
1082 Ok(res)
1083 };
1084 Box::pin(fut)
1085 }
1086 _ => {
1087 Box::pin(async move {
1088 let mut response = http::Response::new(empty_body());
1089 let headers = response.headers_mut();
1090 headers
1091 .insert(
1092 tonic::Status::GRPC_STATUS,
1093 (tonic::Code::Unimplemented as i32).into(),
1094 );
1095 headers
1096 .insert(
1097 http::header::CONTENT_TYPE,
1098 tonic::metadata::GRPC_CONTENT_TYPE,
1099 );
1100 Ok(response)
1101 })
1102 }
1103 }
1104 }
1105 }
1106 impl<T> Clone for MonitorServiceServer<T> {
1107 fn clone(&self) -> Self {
1108 let inner = self.inner.clone();
1109 Self {
1110 inner,
1111 accept_compression_encodings: self.accept_compression_encodings,
1112 send_compression_encodings: self.send_compression_encodings,
1113 max_decoding_message_size: self.max_decoding_message_size,
1114 max_encoding_message_size: self.max_encoding_message_size,
1115 }
1116 }
1117 }
1118 pub const SERVICE_NAME: &str = "monitor_service.MonitorService";
1120 impl<T> tonic::server::NamedService for MonitorServiceServer<T> {
1121 const NAME: &'static str = SERVICE_NAME;
1122 }
1123}