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", wrapper = "crate::id::WorkerId")]
76 pub barrier_worker_state: ::prost::alloc::collections::BTreeMap<
77 crate::id::WorkerId,
78 ::prost::alloc::string::String,
79 >,
80 #[prost(btree_map = "uint32, string", tag = "6", wrapper = "crate::id::WorkerId")]
82 pub jvm_stack_traces: ::prost::alloc::collections::BTreeMap<
83 crate::id::WorkerId,
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", wrapper = "crate::id::FragmentId")]
253 pub dispatcher_fragment_ids: ::prost::alloc::vec::Vec<crate::id::FragmentId>,
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", wrapper = "crate::id::FragmentId")]
263 pub dispatch_fragment_output_row_count: ::std::collections::HashMap<
264 crate::id::FragmentId,
265 u64,
266 >,
267 #[prost(map = "uint32, uint64", tag = "4", wrapper = "crate::id::FragmentId")]
268 pub dispatch_fragment_output_blocking_duration_ns: ::std::collections::HashMap<
269 crate::id::FragmentId,
270 u64,
271 >,
272}
273pub mod monitor_service_client {
275 #![allow(
276 unused_variables,
277 dead_code,
278 missing_docs,
279 clippy::wildcard_imports,
280 clippy::let_unit_value,
281 )]
282 use tonic::codegen::*;
283 use tonic::codegen::http::Uri;
284 #[derive(Debug, Clone)]
285 pub struct MonitorServiceClient<T> {
286 inner: tonic::client::Grpc<T>,
287 }
288 impl MonitorServiceClient<tonic::transport::Channel> {
289 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
291 where
292 D: TryInto<tonic::transport::Endpoint>,
293 D::Error: Into<StdError>,
294 {
295 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
296 Ok(Self::new(conn))
297 }
298 }
299 impl<T> MonitorServiceClient<T>
300 where
301 T: tonic::client::GrpcService<tonic::body::BoxBody>,
302 T::Error: Into<StdError>,
303 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
304 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
305 {
306 pub fn new(inner: T) -> Self {
307 let inner = tonic::client::Grpc::new(inner);
308 Self { inner }
309 }
310 pub fn with_origin(inner: T, origin: Uri) -> Self {
311 let inner = tonic::client::Grpc::with_origin(inner, origin);
312 Self { inner }
313 }
314 pub fn with_interceptor<F>(
315 inner: T,
316 interceptor: F,
317 ) -> MonitorServiceClient<InterceptedService<T, F>>
318 where
319 F: tonic::service::Interceptor,
320 T::ResponseBody: Default,
321 T: tonic::codegen::Service<
322 http::Request<tonic::body::BoxBody>,
323 Response = http::Response<
324 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
325 >,
326 >,
327 <T as tonic::codegen::Service<
328 http::Request<tonic::body::BoxBody>,
329 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
330 {
331 MonitorServiceClient::new(InterceptedService::new(inner, interceptor))
332 }
333 #[must_use]
338 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
339 self.inner = self.inner.send_compressed(encoding);
340 self
341 }
342 #[must_use]
344 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
345 self.inner = self.inner.accept_compressed(encoding);
346 self
347 }
348 #[must_use]
352 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
353 self.inner = self.inner.max_decoding_message_size(limit);
354 self
355 }
356 #[must_use]
360 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
361 self.inner = self.inner.max_encoding_message_size(limit);
362 self
363 }
364 pub async fn stack_trace(
365 &mut self,
366 request: impl tonic::IntoRequest<super::StackTraceRequest>,
367 ) -> std::result::Result<
368 tonic::Response<super::StackTraceResponse>,
369 tonic::Status,
370 > {
371 self.inner
372 .ready()
373 .await
374 .map_err(|e| {
375 tonic::Status::unknown(
376 format!("Service was not ready: {}", e.into()),
377 )
378 })?;
379 let codec = tonic::codec::ProstCodec::default();
380 let path = http::uri::PathAndQuery::from_static(
381 "/monitor_service.MonitorService/StackTrace",
382 );
383 let mut req = request.into_request();
384 req.extensions_mut()
385 .insert(GrpcMethod::new("monitor_service.MonitorService", "StackTrace"));
386 self.inner.unary(req, path, codec).await
387 }
388 pub async fn profiling(
389 &mut self,
390 request: impl tonic::IntoRequest<super::ProfilingRequest>,
391 ) -> std::result::Result<
392 tonic::Response<super::ProfilingResponse>,
393 tonic::Status,
394 > {
395 self.inner
396 .ready()
397 .await
398 .map_err(|e| {
399 tonic::Status::unknown(
400 format!("Service was not ready: {}", e.into()),
401 )
402 })?;
403 let codec = tonic::codec::ProstCodec::default();
404 let path = http::uri::PathAndQuery::from_static(
405 "/monitor_service.MonitorService/Profiling",
406 );
407 let mut req = request.into_request();
408 req.extensions_mut()
409 .insert(GrpcMethod::new("monitor_service.MonitorService", "Profiling"));
410 self.inner.unary(req, path, codec).await
411 }
412 pub async fn heap_profiling(
413 &mut self,
414 request: impl tonic::IntoRequest<super::HeapProfilingRequest>,
415 ) -> std::result::Result<
416 tonic::Response<super::HeapProfilingResponse>,
417 tonic::Status,
418 > {
419 self.inner
420 .ready()
421 .await
422 .map_err(|e| {
423 tonic::Status::unknown(
424 format!("Service was not ready: {}", e.into()),
425 )
426 })?;
427 let codec = tonic::codec::ProstCodec::default();
428 let path = http::uri::PathAndQuery::from_static(
429 "/monitor_service.MonitorService/HeapProfiling",
430 );
431 let mut req = request.into_request();
432 req.extensions_mut()
433 .insert(
434 GrpcMethod::new("monitor_service.MonitorService", "HeapProfiling"),
435 );
436 self.inner.unary(req, path, codec).await
437 }
438 pub async fn list_heap_profiling(
439 &mut self,
440 request: impl tonic::IntoRequest<super::ListHeapProfilingRequest>,
441 ) -> std::result::Result<
442 tonic::Response<super::ListHeapProfilingResponse>,
443 tonic::Status,
444 > {
445 self.inner
446 .ready()
447 .await
448 .map_err(|e| {
449 tonic::Status::unknown(
450 format!("Service was not ready: {}", e.into()),
451 )
452 })?;
453 let codec = tonic::codec::ProstCodec::default();
454 let path = http::uri::PathAndQuery::from_static(
455 "/monitor_service.MonitorService/ListHeapProfiling",
456 );
457 let mut req = request.into_request();
458 req.extensions_mut()
459 .insert(
460 GrpcMethod::new(
461 "monitor_service.MonitorService",
462 "ListHeapProfiling",
463 ),
464 );
465 self.inner.unary(req, path, codec).await
466 }
467 pub async fn analyze_heap(
468 &mut self,
469 request: impl tonic::IntoRequest<super::AnalyzeHeapRequest>,
470 ) -> std::result::Result<
471 tonic::Response<super::AnalyzeHeapResponse>,
472 tonic::Status,
473 > {
474 self.inner
475 .ready()
476 .await
477 .map_err(|e| {
478 tonic::Status::unknown(
479 format!("Service was not ready: {}", e.into()),
480 )
481 })?;
482 let codec = tonic::codec::ProstCodec::default();
483 let path = http::uri::PathAndQuery::from_static(
484 "/monitor_service.MonitorService/AnalyzeHeap",
485 );
486 let mut req = request.into_request();
487 req.extensions_mut()
488 .insert(
489 GrpcMethod::new("monitor_service.MonitorService", "AnalyzeHeap"),
490 );
491 self.inner.unary(req, path, codec).await
492 }
493 pub async fn get_streaming_stats(
494 &mut self,
495 request: impl tonic::IntoRequest<super::GetStreamingStatsRequest>,
496 ) -> std::result::Result<
497 tonic::Response<super::GetStreamingStatsResponse>,
498 tonic::Status,
499 > {
500 self.inner
501 .ready()
502 .await
503 .map_err(|e| {
504 tonic::Status::unknown(
505 format!("Service was not ready: {}", e.into()),
506 )
507 })?;
508 let codec = tonic::codec::ProstCodec::default();
509 let path = http::uri::PathAndQuery::from_static(
510 "/monitor_service.MonitorService/GetStreamingStats",
511 );
512 let mut req = request.into_request();
513 req.extensions_mut()
514 .insert(
515 GrpcMethod::new(
516 "monitor_service.MonitorService",
517 "GetStreamingStats",
518 ),
519 );
520 self.inner.unary(req, path, codec).await
521 }
522 pub async fn tiered_cache_tracing(
523 &mut self,
524 request: impl tonic::IntoRequest<super::TieredCacheTracingRequest>,
525 ) -> std::result::Result<
526 tonic::Response<super::TieredCacheTracingResponse>,
527 tonic::Status,
528 > {
529 self.inner
530 .ready()
531 .await
532 .map_err(|e| {
533 tonic::Status::unknown(
534 format!("Service was not ready: {}", e.into()),
535 )
536 })?;
537 let codec = tonic::codec::ProstCodec::default();
538 let path = http::uri::PathAndQuery::from_static(
539 "/monitor_service.MonitorService/TieredCacheTracing",
540 );
541 let mut req = request.into_request();
542 req.extensions_mut()
543 .insert(
544 GrpcMethod::new(
545 "monitor_service.MonitorService",
546 "TieredCacheTracing",
547 ),
548 );
549 self.inner.unary(req, path, codec).await
550 }
551 pub async fn get_profile_stats(
552 &mut self,
553 request: impl tonic::IntoRequest<super::GetProfileStatsRequest>,
554 ) -> std::result::Result<
555 tonic::Response<super::GetProfileStatsResponse>,
556 tonic::Status,
557 > {
558 self.inner
559 .ready()
560 .await
561 .map_err(|e| {
562 tonic::Status::unknown(
563 format!("Service was not ready: {}", e.into()),
564 )
565 })?;
566 let codec = tonic::codec::ProstCodec::default();
567 let path = http::uri::PathAndQuery::from_static(
568 "/monitor_service.MonitorService/GetProfileStats",
569 );
570 let mut req = request.into_request();
571 req.extensions_mut()
572 .insert(
573 GrpcMethod::new("monitor_service.MonitorService", "GetProfileStats"),
574 );
575 self.inner.unary(req, path, codec).await
576 }
577 }
578}
579pub mod monitor_service_server {
581 #![allow(
582 unused_variables,
583 dead_code,
584 missing_docs,
585 clippy::wildcard_imports,
586 clippy::let_unit_value,
587 )]
588 use tonic::codegen::*;
589 #[async_trait]
591 pub trait MonitorService: std::marker::Send + std::marker::Sync + 'static {
592 async fn stack_trace(
593 &self,
594 request: tonic::Request<super::StackTraceRequest>,
595 ) -> std::result::Result<
596 tonic::Response<super::StackTraceResponse>,
597 tonic::Status,
598 >;
599 async fn profiling(
600 &self,
601 request: tonic::Request<super::ProfilingRequest>,
602 ) -> std::result::Result<
603 tonic::Response<super::ProfilingResponse>,
604 tonic::Status,
605 >;
606 async fn heap_profiling(
607 &self,
608 request: tonic::Request<super::HeapProfilingRequest>,
609 ) -> std::result::Result<
610 tonic::Response<super::HeapProfilingResponse>,
611 tonic::Status,
612 >;
613 async fn list_heap_profiling(
614 &self,
615 request: tonic::Request<super::ListHeapProfilingRequest>,
616 ) -> std::result::Result<
617 tonic::Response<super::ListHeapProfilingResponse>,
618 tonic::Status,
619 >;
620 async fn analyze_heap(
621 &self,
622 request: tonic::Request<super::AnalyzeHeapRequest>,
623 ) -> std::result::Result<
624 tonic::Response<super::AnalyzeHeapResponse>,
625 tonic::Status,
626 >;
627 async fn get_streaming_stats(
628 &self,
629 request: tonic::Request<super::GetStreamingStatsRequest>,
630 ) -> std::result::Result<
631 tonic::Response<super::GetStreamingStatsResponse>,
632 tonic::Status,
633 >;
634 async fn tiered_cache_tracing(
635 &self,
636 request: tonic::Request<super::TieredCacheTracingRequest>,
637 ) -> std::result::Result<
638 tonic::Response<super::TieredCacheTracingResponse>,
639 tonic::Status,
640 >;
641 async fn get_profile_stats(
642 &self,
643 request: tonic::Request<super::GetProfileStatsRequest>,
644 ) -> std::result::Result<
645 tonic::Response<super::GetProfileStatsResponse>,
646 tonic::Status,
647 >;
648 }
649 #[derive(Debug)]
650 pub struct MonitorServiceServer<T> {
651 inner: Arc<T>,
652 accept_compression_encodings: EnabledCompressionEncodings,
653 send_compression_encodings: EnabledCompressionEncodings,
654 max_decoding_message_size: Option<usize>,
655 max_encoding_message_size: Option<usize>,
656 }
657 impl<T> MonitorServiceServer<T> {
658 pub fn new(inner: T) -> Self {
659 Self::from_arc(Arc::new(inner))
660 }
661 pub fn from_arc(inner: Arc<T>) -> Self {
662 Self {
663 inner,
664 accept_compression_encodings: Default::default(),
665 send_compression_encodings: Default::default(),
666 max_decoding_message_size: None,
667 max_encoding_message_size: None,
668 }
669 }
670 pub fn with_interceptor<F>(
671 inner: T,
672 interceptor: F,
673 ) -> InterceptedService<Self, F>
674 where
675 F: tonic::service::Interceptor,
676 {
677 InterceptedService::new(Self::new(inner), interceptor)
678 }
679 #[must_use]
681 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
682 self.accept_compression_encodings.enable(encoding);
683 self
684 }
685 #[must_use]
687 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
688 self.send_compression_encodings.enable(encoding);
689 self
690 }
691 #[must_use]
695 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
696 self.max_decoding_message_size = Some(limit);
697 self
698 }
699 #[must_use]
703 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
704 self.max_encoding_message_size = Some(limit);
705 self
706 }
707 }
708 impl<T, B> tonic::codegen::Service<http::Request<B>> for MonitorServiceServer<T>
709 where
710 T: MonitorService,
711 B: Body + std::marker::Send + 'static,
712 B::Error: Into<StdError> + std::marker::Send + 'static,
713 {
714 type Response = http::Response<tonic::body::BoxBody>;
715 type Error = std::convert::Infallible;
716 type Future = BoxFuture<Self::Response, Self::Error>;
717 fn poll_ready(
718 &mut self,
719 _cx: &mut Context<'_>,
720 ) -> Poll<std::result::Result<(), Self::Error>> {
721 Poll::Ready(Ok(()))
722 }
723 fn call(&mut self, req: http::Request<B>) -> Self::Future {
724 match req.uri().path() {
725 "/monitor_service.MonitorService/StackTrace" => {
726 #[allow(non_camel_case_types)]
727 struct StackTraceSvc<T: MonitorService>(pub Arc<T>);
728 impl<
729 T: MonitorService,
730 > tonic::server::UnaryService<super::StackTraceRequest>
731 for StackTraceSvc<T> {
732 type Response = super::StackTraceResponse;
733 type Future = BoxFuture<
734 tonic::Response<Self::Response>,
735 tonic::Status,
736 >;
737 fn call(
738 &mut self,
739 request: tonic::Request<super::StackTraceRequest>,
740 ) -> Self::Future {
741 let inner = Arc::clone(&self.0);
742 let fut = async move {
743 <T as MonitorService>::stack_trace(&inner, request).await
744 };
745 Box::pin(fut)
746 }
747 }
748 let accept_compression_encodings = self.accept_compression_encodings;
749 let send_compression_encodings = self.send_compression_encodings;
750 let max_decoding_message_size = self.max_decoding_message_size;
751 let max_encoding_message_size = self.max_encoding_message_size;
752 let inner = self.inner.clone();
753 let fut = async move {
754 let method = StackTraceSvc(inner);
755 let codec = tonic::codec::ProstCodec::default();
756 let mut grpc = tonic::server::Grpc::new(codec)
757 .apply_compression_config(
758 accept_compression_encodings,
759 send_compression_encodings,
760 )
761 .apply_max_message_size_config(
762 max_decoding_message_size,
763 max_encoding_message_size,
764 );
765 let res = grpc.unary(method, req).await;
766 Ok(res)
767 };
768 Box::pin(fut)
769 }
770 "/monitor_service.MonitorService/Profiling" => {
771 #[allow(non_camel_case_types)]
772 struct ProfilingSvc<T: MonitorService>(pub Arc<T>);
773 impl<
774 T: MonitorService,
775 > tonic::server::UnaryService<super::ProfilingRequest>
776 for ProfilingSvc<T> {
777 type Response = super::ProfilingResponse;
778 type Future = BoxFuture<
779 tonic::Response<Self::Response>,
780 tonic::Status,
781 >;
782 fn call(
783 &mut self,
784 request: tonic::Request<super::ProfilingRequest>,
785 ) -> Self::Future {
786 let inner = Arc::clone(&self.0);
787 let fut = async move {
788 <T as MonitorService>::profiling(&inner, request).await
789 };
790 Box::pin(fut)
791 }
792 }
793 let accept_compression_encodings = self.accept_compression_encodings;
794 let send_compression_encodings = self.send_compression_encodings;
795 let max_decoding_message_size = self.max_decoding_message_size;
796 let max_encoding_message_size = self.max_encoding_message_size;
797 let inner = self.inner.clone();
798 let fut = async move {
799 let method = ProfilingSvc(inner);
800 let codec = tonic::codec::ProstCodec::default();
801 let mut grpc = tonic::server::Grpc::new(codec)
802 .apply_compression_config(
803 accept_compression_encodings,
804 send_compression_encodings,
805 )
806 .apply_max_message_size_config(
807 max_decoding_message_size,
808 max_encoding_message_size,
809 );
810 let res = grpc.unary(method, req).await;
811 Ok(res)
812 };
813 Box::pin(fut)
814 }
815 "/monitor_service.MonitorService/HeapProfiling" => {
816 #[allow(non_camel_case_types)]
817 struct HeapProfilingSvc<T: MonitorService>(pub Arc<T>);
818 impl<
819 T: MonitorService,
820 > tonic::server::UnaryService<super::HeapProfilingRequest>
821 for HeapProfilingSvc<T> {
822 type Response = super::HeapProfilingResponse;
823 type Future = BoxFuture<
824 tonic::Response<Self::Response>,
825 tonic::Status,
826 >;
827 fn call(
828 &mut self,
829 request: tonic::Request<super::HeapProfilingRequest>,
830 ) -> Self::Future {
831 let inner = Arc::clone(&self.0);
832 let fut = async move {
833 <T as MonitorService>::heap_profiling(&inner, request).await
834 };
835 Box::pin(fut)
836 }
837 }
838 let accept_compression_encodings = self.accept_compression_encodings;
839 let send_compression_encodings = self.send_compression_encodings;
840 let max_decoding_message_size = self.max_decoding_message_size;
841 let max_encoding_message_size = self.max_encoding_message_size;
842 let inner = self.inner.clone();
843 let fut = async move {
844 let method = HeapProfilingSvc(inner);
845 let codec = tonic::codec::ProstCodec::default();
846 let mut grpc = tonic::server::Grpc::new(codec)
847 .apply_compression_config(
848 accept_compression_encodings,
849 send_compression_encodings,
850 )
851 .apply_max_message_size_config(
852 max_decoding_message_size,
853 max_encoding_message_size,
854 );
855 let res = grpc.unary(method, req).await;
856 Ok(res)
857 };
858 Box::pin(fut)
859 }
860 "/monitor_service.MonitorService/ListHeapProfiling" => {
861 #[allow(non_camel_case_types)]
862 struct ListHeapProfilingSvc<T: MonitorService>(pub Arc<T>);
863 impl<
864 T: MonitorService,
865 > tonic::server::UnaryService<super::ListHeapProfilingRequest>
866 for ListHeapProfilingSvc<T> {
867 type Response = super::ListHeapProfilingResponse;
868 type Future = BoxFuture<
869 tonic::Response<Self::Response>,
870 tonic::Status,
871 >;
872 fn call(
873 &mut self,
874 request: tonic::Request<super::ListHeapProfilingRequest>,
875 ) -> Self::Future {
876 let inner = Arc::clone(&self.0);
877 let fut = async move {
878 <T as MonitorService>::list_heap_profiling(&inner, request)
879 .await
880 };
881 Box::pin(fut)
882 }
883 }
884 let accept_compression_encodings = self.accept_compression_encodings;
885 let send_compression_encodings = self.send_compression_encodings;
886 let max_decoding_message_size = self.max_decoding_message_size;
887 let max_encoding_message_size = self.max_encoding_message_size;
888 let inner = self.inner.clone();
889 let fut = async move {
890 let method = ListHeapProfilingSvc(inner);
891 let codec = tonic::codec::ProstCodec::default();
892 let mut grpc = tonic::server::Grpc::new(codec)
893 .apply_compression_config(
894 accept_compression_encodings,
895 send_compression_encodings,
896 )
897 .apply_max_message_size_config(
898 max_decoding_message_size,
899 max_encoding_message_size,
900 );
901 let res = grpc.unary(method, req).await;
902 Ok(res)
903 };
904 Box::pin(fut)
905 }
906 "/monitor_service.MonitorService/AnalyzeHeap" => {
907 #[allow(non_camel_case_types)]
908 struct AnalyzeHeapSvc<T: MonitorService>(pub Arc<T>);
909 impl<
910 T: MonitorService,
911 > tonic::server::UnaryService<super::AnalyzeHeapRequest>
912 for AnalyzeHeapSvc<T> {
913 type Response = super::AnalyzeHeapResponse;
914 type Future = BoxFuture<
915 tonic::Response<Self::Response>,
916 tonic::Status,
917 >;
918 fn call(
919 &mut self,
920 request: tonic::Request<super::AnalyzeHeapRequest>,
921 ) -> Self::Future {
922 let inner = Arc::clone(&self.0);
923 let fut = async move {
924 <T as MonitorService>::analyze_heap(&inner, request).await
925 };
926 Box::pin(fut)
927 }
928 }
929 let accept_compression_encodings = self.accept_compression_encodings;
930 let send_compression_encodings = self.send_compression_encodings;
931 let max_decoding_message_size = self.max_decoding_message_size;
932 let max_encoding_message_size = self.max_encoding_message_size;
933 let inner = self.inner.clone();
934 let fut = async move {
935 let method = AnalyzeHeapSvc(inner);
936 let codec = tonic::codec::ProstCodec::default();
937 let mut grpc = tonic::server::Grpc::new(codec)
938 .apply_compression_config(
939 accept_compression_encodings,
940 send_compression_encodings,
941 )
942 .apply_max_message_size_config(
943 max_decoding_message_size,
944 max_encoding_message_size,
945 );
946 let res = grpc.unary(method, req).await;
947 Ok(res)
948 };
949 Box::pin(fut)
950 }
951 "/monitor_service.MonitorService/GetStreamingStats" => {
952 #[allow(non_camel_case_types)]
953 struct GetStreamingStatsSvc<T: MonitorService>(pub Arc<T>);
954 impl<
955 T: MonitorService,
956 > tonic::server::UnaryService<super::GetStreamingStatsRequest>
957 for GetStreamingStatsSvc<T> {
958 type Response = super::GetStreamingStatsResponse;
959 type Future = BoxFuture<
960 tonic::Response<Self::Response>,
961 tonic::Status,
962 >;
963 fn call(
964 &mut self,
965 request: tonic::Request<super::GetStreamingStatsRequest>,
966 ) -> Self::Future {
967 let inner = Arc::clone(&self.0);
968 let fut = async move {
969 <T as MonitorService>::get_streaming_stats(&inner, request)
970 .await
971 };
972 Box::pin(fut)
973 }
974 }
975 let accept_compression_encodings = self.accept_compression_encodings;
976 let send_compression_encodings = self.send_compression_encodings;
977 let max_decoding_message_size = self.max_decoding_message_size;
978 let max_encoding_message_size = self.max_encoding_message_size;
979 let inner = self.inner.clone();
980 let fut = async move {
981 let method = GetStreamingStatsSvc(inner);
982 let codec = tonic::codec::ProstCodec::default();
983 let mut grpc = tonic::server::Grpc::new(codec)
984 .apply_compression_config(
985 accept_compression_encodings,
986 send_compression_encodings,
987 )
988 .apply_max_message_size_config(
989 max_decoding_message_size,
990 max_encoding_message_size,
991 );
992 let res = grpc.unary(method, req).await;
993 Ok(res)
994 };
995 Box::pin(fut)
996 }
997 "/monitor_service.MonitorService/TieredCacheTracing" => {
998 #[allow(non_camel_case_types)]
999 struct TieredCacheTracingSvc<T: MonitorService>(pub Arc<T>);
1000 impl<
1001 T: MonitorService,
1002 > tonic::server::UnaryService<super::TieredCacheTracingRequest>
1003 for TieredCacheTracingSvc<T> {
1004 type Response = super::TieredCacheTracingResponse;
1005 type Future = BoxFuture<
1006 tonic::Response<Self::Response>,
1007 tonic::Status,
1008 >;
1009 fn call(
1010 &mut self,
1011 request: tonic::Request<super::TieredCacheTracingRequest>,
1012 ) -> Self::Future {
1013 let inner = Arc::clone(&self.0);
1014 let fut = async move {
1015 <T as MonitorService>::tiered_cache_tracing(&inner, request)
1016 .await
1017 };
1018 Box::pin(fut)
1019 }
1020 }
1021 let accept_compression_encodings = self.accept_compression_encodings;
1022 let send_compression_encodings = self.send_compression_encodings;
1023 let max_decoding_message_size = self.max_decoding_message_size;
1024 let max_encoding_message_size = self.max_encoding_message_size;
1025 let inner = self.inner.clone();
1026 let fut = async move {
1027 let method = TieredCacheTracingSvc(inner);
1028 let codec = tonic::codec::ProstCodec::default();
1029 let mut grpc = tonic::server::Grpc::new(codec)
1030 .apply_compression_config(
1031 accept_compression_encodings,
1032 send_compression_encodings,
1033 )
1034 .apply_max_message_size_config(
1035 max_decoding_message_size,
1036 max_encoding_message_size,
1037 );
1038 let res = grpc.unary(method, req).await;
1039 Ok(res)
1040 };
1041 Box::pin(fut)
1042 }
1043 "/monitor_service.MonitorService/GetProfileStats" => {
1044 #[allow(non_camel_case_types)]
1045 struct GetProfileStatsSvc<T: MonitorService>(pub Arc<T>);
1046 impl<
1047 T: MonitorService,
1048 > tonic::server::UnaryService<super::GetProfileStatsRequest>
1049 for GetProfileStatsSvc<T> {
1050 type Response = super::GetProfileStatsResponse;
1051 type Future = BoxFuture<
1052 tonic::Response<Self::Response>,
1053 tonic::Status,
1054 >;
1055 fn call(
1056 &mut self,
1057 request: tonic::Request<super::GetProfileStatsRequest>,
1058 ) -> Self::Future {
1059 let inner = Arc::clone(&self.0);
1060 let fut = async move {
1061 <T as MonitorService>::get_profile_stats(&inner, request)
1062 .await
1063 };
1064 Box::pin(fut)
1065 }
1066 }
1067 let accept_compression_encodings = self.accept_compression_encodings;
1068 let send_compression_encodings = self.send_compression_encodings;
1069 let max_decoding_message_size = self.max_decoding_message_size;
1070 let max_encoding_message_size = self.max_encoding_message_size;
1071 let inner = self.inner.clone();
1072 let fut = async move {
1073 let method = GetProfileStatsSvc(inner);
1074 let codec = tonic::codec::ProstCodec::default();
1075 let mut grpc = tonic::server::Grpc::new(codec)
1076 .apply_compression_config(
1077 accept_compression_encodings,
1078 send_compression_encodings,
1079 )
1080 .apply_max_message_size_config(
1081 max_decoding_message_size,
1082 max_encoding_message_size,
1083 );
1084 let res = grpc.unary(method, req).await;
1085 Ok(res)
1086 };
1087 Box::pin(fut)
1088 }
1089 _ => {
1090 Box::pin(async move {
1091 let mut response = http::Response::new(empty_body());
1092 let headers = response.headers_mut();
1093 headers
1094 .insert(
1095 tonic::Status::GRPC_STATUS,
1096 (tonic::Code::Unimplemented as i32).into(),
1097 );
1098 headers
1099 .insert(
1100 http::header::CONTENT_TYPE,
1101 tonic::metadata::GRPC_CONTENT_TYPE,
1102 );
1103 Ok(response)
1104 })
1105 }
1106 }
1107 }
1108 }
1109 impl<T> Clone for MonitorServiceServer<T> {
1110 fn clone(&self) -> Self {
1111 let inner = self.inner.clone();
1112 Self {
1113 inner,
1114 accept_compression_encodings: self.accept_compression_encodings,
1115 send_compression_encodings: self.send_compression_encodings,
1116 max_decoding_message_size: self.max_decoding_message_size,
1117 max_encoding_message_size: self.max_encoding_message_size,
1118 }
1119 }
1120 }
1121 pub const SERVICE_NAME: &str = "monitor_service.MonitorService";
1123 impl<T> tonic::server::NamedService for MonitorServiceServer<T> {
1124 const NAME: &'static str = SERVICE_NAME;
1125 }
1126}