1#[derive(prost_helpers::AnyPB)]
3#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4pub struct GetTelemetryInfoRequest {}
5#[derive(prost_helpers::AnyPB)]
6#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct TelemetryInfoResponse {
8 #[prost(string, optional, tag = "1")]
9 pub tracking_id: ::core::option::Option<::prost::alloc::string::String>,
10}
11#[derive(prost_helpers::AnyPB)]
12#[derive(Clone, Copy, PartialEq, ::prost::Message)]
13pub struct HeartbeatRequest {
14 #[prost(uint32, tag = "1")]
15 pub node_id: u32,
16}
17#[derive(prost_helpers::AnyPB)]
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct HeartbeatResponse {
20 #[prost(message, optional, tag = "1")]
21 pub status: ::core::option::Option<super::common::Status>,
22}
23#[derive(prost_helpers::AnyPB)]
27#[derive(Clone, PartialEq, ::prost::Message)]
28pub struct TableFragments {
29 #[prost(uint32, tag = "1")]
31 pub table_id: u32,
32 #[prost(enumeration = "table_fragments::State", tag = "2")]
33 pub state: i32,
34 #[prost(map = "uint32, message", tag = "3")]
35 pub fragments: ::std::collections::HashMap<u32, table_fragments::Fragment>,
36 #[prost(map = "uint32, message", tag = "4")]
37 pub actor_status: ::std::collections::HashMap<u32, table_fragments::ActorStatus>,
38 #[prost(map = "uint32, message", tag = "5")]
40 pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
41 #[prost(message, optional, tag = "6")]
42 pub ctx: ::core::option::Option<super::stream_plan::StreamContext>,
43 #[prost(message, optional, tag = "7")]
44 pub parallelism: ::core::option::Option<TableParallelism>,
45 #[prost(uint32, optional, tag = "10")]
59 pub max_parallelism: ::core::option::Option<u32>,
60 #[prost(string, tag = "8")]
62 pub node_label: ::prost::alloc::string::String,
63 #[prost(bool, tag = "9")]
66 pub backfill_done: bool,
67}
68pub mod table_fragments {
70 #[derive(prost_helpers::AnyPB)]
72 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
73 pub struct ActorStatus {
74 #[prost(message, optional, tag = "1")]
76 pub location: ::core::option::Option<super::super::common::ActorLocation>,
77 #[prost(enumeration = "actor_status::ActorState", tag = "2")]
79 pub state: i32,
80 }
81 pub mod actor_status {
83 #[derive(prost_helpers::AnyPB)]
85 #[derive(
86 Clone,
87 Copy,
88 Debug,
89 PartialEq,
90 Eq,
91 Hash,
92 PartialOrd,
93 Ord,
94 ::prost::Enumeration
95 )]
96 #[repr(i32)]
97 pub enum ActorState {
98 Unspecified = 0,
99 Inactive = 1,
101 Running = 2,
103 }
104 impl ActorState {
105 pub fn as_str_name(&self) -> &'static str {
110 match self {
111 Self::Unspecified => "UNSPECIFIED",
112 Self::Inactive => "INACTIVE",
113 Self::Running => "RUNNING",
114 }
115 }
116 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
118 match value {
119 "UNSPECIFIED" => Some(Self::Unspecified),
120 "INACTIVE" => Some(Self::Inactive),
121 "RUNNING" => Some(Self::Running),
122 _ => None,
123 }
124 }
125 }
126 }
127 #[derive(prost_helpers::AnyPB)]
128 #[derive(Clone, PartialEq, ::prost::Message)]
129 pub struct Fragment {
130 #[prost(uint32, tag = "1")]
131 pub fragment_id: u32,
132 #[prost(uint32, tag = "2")]
134 pub fragment_type_mask: u32,
135 #[prost(enumeration = "fragment::FragmentDistributionType", tag = "3")]
136 pub distribution_type: i32,
137 #[prost(message, repeated, tag = "4")]
138 pub actors: ::prost::alloc::vec::Vec<super::super::stream_plan::StreamActor>,
139 #[prost(uint32, repeated, tag = "6")]
140 pub state_table_ids: ::prost::alloc::vec::Vec<u32>,
141 #[prost(uint32, repeated, tag = "7")]
146 pub upstream_fragment_ids: ::prost::alloc::vec::Vec<u32>,
147 #[prost(uint32, optional, tag = "8")]
154 pub maybe_vnode_count: ::core::option::Option<u32>,
155 #[prost(message, optional, tag = "9")]
156 pub nodes: ::core::option::Option<super::super::stream_plan::StreamNode>,
157 }
158 pub mod fragment {
160 #[derive(prost_helpers::AnyPB)]
161 #[derive(
162 Clone,
163 Copy,
164 Debug,
165 PartialEq,
166 Eq,
167 Hash,
168 PartialOrd,
169 Ord,
170 ::prost::Enumeration
171 )]
172 #[repr(i32)]
173 pub enum FragmentDistributionType {
174 Unspecified = 0,
175 Single = 1,
176 Hash = 2,
177 }
178 impl FragmentDistributionType {
179 pub fn as_str_name(&self) -> &'static str {
184 match self {
185 Self::Unspecified => "UNSPECIFIED",
186 Self::Single => "SINGLE",
187 Self::Hash => "HASH",
188 }
189 }
190 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
192 match value {
193 "UNSPECIFIED" => Some(Self::Unspecified),
194 "SINGLE" => Some(Self::Single),
195 "HASH" => Some(Self::Hash),
196 _ => None,
197 }
198 }
199 }
200 }
201 #[derive(prost_helpers::AnyPB)]
203 #[derive(
204 Clone,
205 Copy,
206 Debug,
207 PartialEq,
208 Eq,
209 Hash,
210 PartialOrd,
211 Ord,
212 ::prost::Enumeration
213 )]
214 #[repr(i32)]
215 pub enum State {
216 Unspecified = 0,
217 Initial = 1,
219 Creating = 2,
221 Created = 3,
223 }
224 impl State {
225 pub fn as_str_name(&self) -> &'static str {
230 match self {
231 Self::Unspecified => "UNSPECIFIED",
232 Self::Initial => "INITIAL",
233 Self::Creating => "CREATING",
234 Self::Created => "CREATED",
235 }
236 }
237 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
239 match value {
240 "UNSPECIFIED" => Some(Self::Unspecified),
241 "INITIAL" => Some(Self::Initial),
242 "CREATING" => Some(Self::Creating),
243 "CREATED" => Some(Self::Created),
244 _ => None,
245 }
246 }
247 }
248}
249#[derive(prost_helpers::AnyPB)]
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct FragmentWorkerSlotMapping {
253 #[prost(uint32, tag = "1")]
254 pub fragment_id: u32,
255 #[prost(message, optional, tag = "2")]
256 pub mapping: ::core::option::Option<super::common::WorkerSlotMapping>,
257}
258#[derive(prost_helpers::AnyPB)]
259#[derive(Clone, PartialEq, ::prost::Message)]
260pub struct FragmentWorkerSlotMappings {
261 #[prost(message, repeated, tag = "1")]
262 pub mappings: ::prost::alloc::vec::Vec<FragmentWorkerSlotMapping>,
263}
264#[derive(prost_helpers::AnyPB)]
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct ActorLocation {
268 #[prost(message, optional, tag = "1")]
269 pub node: ::core::option::Option<super::common::WorkerNode>,
270 #[prost(message, repeated, tag = "2")]
271 pub actors: ::prost::alloc::vec::Vec<super::stream_plan::StreamActor>,
272}
273#[derive(prost_helpers::AnyPB)]
274#[derive(Clone, PartialEq, ::prost::Message)]
275pub struct MigrationPlan {
276 #[prost(map = "uint64, uint64", tag = "2")]
278 pub worker_slot_migration_plan: ::std::collections::HashMap<u64, u64>,
279}
280#[derive(prost_helpers::AnyPB)]
281#[derive(Clone, Copy, PartialEq, ::prost::Message)]
282pub struct FlushRequest {
283 #[prost(uint32, tag = "1")]
284 pub database_id: u32,
285}
286#[derive(prost_helpers::AnyPB)]
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct FlushResponse {
289 #[prost(message, optional, tag = "1")]
290 pub status: ::core::option::Option<super::common::Status>,
291 #[prost(uint64, tag = "2")]
292 pub hummock_version_id: u64,
293}
294#[derive(prost_helpers::AnyPB)]
295#[derive(Clone, Copy, PartialEq, ::prost::Message)]
296pub struct PauseRequest {}
297#[derive(prost_helpers::AnyPB)]
298#[derive(Clone, Copy, PartialEq, ::prost::Message)]
299pub struct PauseResponse {}
300#[derive(prost_helpers::AnyPB)]
301#[derive(Clone, Copy, PartialEq, ::prost::Message)]
302pub struct ResumeRequest {}
303#[derive(prost_helpers::AnyPB)]
304#[derive(Clone, Copy, PartialEq, ::prost::Message)]
305pub struct ResumeResponse {}
306#[derive(prost_helpers::AnyPB)]
307#[derive(Clone, PartialEq, ::prost::Message)]
308pub struct CancelCreatingJobsRequest {
309 #[prost(oneof = "cancel_creating_jobs_request::Jobs", tags = "1, 2")]
310 pub jobs: ::core::option::Option<cancel_creating_jobs_request::Jobs>,
311}
312pub mod cancel_creating_jobs_request {
314 #[derive(prost_helpers::AnyPB)]
315 #[derive(Clone, PartialEq, ::prost::Message)]
316 pub struct CreatingJobInfo {
317 #[prost(uint32, tag = "1")]
318 pub database_id: u32,
319 #[prost(uint32, tag = "2")]
320 pub schema_id: u32,
321 #[prost(string, tag = "3")]
322 pub name: ::prost::alloc::string::String,
323 }
324 #[derive(prost_helpers::AnyPB)]
325 #[derive(Clone, PartialEq, ::prost::Message)]
326 pub struct CreatingJobInfos {
327 #[prost(message, repeated, tag = "1")]
328 pub infos: ::prost::alloc::vec::Vec<CreatingJobInfo>,
329 }
330 #[derive(prost_helpers::AnyPB)]
331 #[derive(Clone, PartialEq, ::prost::Message)]
332 pub struct CreatingJobIds {
333 #[prost(uint32, repeated, tag = "1")]
334 pub job_ids: ::prost::alloc::vec::Vec<u32>,
335 }
336 #[derive(prost_helpers::AnyPB)]
337 #[derive(Clone, PartialEq, ::prost::Oneof)]
338 pub enum Jobs {
339 #[prost(message, tag = "1")]
340 Infos(CreatingJobInfos),
341 #[prost(message, tag = "2")]
342 Ids(CreatingJobIds),
343 }
344}
345#[derive(prost_helpers::AnyPB)]
346#[derive(Clone, PartialEq, ::prost::Message)]
347pub struct CancelCreatingJobsResponse {
348 #[prost(message, optional, tag = "1")]
349 pub status: ::core::option::Option<super::common::Status>,
350 #[prost(uint32, repeated, tag = "2")]
351 pub canceled_jobs: ::prost::alloc::vec::Vec<u32>,
352}
353#[derive(prost_helpers::AnyPB)]
354#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct ListTableFragmentsRequest {
356 #[prost(uint32, repeated, tag = "1")]
357 pub table_ids: ::prost::alloc::vec::Vec<u32>,
358}
359#[derive(prost_helpers::AnyPB)]
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct ListTableFragmentsResponse {
362 #[prost(map = "uint32, message", tag = "1")]
363 pub table_fragments: ::std::collections::HashMap<
364 u32,
365 list_table_fragments_response::TableFragmentInfo,
366 >,
367}
368pub mod list_table_fragments_response {
370 #[derive(prost_helpers::AnyPB)]
371 #[derive(Clone, PartialEq, ::prost::Message)]
372 pub struct ActorInfo {
373 #[prost(uint32, tag = "1")]
374 pub id: u32,
375 #[prost(message, optional, tag = "2")]
376 pub node: ::core::option::Option<super::super::stream_plan::StreamNode>,
377 #[prost(message, repeated, tag = "3")]
378 pub dispatcher: ::prost::alloc::vec::Vec<super::super::stream_plan::Dispatcher>,
379 }
380 #[derive(prost_helpers::AnyPB)]
381 #[derive(Clone, PartialEq, ::prost::Message)]
382 pub struct FragmentInfo {
383 #[prost(uint32, tag = "1")]
384 pub id: u32,
385 #[prost(message, repeated, tag = "4")]
386 pub actors: ::prost::alloc::vec::Vec<ActorInfo>,
387 }
388 #[derive(prost_helpers::AnyPB)]
389 #[derive(Clone, PartialEq, ::prost::Message)]
390 pub struct TableFragmentInfo {
391 #[prost(message, repeated, tag = "1")]
392 pub fragments: ::prost::alloc::vec::Vec<FragmentInfo>,
393 #[prost(message, optional, tag = "2")]
394 pub ctx: ::core::option::Option<super::super::stream_plan::StreamContext>,
395 }
396}
397#[derive(prost_helpers::AnyPB)]
398#[derive(Clone, Copy, PartialEq, ::prost::Message)]
399pub struct ListStreamingJobStatesRequest {}
400#[derive(prost_helpers::AnyPB)]
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct ListStreamingJobStatesResponse {
403 #[prost(message, repeated, tag = "1")]
404 pub states: ::prost::alloc::vec::Vec<
405 list_streaming_job_states_response::StreamingJobState,
406 >,
407}
408pub mod list_streaming_job_states_response {
410 #[derive(prost_helpers::AnyPB)]
411 #[derive(Clone, PartialEq, ::prost::Message)]
412 pub struct StreamingJobState {
413 #[prost(uint32, tag = "1")]
414 pub table_id: u32,
415 #[prost(enumeration = "super::table_fragments::State", tag = "2")]
416 pub state: i32,
417 #[prost(message, optional, tag = "3")]
418 pub parallelism: ::core::option::Option<super::TableParallelism>,
419 #[prost(uint32, tag = "4")]
420 pub max_parallelism: u32,
421 #[prost(string, tag = "5")]
422 pub name: ::prost::alloc::string::String,
423 #[prost(string, tag = "6")]
424 pub resource_group: ::prost::alloc::string::String,
425 }
426}
427#[derive(prost_helpers::AnyPB)]
428#[derive(Clone, Copy, PartialEq, ::prost::Message)]
429pub struct ListFragmentDistributionRequest {}
430#[derive(prost_helpers::AnyPB)]
431#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct ListFragmentDistributionResponse {
433 #[prost(message, repeated, tag = "1")]
434 pub distributions: ::prost::alloc::vec::Vec<
435 list_fragment_distribution_response::FragmentDistribution,
436 >,
437}
438pub mod list_fragment_distribution_response {
440 #[derive(prost_helpers::AnyPB)]
441 #[derive(Clone, PartialEq, ::prost::Message)]
442 pub struct FragmentDistribution {
443 #[prost(uint32, tag = "1")]
444 pub fragment_id: u32,
445 #[prost(uint32, tag = "2")]
446 pub table_id: u32,
447 #[prost(
448 enumeration = "super::table_fragments::fragment::FragmentDistributionType",
449 tag = "3"
450 )]
451 pub distribution_type: i32,
452 #[prost(uint32, repeated, tag = "4")]
453 pub state_table_ids: ::prost::alloc::vec::Vec<u32>,
454 #[prost(uint32, repeated, tag = "5")]
455 pub upstream_fragment_ids: ::prost::alloc::vec::Vec<u32>,
456 #[prost(uint32, tag = "6")]
457 pub fragment_type_mask: u32,
458 #[prost(uint32, tag = "7")]
459 pub parallelism: u32,
460 #[prost(uint32, tag = "8")]
461 pub vnode_count: u32,
462 #[prost(message, optional, tag = "9")]
463 pub node: ::core::option::Option<super::super::stream_plan::StreamNode>,
464 }
465}
466#[derive(prost_helpers::AnyPB)]
467#[derive(Clone, Copy, PartialEq, ::prost::Message)]
468pub struct ListActorStatesRequest {}
469#[derive(prost_helpers::AnyPB)]
470#[derive(Clone, PartialEq, ::prost::Message)]
471pub struct ListActorStatesResponse {
472 #[prost(message, repeated, tag = "1")]
473 pub states: ::prost::alloc::vec::Vec<list_actor_states_response::ActorState>,
474}
475pub mod list_actor_states_response {
477 #[derive(prost_helpers::AnyPB)]
478 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
479 pub struct ActorState {
480 #[prost(uint32, tag = "1")]
481 pub actor_id: u32,
482 #[prost(uint32, tag = "2")]
483 pub fragment_id: u32,
484 #[prost(
485 enumeration = "super::table_fragments::actor_status::ActorState",
486 tag = "4"
487 )]
488 pub state: i32,
489 #[prost(uint32, tag = "5")]
490 pub worker_id: u32,
491 }
492}
493#[derive(prost_helpers::AnyPB)]
494#[derive(Clone, Copy, PartialEq, ::prost::Message)]
495pub struct ListActorSplitsRequest {}
496#[derive(prost_helpers::AnyPB)]
497#[derive(Clone, PartialEq, ::prost::Message)]
498pub struct ListActorSplitsResponse {
499 #[prost(message, repeated, tag = "1")]
500 pub actor_splits: ::prost::alloc::vec::Vec<list_actor_splits_response::ActorSplit>,
501}
502pub mod list_actor_splits_response {
504 #[derive(prost_helpers::AnyPB)]
505 #[derive(Clone, PartialEq, ::prost::Message)]
506 pub struct ActorSplit {
507 #[prost(uint32, tag = "1")]
508 pub actor_id: u32,
509 #[prost(uint32, tag = "2")]
510 pub fragment_id: u32,
511 #[prost(uint32, tag = "3")]
512 pub source_id: u32,
513 #[prost(string, tag = "4")]
514 pub split_id: ::prost::alloc::string::String,
515 #[prost(enumeration = "FragmentType", tag = "5")]
516 pub fragment_type: i32,
517 }
518 #[derive(prost_helpers::AnyPB)]
519 #[derive(
520 Clone,
521 Copy,
522 Debug,
523 PartialEq,
524 Eq,
525 Hash,
526 PartialOrd,
527 Ord,
528 ::prost::Enumeration
529 )]
530 #[repr(i32)]
531 pub enum FragmentType {
532 Unspecified = 0,
533 NonSharedSource = 1,
534 SharedSource = 2,
535 SharedSourceBackfill = 3,
536 }
537 impl FragmentType {
538 pub fn as_str_name(&self) -> &'static str {
543 match self {
544 Self::Unspecified => "UNSPECIFIED",
545 Self::NonSharedSource => "NON_SHARED_SOURCE",
546 Self::SharedSource => "SHARED_SOURCE",
547 Self::SharedSourceBackfill => "SHARED_SOURCE_BACKFILL",
548 }
549 }
550 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
552 match value {
553 "UNSPECIFIED" => Some(Self::Unspecified),
554 "NON_SHARED_SOURCE" => Some(Self::NonSharedSource),
555 "SHARED_SOURCE" => Some(Self::SharedSource),
556 "SHARED_SOURCE_BACKFILL" => Some(Self::SharedSourceBackfill),
557 _ => None,
558 }
559 }
560 }
561}
562#[derive(prost_helpers::AnyPB)]
563#[derive(Clone, Copy, PartialEq, ::prost::Message)]
564pub struct ListObjectDependenciesRequest {}
565#[derive(prost_helpers::AnyPB)]
566#[derive(Clone, PartialEq, ::prost::Message)]
567pub struct ListObjectDependenciesResponse {
568 #[prost(message, repeated, tag = "1")]
569 pub dependencies: ::prost::alloc::vec::Vec<
570 list_object_dependencies_response::ObjectDependencies,
571 >,
572}
573pub mod list_object_dependencies_response {
575 #[derive(prost_helpers::AnyPB)]
576 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
577 pub struct ObjectDependencies {
578 #[prost(uint32, tag = "1")]
579 pub object_id: u32,
580 #[prost(uint32, tag = "2")]
581 pub referenced_object_id: u32,
582 }
583}
584#[derive(prost_helpers::AnyPB)]
585#[derive(Clone, Copy, PartialEq, ::prost::Message)]
586pub struct ApplyThrottleRequest {
587 #[prost(enumeration = "ThrottleTarget", tag = "1")]
588 pub kind: i32,
589 #[prost(uint32, tag = "2")]
590 pub id: u32,
591 #[prost(uint32, optional, tag = "3")]
592 pub rate: ::core::option::Option<u32>,
593}
594#[derive(prost_helpers::AnyPB)]
595#[derive(Clone, PartialEq, ::prost::Message)]
596pub struct ApplyThrottleResponse {
597 #[prost(message, optional, tag = "1")]
598 pub status: ::core::option::Option<super::common::Status>,
599}
600#[derive(prost_helpers::AnyPB)]
601#[derive(Clone, Copy, PartialEq, ::prost::Message)]
602pub struct RecoverRequest {}
603#[derive(prost_helpers::AnyPB)]
604#[derive(Clone, Copy, PartialEq, ::prost::Message)]
605pub struct RecoverResponse {}
606#[derive(prost_helpers::AnyPB)]
608#[derive(Clone, PartialEq, ::prost::Message)]
609pub struct AddWorkerNodeRequest {
610 #[prost(enumeration = "super::common::WorkerType", tag = "1")]
611 pub worker_type: i32,
612 #[prost(message, optional, tag = "2")]
613 pub host: ::core::option::Option<super::common::HostAddress>,
614 #[prost(message, optional, tag = "5")]
615 pub resource: ::core::option::Option<super::common::worker_node::Resource>,
616 #[prost(message, optional, tag = "6")]
617 pub property: ::core::option::Option<super::common::worker_node::Property>,
618}
619#[derive(prost_helpers::AnyPB)]
620#[derive(Clone, PartialEq, ::prost::Message)]
621pub struct AddWorkerNodeResponse {
622 #[prost(uint32, optional, tag = "2")]
623 pub node_id: ::core::option::Option<u32>,
624 #[prost(string, tag = "4")]
625 pub cluster_id: ::prost::alloc::string::String,
626}
627#[derive(prost_helpers::AnyPB)]
628#[derive(Clone, PartialEq, ::prost::Message)]
629pub struct ActivateWorkerNodeRequest {
630 #[prost(message, optional, tag = "1")]
631 pub host: ::core::option::Option<super::common::HostAddress>,
632 #[prost(uint32, tag = "2")]
633 pub node_id: u32,
634}
635#[derive(prost_helpers::AnyPB)]
636#[derive(Clone, PartialEq, ::prost::Message)]
637pub struct ActivateWorkerNodeResponse {
638 #[prost(message, optional, tag = "1")]
639 pub status: ::core::option::Option<super::common::Status>,
640}
641#[derive(prost_helpers::AnyPB)]
642#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct DeleteWorkerNodeRequest {
644 #[prost(message, optional, tag = "1")]
645 pub host: ::core::option::Option<super::common::HostAddress>,
646}
647#[derive(prost_helpers::AnyPB)]
648#[derive(Clone, PartialEq, ::prost::Message)]
649pub struct DeleteWorkerNodeResponse {
650 #[prost(message, optional, tag = "1")]
651 pub status: ::core::option::Option<super::common::Status>,
652}
653#[derive(prost_helpers::AnyPB)]
655#[derive(Clone, PartialEq, ::prost::Message)]
656pub struct UpdateWorkerNodeSchedulabilityRequest {
657 #[prost(uint32, repeated, tag = "1")]
658 pub worker_ids: ::prost::alloc::vec::Vec<u32>,
659 #[prost(
660 enumeration = "update_worker_node_schedulability_request::Schedulability",
661 tag = "2"
662 )]
663 pub schedulability: i32,
664}
665pub mod update_worker_node_schedulability_request {
667 #[derive(prost_helpers::AnyPB)]
668 #[derive(
669 Clone,
670 Copy,
671 Debug,
672 PartialEq,
673 Eq,
674 Hash,
675 PartialOrd,
676 Ord,
677 ::prost::Enumeration
678 )]
679 #[repr(i32)]
680 pub enum Schedulability {
681 Unspecified = 0,
682 Schedulable = 1,
683 Unschedulable = 2,
684 }
685 impl Schedulability {
686 pub fn as_str_name(&self) -> &'static str {
691 match self {
692 Self::Unspecified => "UNSPECIFIED",
693 Self::Schedulable => "SCHEDULABLE",
694 Self::Unschedulable => "UNSCHEDULABLE",
695 }
696 }
697 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
699 match value {
700 "UNSPECIFIED" => Some(Self::Unspecified),
701 "SCHEDULABLE" => Some(Self::Schedulable),
702 "UNSCHEDULABLE" => Some(Self::Unschedulable),
703 _ => None,
704 }
705 }
706 }
707}
708#[derive(prost_helpers::AnyPB)]
709#[derive(Clone, PartialEq, ::prost::Message)]
710pub struct UpdateWorkerNodeSchedulabilityResponse {
711 #[prost(message, optional, tag = "1")]
712 pub status: ::core::option::Option<super::common::Status>,
713}
714#[derive(prost_helpers::AnyPB)]
715#[derive(Clone, Copy, PartialEq, ::prost::Message)]
716pub struct ListAllNodesRequest {
717 #[prost(enumeration = "super::common::WorkerType", optional, tag = "1")]
718 pub worker_type: ::core::option::Option<i32>,
719 #[prost(bool, tag = "2")]
721 pub include_starting_nodes: bool,
722}
723#[derive(prost_helpers::AnyPB)]
724#[derive(Clone, PartialEq, ::prost::Message)]
725pub struct ListAllNodesResponse {
726 #[prost(message, optional, tag = "1")]
727 pub status: ::core::option::Option<super::common::Status>,
728 #[prost(message, repeated, tag = "2")]
729 pub nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
730}
731#[derive(prost_helpers::AnyPB)]
732#[derive(Clone, Copy, PartialEq, ::prost::Message)]
733pub struct GetClusterRecoveryStatusRequest {}
734#[derive(prost_helpers::AnyPB)]
735#[derive(Clone, Copy, PartialEq, ::prost::Message)]
736pub struct GetClusterRecoveryStatusResponse {
737 #[prost(enumeration = "RecoveryStatus", tag = "1")]
738 pub status: i32,
739}
740#[derive(prost_helpers::AnyPB)]
741#[derive(Clone, Copy, PartialEq, ::prost::Message)]
742pub struct GetMetaStoreInfoRequest {}
743#[derive(prost_helpers::AnyPB)]
744#[derive(Clone, PartialEq, ::prost::Message)]
745pub struct GetMetaStoreInfoResponse {
746 #[prost(string, tag = "1")]
747 pub meta_store_endpoint: ::prost::alloc::string::String,
748}
749#[derive(prost_helpers::AnyPB)]
751#[derive(Clone, PartialEq, ::prost::Message)]
752pub struct SubscribeRequest {
753 #[prost(enumeration = "SubscribeType", tag = "1")]
754 pub subscribe_type: i32,
755 #[prost(message, optional, tag = "2")]
756 pub host: ::core::option::Option<super::common::HostAddress>,
757 #[prost(uint32, tag = "3")]
758 pub worker_id: u32,
759}
760#[derive(prost_helpers::AnyPB)]
761#[derive(Clone, PartialEq, ::prost::Message)]
762pub struct MetaSnapshot {
763 #[prost(message, repeated, tag = "1")]
764 pub databases: ::prost::alloc::vec::Vec<super::catalog::Database>,
765 #[prost(message, repeated, tag = "2")]
766 pub schemas: ::prost::alloc::vec::Vec<super::catalog::Schema>,
767 #[prost(message, repeated, tag = "3")]
768 pub sources: ::prost::alloc::vec::Vec<super::catalog::Source>,
769 #[prost(message, repeated, tag = "4")]
770 pub sinks: ::prost::alloc::vec::Vec<super::catalog::Sink>,
771 #[prost(message, repeated, tag = "5")]
772 pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
773 #[prost(message, repeated, tag = "6")]
774 pub indexes: ::prost::alloc::vec::Vec<super::catalog::Index>,
775 #[prost(message, repeated, tag = "7")]
776 pub views: ::prost::alloc::vec::Vec<super::catalog::View>,
777 #[prost(message, repeated, tag = "15")]
778 pub functions: ::prost::alloc::vec::Vec<super::catalog::Function>,
779 #[prost(message, repeated, tag = "17")]
780 pub connections: ::prost::alloc::vec::Vec<super::catalog::Connection>,
781 #[prost(message, repeated, tag = "19")]
782 pub subscriptions: ::prost::alloc::vec::Vec<super::catalog::Subscription>,
783 #[prost(message, repeated, tag = "8")]
784 pub users: ::prost::alloc::vec::Vec<super::user::UserInfo>,
785 #[prost(message, optional, tag = "20")]
786 pub session_params: ::core::option::Option<GetSessionParamsResponse>,
787 #[prost(message, repeated, tag = "23")]
788 pub secrets: ::prost::alloc::vec::Vec<super::catalog::Secret>,
789 #[prost(uint64, tag = "24")]
790 pub compute_node_total_cpu_count: u64,
791 #[prost(message, repeated, tag = "10")]
792 pub nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
793 #[prost(message, optional, tag = "12")]
794 pub hummock_version: ::core::option::Option<super::hummock::HummockVersion>,
795 #[prost(message, optional, tag = "14")]
796 pub meta_backup_manifest_id: ::core::option::Option<
797 super::backup_service::MetaBackupManifestId,
798 >,
799 #[prost(message, optional, tag = "16")]
800 pub hummock_write_limits: ::core::option::Option<super::hummock::WriteLimits>,
801 #[prost(message, repeated, tag = "21")]
803 pub streaming_worker_slot_mappings: ::prost::alloc::vec::Vec<
804 FragmentWorkerSlotMapping,
805 >,
806 #[prost(message, repeated, tag = "22")]
807 pub serving_worker_slot_mappings: ::prost::alloc::vec::Vec<
808 FragmentWorkerSlotMapping,
809 >,
810 #[prost(message, optional, tag = "13")]
811 pub version: ::core::option::Option<meta_snapshot::SnapshotVersion>,
812}
813pub mod meta_snapshot {
815 #[derive(prost_helpers::AnyPB)]
816 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
817 pub struct SnapshotVersion {
818 #[prost(uint64, tag = "1")]
819 pub catalog_version: u64,
820 #[prost(uint64, tag = "3")]
821 pub worker_node_version: u64,
822 #[prost(uint64, tag = "4")]
823 pub streaming_worker_slot_mapping_version: u64,
824 }
825}
826#[derive(prost_helpers::AnyPB)]
827#[derive(Clone, PartialEq, ::prost::Message)]
828pub struct Object {
829 #[prost(oneof = "object::ObjectInfo", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
830 pub object_info: ::core::option::Option<object::ObjectInfo>,
831}
832pub mod object {
834 #[derive(prost_helpers::AnyPB)]
835 #[derive(Clone, PartialEq, ::prost::Oneof)]
836 pub enum ObjectInfo {
837 #[prost(message, tag = "1")]
838 Database(super::super::catalog::Database),
839 #[prost(message, tag = "2")]
840 Schema(super::super::catalog::Schema),
841 #[prost(message, tag = "3")]
842 Table(super::super::catalog::Table),
843 #[prost(message, tag = "4")]
844 Index(super::super::catalog::Index),
845 #[prost(message, tag = "5")]
846 Source(super::super::catalog::Source),
847 #[prost(message, tag = "6")]
848 Sink(super::super::catalog::Sink),
849 #[prost(message, tag = "7")]
850 View(super::super::catalog::View),
851 #[prost(message, tag = "8")]
852 Function(super::super::catalog::Function),
853 #[prost(message, tag = "9")]
854 Connection(super::super::catalog::Connection),
855 #[prost(message, tag = "10")]
856 Subscription(super::super::catalog::Subscription),
857 #[prost(message, tag = "11")]
858 Secret(super::super::catalog::Secret),
859 }
860}
861#[derive(prost_helpers::AnyPB)]
862#[derive(Clone, PartialEq, ::prost::Message)]
863pub struct ObjectGroup {
864 #[prost(message, repeated, tag = "1")]
865 pub objects: ::prost::alloc::vec::Vec<Object>,
866}
867#[derive(prost_helpers::AnyPB)]
868#[derive(Clone, Copy, PartialEq, ::prost::Message)]
869pub struct Recovery {}
870#[derive(prost_helpers::AnyPB)]
871#[derive(Clone, PartialEq, ::prost::Message)]
872pub struct SubscribeResponse {
873 #[prost(message, optional, tag = "1")]
874 pub status: ::core::option::Option<super::common::Status>,
875 #[prost(enumeration = "subscribe_response::Operation", tag = "2")]
876 pub operation: i32,
877 #[prost(uint64, tag = "3")]
879 pub version: u64,
880 #[prost(
881 oneof = "subscribe_response::Info",
882 tags = "4, 5, 6, 11, 26, 13, 15, 16, 17, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30"
883 )]
884 pub info: ::core::option::Option<subscribe_response::Info>,
885}
886pub mod subscribe_response {
888 #[derive(prost_helpers::AnyPB)]
889 #[derive(
890 Clone,
891 Copy,
892 Debug,
893 PartialEq,
894 Eq,
895 Hash,
896 PartialOrd,
897 Ord,
898 ::prost::Enumeration
899 )]
900 #[repr(i32)]
901 pub enum Operation {
902 Unspecified = 0,
903 Add = 1,
904 Delete = 2,
905 Update = 3,
906 Snapshot = 4,
907 }
908 impl Operation {
909 pub fn as_str_name(&self) -> &'static str {
914 match self {
915 Self::Unspecified => "UNSPECIFIED",
916 Self::Add => "ADD",
917 Self::Delete => "DELETE",
918 Self::Update => "UPDATE",
919 Self::Snapshot => "SNAPSHOT",
920 }
921 }
922 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
924 match value {
925 "UNSPECIFIED" => Some(Self::Unspecified),
926 "ADD" => Some(Self::Add),
927 "DELETE" => Some(Self::Delete),
928 "UPDATE" => Some(Self::Update),
929 "SNAPSHOT" => Some(Self::Snapshot),
930 _ => None,
931 }
932 }
933 }
934 #[derive(prost_helpers::AnyPB)]
935 #[derive(Clone, PartialEq, ::prost::Oneof)]
936 pub enum Info {
937 #[prost(message, tag = "4")]
938 Database(super::super::catalog::Database),
939 #[prost(message, tag = "5")]
940 Schema(super::super::catalog::Schema),
941 #[prost(message, tag = "6")]
942 Function(super::super::catalog::Function),
943 #[prost(message, tag = "11")]
944 User(super::super::user::UserInfo),
945 #[prost(message, tag = "26")]
946 SessionParam(super::SetSessionParamRequest),
947 #[prost(message, tag = "13")]
948 Node(super::super::common::WorkerNode),
949 #[prost(message, tag = "15")]
950 HummockVersionDeltas(super::super::hummock::HummockVersionDeltas),
951 #[prost(message, tag = "16")]
952 Snapshot(super::MetaSnapshot),
953 #[prost(message, tag = "17")]
954 MetaBackupManifestId(super::super::backup_service::MetaBackupManifestId),
955 #[prost(message, tag = "19")]
956 SystemParams(super::SystemParams),
957 #[prost(message, tag = "20")]
958 HummockWriteLimits(super::super::hummock::WriteLimits),
959 #[prost(message, tag = "21")]
960 ObjectGroup(super::ObjectGroup),
961 #[prost(message, tag = "22")]
962 Connection(super::super::catalog::Connection),
963 #[prost(message, tag = "24")]
964 HummockStats(super::super::hummock::HummockVersionStats),
965 #[prost(message, tag = "25")]
966 Recovery(super::Recovery),
967 #[prost(message, tag = "27")]
968 StreamingWorkerSlotMapping(super::FragmentWorkerSlotMapping),
969 #[prost(message, tag = "28")]
970 ServingWorkerSlotMappings(super::FragmentWorkerSlotMappings),
971 #[prost(message, tag = "29")]
972 Secret(super::super::catalog::Secret),
973 #[prost(uint64, tag = "30")]
974 ComputeNodeTotalCpuCount(u64),
975 }
976}
977#[derive(prost_helpers::AnyPB)]
978#[derive(Clone, Copy, PartialEq, ::prost::Message)]
979pub struct GetClusterInfoRequest {}
980#[derive(prost_helpers::AnyPB)]
981#[derive(Clone, PartialEq, ::prost::Message)]
982pub struct GetClusterInfoResponse {
983 #[prost(message, repeated, tag = "1")]
984 pub worker_nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
985 #[prost(message, repeated, tag = "2")]
986 pub table_fragments: ::prost::alloc::vec::Vec<TableFragments>,
987 #[prost(map = "uint32, message", tag = "3")]
989 pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
990 #[prost(map = "uint32, message", tag = "4")]
991 pub source_infos: ::std::collections::HashMap<u32, super::catalog::Source>,
992 #[prost(uint64, tag = "5")]
993 pub revision: u64,
994}
995#[derive(prost_helpers::AnyPB)]
998#[derive(Clone, PartialEq, ::prost::Message)]
999pub struct WorkerReschedule {
1000 #[prost(map = "uint32, int32", tag = "1")]
1002 pub worker_actor_diff: ::std::collections::HashMap<u32, i32>,
1003}
1004#[derive(prost_helpers::AnyPB)]
1005#[derive(Clone, PartialEq, ::prost::Message)]
1006pub struct RescheduleRequest {
1007 #[prost(uint64, tag = "2")]
1008 pub revision: u64,
1009 #[prost(bool, tag = "3")]
1010 pub resolve_no_shuffle_upstream: bool,
1011 #[prost(map = "uint32, message", tag = "4")]
1012 pub worker_reschedules: ::std::collections::HashMap<u32, WorkerReschedule>,
1013}
1014#[derive(prost_helpers::AnyPB)]
1015#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1016pub struct RescheduleResponse {
1017 #[prost(bool, tag = "1")]
1018 pub success: bool,
1019 #[prost(uint64, tag = "2")]
1020 pub revision: u64,
1021}
1022#[derive(prost_helpers::AnyPB)]
1023#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1024pub struct TableParallelism {
1025 #[prost(oneof = "table_parallelism::Parallelism", tags = "1, 2, 3, 4")]
1026 pub parallelism: ::core::option::Option<table_parallelism::Parallelism>,
1027}
1028pub mod table_parallelism {
1030 #[derive(prost_helpers::AnyPB)]
1031 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1032 pub struct FixedParallelism {
1033 #[prost(uint32, tag = "1")]
1034 pub parallelism: u32,
1035 }
1036 #[derive(prost_helpers::AnyPB)]
1038 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1039 pub struct AutoParallelism {}
1040 #[derive(prost_helpers::AnyPB)]
1041 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1042 pub struct AdaptiveParallelism {}
1043 #[derive(prost_helpers::AnyPB)]
1044 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1045 pub struct CustomParallelism {}
1046 #[derive(prost_helpers::AnyPB)]
1047 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1048 pub enum Parallelism {
1049 #[prost(message, tag = "1")]
1050 Fixed(FixedParallelism),
1051 #[prost(message, tag = "2")]
1052 Auto(AutoParallelism),
1053 #[prost(message, tag = "3")]
1054 Custom(CustomParallelism),
1055 #[prost(message, tag = "4")]
1056 Adaptive(AdaptiveParallelism),
1057 }
1058}
1059#[derive(prost_helpers::AnyPB)]
1062#[derive(Clone, PartialEq, ::prost::Message)]
1063pub struct UpdateStreamingJobNodeLabelsRequest {
1064 #[prost(uint32, tag = "1")]
1066 pub id: u32,
1067 #[prost(string, tag = "2")]
1069 pub node_label: ::prost::alloc::string::String,
1070}
1071#[derive(prost_helpers::AnyPB)]
1073#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1074pub struct UpdateStreamingJobNodeLabelsResponse {}
1075#[derive(prost_helpers::AnyPB)]
1076#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1077pub struct GetServerlessStreamingJobsStatusRequest {}
1078#[derive(prost_helpers::AnyPB)]
1080#[derive(Clone, PartialEq, ::prost::Message)]
1081pub struct GetServerlessStreamingJobsStatusResponse {
1082 #[prost(message, repeated, tag = "1")]
1083 pub streaming_job_statuses: ::prost::alloc::vec::Vec<
1084 get_serverless_streaming_jobs_status_response::Status,
1085 >,
1086}
1087pub mod get_serverless_streaming_jobs_status_response {
1089 #[derive(prost_helpers::AnyPB)]
1090 #[derive(Clone, PartialEq, ::prost::Message)]
1091 pub struct Status {
1092 #[prost(uint32, tag = "1")]
1093 pub table_id: u32,
1094 #[prost(string, tag = "2")]
1095 pub node_label: ::prost::alloc::string::String,
1096 #[prost(bool, tag = "3")]
1097 pub backfill_done: bool,
1098 }
1099}
1100#[derive(prost_helpers::AnyPB)]
1101#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1102pub struct MembersRequest {}
1103#[derive(prost_helpers::AnyPB)]
1104#[derive(Clone, PartialEq, ::prost::Message)]
1105pub struct MetaMember {
1106 #[prost(message, optional, tag = "1")]
1107 pub address: ::core::option::Option<super::common::HostAddress>,
1108 #[prost(bool, tag = "2")]
1109 pub is_leader: bool,
1110}
1111#[derive(prost_helpers::AnyPB)]
1112#[derive(Clone, PartialEq, ::prost::Message)]
1113pub struct MembersResponse {
1114 #[prost(message, repeated, tag = "1")]
1115 pub members: ::prost::alloc::vec::Vec<MetaMember>,
1116}
1117#[derive(prost_helpers::AnyPB)]
1123#[derive(Clone, PartialEq, ::prost::Message)]
1124#[prost(skip_debug)]
1125pub struct SystemParams {
1126 #[prost(uint32, optional, tag = "1")]
1127 pub barrier_interval_ms: ::core::option::Option<u32>,
1128 #[prost(uint64, optional, tag = "2")]
1129 pub checkpoint_frequency: ::core::option::Option<u64>,
1130 #[prost(uint32, optional, tag = "3")]
1131 pub sstable_size_mb: ::core::option::Option<u32>,
1132 #[prost(uint32, optional, tag = "4")]
1133 pub block_size_kb: ::core::option::Option<u32>,
1134 #[prost(double, optional, tag = "5")]
1135 pub bloom_false_positive: ::core::option::Option<f64>,
1136 #[prost(string, optional, tag = "6")]
1137 pub state_store: ::core::option::Option<::prost::alloc::string::String>,
1138 #[prost(string, optional, tag = "7")]
1139 pub data_directory: ::core::option::Option<::prost::alloc::string::String>,
1140 #[prost(string, optional, tag = "8")]
1141 pub backup_storage_url: ::core::option::Option<::prost::alloc::string::String>,
1142 #[prost(string, optional, tag = "9")]
1143 pub backup_storage_directory: ::core::option::Option<::prost::alloc::string::String>,
1144 #[deprecated]
1146 #[prost(bool, optional, tag = "10")]
1147 pub telemetry_enabled: ::core::option::Option<bool>,
1148 #[prost(uint32, optional, tag = "11")]
1149 pub parallel_compact_size_mb: ::core::option::Option<u32>,
1150 #[prost(uint32, optional, tag = "12")]
1151 pub max_concurrent_creating_streaming_jobs: ::core::option::Option<u32>,
1152 #[prost(bool, optional, tag = "13")]
1153 pub pause_on_next_bootstrap: ::core::option::Option<bool>,
1154 #[deprecated]
1155 #[prost(string, optional, tag = "14")]
1156 pub wasm_storage_url: ::core::option::Option<::prost::alloc::string::String>,
1157 #[prost(bool, optional, tag = "15")]
1158 pub enable_tracing: ::core::option::Option<bool>,
1159 #[prost(bool, optional, tag = "16")]
1160 pub use_new_object_prefix_strategy: ::core::option::Option<bool>,
1161 #[prost(string, optional, tag = "17")]
1162 pub license_key: ::core::option::Option<::prost::alloc::string::String>,
1163 #[prost(uint64, optional, tag = "18")]
1164 pub time_travel_retention_ms: ::core::option::Option<u64>,
1165 #[prost(string, optional, tag = "19")]
1166 pub adaptive_parallelism_strategy: ::core::option::Option<
1167 ::prost::alloc::string::String,
1168 >,
1169 #[prost(bool, optional, tag = "20")]
1170 pub per_database_isolation: ::core::option::Option<bool>,
1171}
1172#[derive(prost_helpers::AnyPB)]
1173#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1174pub struct GetSystemParamsRequest {}
1175#[derive(prost_helpers::AnyPB)]
1176#[derive(Clone, PartialEq, ::prost::Message)]
1177pub struct GetSystemParamsResponse {
1178 #[prost(message, optional, tag = "1")]
1179 pub params: ::core::option::Option<SystemParams>,
1180}
1181#[derive(prost_helpers::AnyPB)]
1182#[derive(Clone, PartialEq, ::prost::Message)]
1183pub struct SetSystemParamRequest {
1184 #[prost(string, tag = "1")]
1185 pub param: ::prost::alloc::string::String,
1186 #[prost(string, optional, tag = "2")]
1188 pub value: ::core::option::Option<::prost::alloc::string::String>,
1189}
1190#[derive(prost_helpers::AnyPB)]
1191#[derive(Clone, PartialEq, ::prost::Message)]
1192pub struct SetSystemParamResponse {
1193 #[prost(message, optional, tag = "1")]
1194 pub params: ::core::option::Option<SystemParams>,
1195}
1196#[derive(prost_helpers::AnyPB)]
1197#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1198pub struct GetSessionParamsRequest {}
1199#[derive(prost_helpers::AnyPB)]
1200#[derive(Clone, PartialEq, ::prost::Message)]
1201pub struct GetSessionParamsResponse {
1202 #[prost(string, tag = "1")]
1203 pub params: ::prost::alloc::string::String,
1204}
1205#[derive(prost_helpers::AnyPB)]
1206#[derive(Clone, PartialEq, ::prost::Message)]
1207pub struct SetSessionParamRequest {
1208 #[prost(string, tag = "1")]
1209 pub param: ::prost::alloc::string::String,
1210 #[prost(string, optional, tag = "2")]
1212 pub value: ::core::option::Option<::prost::alloc::string::String>,
1213}
1214#[derive(prost_helpers::AnyPB)]
1215#[derive(Clone, PartialEq, ::prost::Message)]
1216pub struct SetSessionParamResponse {
1217 #[prost(string, tag = "1")]
1218 pub param: ::prost::alloc::string::String,
1219}
1220#[derive(prost_helpers::AnyPB)]
1221#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1222pub struct GetServingVnodeMappingsRequest {}
1223#[derive(prost_helpers::AnyPB)]
1224#[derive(Clone, PartialEq, ::prost::Message)]
1225pub struct GetServingVnodeMappingsResponse {
1226 #[prost(map = "uint32, uint32", tag = "2")]
1227 pub fragment_to_table: ::std::collections::HashMap<u32, u32>,
1228 #[prost(message, repeated, tag = "3")]
1229 pub worker_slot_mappings: ::prost::alloc::vec::Vec<FragmentWorkerSlotMapping>,
1230}
1231#[derive(prost_helpers::AnyPB)]
1232#[derive(Clone, PartialEq, ::prost::Message)]
1233pub struct EventLog {
1234 #[prost(string, optional, tag = "1")]
1236 pub unique_id: ::core::option::Option<::prost::alloc::string::String>,
1237 #[prost(uint64, optional, tag = "2")]
1239 pub timestamp: ::core::option::Option<u64>,
1240 #[prost(oneof = "event_log::Event", tags = "3, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
1241 pub event: ::core::option::Option<event_log::Event>,
1242}
1243pub mod event_log {
1245 #[derive(prost_helpers::AnyPB)]
1246 #[derive(Clone, PartialEq, ::prost::Message)]
1247 pub struct EventMetaNodeStart {
1248 #[prost(string, tag = "1")]
1249 pub advertise_addr: ::prost::alloc::string::String,
1250 #[prost(string, tag = "2")]
1251 pub listen_addr: ::prost::alloc::string::String,
1252 #[prost(string, tag = "3")]
1253 pub opts: ::prost::alloc::string::String,
1254 }
1255 #[derive(prost_helpers::AnyPB)]
1256 #[derive(Clone, PartialEq, ::prost::Message)]
1257 pub struct EventCreateStreamJobFail {
1258 #[prost(uint32, tag = "1")]
1259 pub id: u32,
1260 #[prost(string, tag = "2")]
1261 pub name: ::prost::alloc::string::String,
1262 #[prost(string, tag = "3")]
1263 pub definition: ::prost::alloc::string::String,
1264 #[prost(string, tag = "4")]
1265 pub error: ::prost::alloc::string::String,
1266 }
1267 #[derive(prost_helpers::AnyPB)]
1268 #[derive(Clone, PartialEq, ::prost::Message)]
1269 pub struct EventDirtyStreamJobClear {
1270 #[prost(uint32, tag = "1")]
1271 pub id: u32,
1272 #[prost(string, tag = "2")]
1273 pub name: ::prost::alloc::string::String,
1274 #[prost(string, tag = "3")]
1275 pub definition: ::prost::alloc::string::String,
1276 #[prost(string, tag = "4")]
1277 pub error: ::prost::alloc::string::String,
1278 }
1279 #[derive(prost_helpers::AnyPB)]
1280 #[derive(Clone, PartialEq, ::prost::Message)]
1281 pub struct EventBarrierComplete {
1282 #[prost(uint64, tag = "1")]
1283 pub prev_epoch: u64,
1284 #[prost(uint64, tag = "2")]
1285 pub cur_epoch: u64,
1286 #[prost(double, tag = "3")]
1287 pub duration_sec: f64,
1288 #[prost(string, tag = "4")]
1289 pub command: ::prost::alloc::string::String,
1290 #[prost(string, tag = "5")]
1291 pub barrier_kind: ::prost::alloc::string::String,
1292 }
1293 #[derive(prost_helpers::AnyPB)]
1294 #[derive(Clone, PartialEq, ::prost::Message)]
1295 pub struct EventInjectBarrierFail {
1296 #[prost(uint64, tag = "1")]
1297 pub prev_epoch: u64,
1298 #[prost(uint64, tag = "2")]
1299 pub cur_epoch: u64,
1300 #[prost(string, tag = "3")]
1301 pub error: ::prost::alloc::string::String,
1302 }
1303 #[derive(prost_helpers::AnyPB)]
1304 #[derive(Clone, PartialEq, ::prost::Message)]
1305 pub struct EventCollectBarrierFail {
1306 #[prost(string, tag = "3")]
1307 pub error: ::prost::alloc::string::String,
1308 }
1309 #[derive(prost_helpers::AnyPB)]
1310 #[derive(Clone, PartialEq, ::prost::Message)]
1311 pub struct EventWorkerNodePanic {
1312 #[prost(uint32, tag = "1")]
1313 pub worker_id: u32,
1314 #[prost(enumeration = "super::super::common::WorkerType", tag = "2")]
1315 pub worker_type: i32,
1316 #[prost(message, optional, tag = "3")]
1317 pub host_addr: ::core::option::Option<super::super::common::HostAddress>,
1318 #[prost(string, tag = "4")]
1319 pub panic_info: ::prost::alloc::string::String,
1320 }
1321 #[derive(prost_helpers::AnyPB)]
1322 #[derive(Clone, PartialEq, ::prost::Message)]
1323 pub struct EventAutoSchemaChangeFail {
1324 #[prost(uint32, tag = "1")]
1325 pub table_id: u32,
1326 #[prost(string, tag = "2")]
1327 pub table_name: ::prost::alloc::string::String,
1328 #[prost(string, tag = "3")]
1329 pub cdc_table_id: ::prost::alloc::string::String,
1330 #[prost(string, tag = "4")]
1331 pub upstream_ddl: ::prost::alloc::string::String,
1332 }
1333 #[derive(prost_helpers::AnyPB)]
1334 #[derive(Clone, PartialEq, ::prost::Message)]
1335 pub struct EventSinkFail {
1336 #[prost(uint32, tag = "1")]
1337 pub sink_id: u32,
1338 #[prost(string, tag = "2")]
1339 pub sink_name: ::prost::alloc::string::String,
1340 #[prost(string, tag = "3")]
1341 pub connector: ::prost::alloc::string::String,
1342 #[prost(string, tag = "4")]
1343 pub error: ::prost::alloc::string::String,
1344 }
1345 #[derive(prost_helpers::AnyPB)]
1346 #[derive(Clone, PartialEq, ::prost::Message)]
1347 pub struct EventRecovery {
1348 #[prost(oneof = "event_recovery::RecoveryEvent", tags = "1, 2, 3, 4, 5, 6")]
1349 pub recovery_event: ::core::option::Option<event_recovery::RecoveryEvent>,
1350 }
1351 pub mod event_recovery {
1353 #[derive(prost_helpers::AnyPB)]
1354 #[derive(Clone, PartialEq, ::prost::Message)]
1355 pub struct GlobalRecoveryStart {
1356 #[prost(string, tag = "1")]
1357 pub reason: ::prost::alloc::string::String,
1358 }
1359 #[derive(prost_helpers::AnyPB)]
1360 #[derive(Clone, PartialEq, ::prost::Message)]
1361 pub struct GlobalRecoverySuccess {
1362 #[prost(string, tag = "1")]
1363 pub reason: ::prost::alloc::string::String,
1364 #[prost(float, tag = "2")]
1365 pub duration_secs: f32,
1366 #[prost(uint32, repeated, tag = "3")]
1367 pub running_database_ids: ::prost::alloc::vec::Vec<u32>,
1368 #[prost(uint32, repeated, tag = "4")]
1369 pub recovering_database_ids: ::prost::alloc::vec::Vec<u32>,
1370 }
1371 #[derive(prost_helpers::AnyPB)]
1372 #[derive(Clone, PartialEq, ::prost::Message)]
1373 pub struct GlobalRecoveryFailure {
1374 #[prost(string, tag = "1")]
1375 pub reason: ::prost::alloc::string::String,
1376 #[prost(string, tag = "2")]
1377 pub error: ::prost::alloc::string::String,
1378 }
1379 #[derive(prost_helpers::AnyPB)]
1380 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1381 pub struct DatabaseRecoveryStart {
1382 #[prost(uint32, tag = "1")]
1383 pub database_id: u32,
1384 }
1385 #[derive(prost_helpers::AnyPB)]
1386 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1387 pub struct DatabaseRecoveryFailure {
1388 #[prost(uint32, tag = "1")]
1389 pub database_id: u32,
1390 }
1391 #[derive(prost_helpers::AnyPB)]
1392 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1393 pub struct DatabaseRecoverySuccess {
1394 #[prost(uint32, tag = "1")]
1395 pub database_id: u32,
1396 }
1397 #[derive(prost_helpers::AnyPB)]
1398 #[derive(Clone, PartialEq, ::prost::Oneof)]
1399 pub enum RecoveryEvent {
1400 #[prost(message, tag = "1")]
1401 GlobalStart(GlobalRecoveryStart),
1402 #[prost(message, tag = "2")]
1403 GlobalSuccess(GlobalRecoverySuccess),
1404 #[prost(message, tag = "3")]
1405 GlobalFailure(GlobalRecoveryFailure),
1406 #[prost(message, tag = "4")]
1407 DatabaseStart(DatabaseRecoveryStart),
1408 #[prost(message, tag = "5")]
1409 DatabaseFailure(DatabaseRecoveryFailure),
1410 #[prost(message, tag = "6")]
1411 DatabaseSuccess(DatabaseRecoverySuccess),
1412 }
1413 }
1414 #[derive(prost_helpers::AnyPB)]
1415 #[derive(Clone, PartialEq, ::prost::Oneof)]
1416 pub enum Event {
1417 #[prost(message, tag = "3")]
1418 CreateStreamJobFail(EventCreateStreamJobFail),
1419 #[prost(message, tag = "4")]
1420 DirtyStreamJobClear(EventDirtyStreamJobClear),
1421 #[prost(message, tag = "5")]
1422 MetaNodeStart(EventMetaNodeStart),
1423 #[prost(message, tag = "6")]
1424 BarrierComplete(EventBarrierComplete),
1425 #[prost(message, tag = "7")]
1426 InjectBarrierFail(EventInjectBarrierFail),
1427 #[prost(message, tag = "8")]
1428 CollectBarrierFail(EventCollectBarrierFail),
1429 #[prost(message, tag = "9")]
1430 WorkerNodePanic(EventWorkerNodePanic),
1431 #[prost(message, tag = "10")]
1432 AutoSchemaChangeFail(EventAutoSchemaChangeFail),
1433 #[prost(message, tag = "11")]
1434 SinkFail(EventSinkFail),
1435 #[prost(message, tag = "12")]
1436 Recovery(EventRecovery),
1437 }
1438}
1439#[derive(prost_helpers::AnyPB)]
1440#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1441pub struct ListEventLogRequest {}
1442#[derive(prost_helpers::AnyPB)]
1443#[derive(Clone, PartialEq, ::prost::Message)]
1444pub struct ListEventLogResponse {
1445 #[prost(message, repeated, tag = "1")]
1446 pub event_logs: ::prost::alloc::vec::Vec<EventLog>,
1447}
1448#[derive(prost_helpers::AnyPB)]
1449#[derive(Clone, PartialEq, ::prost::Message)]
1450pub struct AddEventLogRequest {
1451 #[prost(oneof = "add_event_log_request::Event", tags = "1, 2")]
1453 pub event: ::core::option::Option<add_event_log_request::Event>,
1454}
1455pub mod add_event_log_request {
1457 #[derive(prost_helpers::AnyPB)]
1459 #[derive(Clone, PartialEq, ::prost::Oneof)]
1460 pub enum Event {
1461 #[prost(message, tag = "1")]
1462 WorkerNodePanic(super::event_log::EventWorkerNodePanic),
1463 #[prost(message, tag = "2")]
1464 SinkFail(super::event_log::EventSinkFail),
1465 }
1466}
1467#[derive(prost_helpers::AnyPB)]
1468#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1469pub struct AddEventLogResponse {}
1470#[derive(prost_helpers::AnyPB)]
1471#[derive(Clone, PartialEq, ::prost::Message)]
1472pub struct ActorIds {
1473 #[prost(uint32, repeated, tag = "1")]
1474 pub ids: ::prost::alloc::vec::Vec<u32>,
1475}
1476#[derive(prost_helpers::AnyPB)]
1477#[derive(Clone, PartialEq, ::prost::Message)]
1478pub struct FragmentIdToActorIdMap {
1479 #[prost(map = "uint32, message", tag = "1")]
1480 pub map: ::std::collections::HashMap<u32, ActorIds>,
1481}
1482#[derive(prost_helpers::AnyPB)]
1487#[derive(Clone, PartialEq, ::prost::Message)]
1488pub struct RelationIdInfos {
1489 #[prost(map = "uint32, message", tag = "1")]
1491 pub map: ::std::collections::HashMap<u32, FragmentIdToActorIdMap>,
1492}
1493#[derive(prost_helpers::AnyPB)]
1494#[derive(Clone, PartialEq, ::prost::Message)]
1495pub struct FragmentToRelationMap {
1496 #[prost(map = "uint32, uint32", tag = "1")]
1498 pub in_map: ::std::collections::HashMap<u32, u32>,
1499 #[prost(map = "uint32, uint32", tag = "2")]
1501 pub out_map: ::std::collections::HashMap<u32, u32>,
1502}
1503#[derive(prost_helpers::AnyPB)]
1504#[derive(Clone, PartialEq, ::prost::Message)]
1505pub struct ActorCountPerParallelism {
1506 #[prost(map = "uint32, message", tag = "1")]
1507 pub worker_id_to_actor_count: ::std::collections::HashMap<
1508 u32,
1509 actor_count_per_parallelism::WorkerActorCount,
1510 >,
1511 #[prost(uint64, tag = "2")]
1512 pub hard_limit: u64,
1513 #[prost(uint64, tag = "3")]
1514 pub soft_limit: u64,
1515}
1516pub mod actor_count_per_parallelism {
1518 #[derive(prost_helpers::AnyPB)]
1519 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1520 pub struct WorkerActorCount {
1521 #[prost(uint64, tag = "1")]
1522 pub actor_count: u64,
1523 #[prost(uint64, tag = "2")]
1524 pub parallelism: u64,
1525 }
1526}
1527#[derive(prost_helpers::AnyPB)]
1528#[derive(Clone, PartialEq, ::prost::Message)]
1529pub struct ClusterLimit {
1530 #[prost(oneof = "cluster_limit::Limit", tags = "1")]
1531 pub limit: ::core::option::Option<cluster_limit::Limit>,
1532}
1533pub mod cluster_limit {
1535 #[derive(prost_helpers::AnyPB)]
1536 #[derive(Clone, PartialEq, ::prost::Oneof)]
1537 pub enum Limit {
1538 #[prost(message, tag = "1")]
1540 ActorCount(super::ActorCountPerParallelism),
1541 }
1542}
1543#[derive(prost_helpers::AnyPB)]
1544#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1545pub struct GetClusterLimitsRequest {}
1546#[derive(prost_helpers::AnyPB)]
1547#[derive(Clone, PartialEq, ::prost::Message)]
1548pub struct GetClusterLimitsResponse {
1549 #[prost(message, repeated, tag = "1")]
1550 pub active_limits: ::prost::alloc::vec::Vec<ClusterLimit>,
1551}
1552#[derive(prost_helpers::AnyPB)]
1553#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1554pub struct ListRateLimitsRequest {}
1555#[derive(prost_helpers::AnyPB)]
1556#[derive(Clone, PartialEq, ::prost::Message)]
1557pub struct ListRateLimitsResponse {
1558 #[prost(message, repeated, tag = "1")]
1559 pub rate_limits: ::prost::alloc::vec::Vec<list_rate_limits_response::RateLimitInfo>,
1560}
1561pub mod list_rate_limits_response {
1563 #[derive(prost_helpers::AnyPB)]
1564 #[derive(Clone, PartialEq, ::prost::Message)]
1565 pub struct RateLimitInfo {
1566 #[prost(uint32, tag = "1")]
1567 pub fragment_id: u32,
1568 #[prost(uint32, tag = "2")]
1569 pub job_id: u32,
1570 #[prost(uint32, tag = "3")]
1571 pub fragment_type_mask: u32,
1572 #[prost(uint32, tag = "4")]
1573 pub rate_limit: u32,
1574 #[prost(string, tag = "5")]
1575 pub node_name: ::prost::alloc::string::String,
1576 }
1577}
1578#[derive(prost_helpers::AnyPB)]
1579#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1580#[repr(i32)]
1581pub enum ThrottleTarget {
1582 Unspecified = 0,
1583 Source = 1,
1584 Mv = 2,
1585 TableWithSource = 3,
1586 CdcTable = 4,
1587 TableDml = 5,
1588 Sink = 6,
1589 Fragment = 7,
1590}
1591impl ThrottleTarget {
1592 pub fn as_str_name(&self) -> &'static str {
1597 match self {
1598 Self::Unspecified => "THROTTLE_TARGET_UNSPECIFIED",
1599 Self::Source => "SOURCE",
1600 Self::Mv => "MV",
1601 Self::TableWithSource => "TABLE_WITH_SOURCE",
1602 Self::CdcTable => "CDC_TABLE",
1603 Self::TableDml => "TABLE_DML",
1604 Self::Sink => "SINK",
1605 Self::Fragment => "FRAGMENT",
1606 }
1607 }
1608 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1610 match value {
1611 "THROTTLE_TARGET_UNSPECIFIED" => Some(Self::Unspecified),
1612 "SOURCE" => Some(Self::Source),
1613 "MV" => Some(Self::Mv),
1614 "TABLE_WITH_SOURCE" => Some(Self::TableWithSource),
1615 "CDC_TABLE" => Some(Self::CdcTable),
1616 "TABLE_DML" => Some(Self::TableDml),
1617 "SINK" => Some(Self::Sink),
1618 "FRAGMENT" => Some(Self::Fragment),
1619 _ => None,
1620 }
1621 }
1622}
1623#[derive(prost_helpers::AnyPB)]
1624#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1625#[repr(i32)]
1626pub enum RecoveryStatus {
1627 StatusUnspecified = 0,
1628 StatusStarting = 1,
1629 StatusRecovering = 2,
1630 StatusRunning = 3,
1631}
1632impl RecoveryStatus {
1633 pub fn as_str_name(&self) -> &'static str {
1638 match self {
1639 Self::StatusUnspecified => "STATUS_UNSPECIFIED",
1640 Self::StatusStarting => "STATUS_STARTING",
1641 Self::StatusRecovering => "STATUS_RECOVERING",
1642 Self::StatusRunning => "STATUS_RUNNING",
1643 }
1644 }
1645 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1647 match value {
1648 "STATUS_UNSPECIFIED" => Some(Self::StatusUnspecified),
1649 "STATUS_STARTING" => Some(Self::StatusStarting),
1650 "STATUS_RECOVERING" => Some(Self::StatusRecovering),
1651 "STATUS_RUNNING" => Some(Self::StatusRunning),
1652 _ => None,
1653 }
1654 }
1655}
1656#[derive(prost_helpers::AnyPB)]
1657#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1658#[repr(i32)]
1659pub enum SubscribeType {
1660 Unspecified = 0,
1661 Frontend = 1,
1662 Hummock = 2,
1663 Compactor = 3,
1664 Compute = 4,
1665}
1666impl SubscribeType {
1667 pub fn as_str_name(&self) -> &'static str {
1672 match self {
1673 Self::Unspecified => "UNSPECIFIED",
1674 Self::Frontend => "FRONTEND",
1675 Self::Hummock => "HUMMOCK",
1676 Self::Compactor => "COMPACTOR",
1677 Self::Compute => "COMPUTE",
1678 }
1679 }
1680 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1682 match value {
1683 "UNSPECIFIED" => Some(Self::Unspecified),
1684 "FRONTEND" => Some(Self::Frontend),
1685 "HUMMOCK" => Some(Self::Hummock),
1686 "COMPACTOR" => Some(Self::Compactor),
1687 "COMPUTE" => Some(Self::Compute),
1688 _ => None,
1689 }
1690 }
1691}
1692pub mod telemetry_info_service_client {
1694 #![allow(
1695 unused_variables,
1696 dead_code,
1697 missing_docs,
1698 clippy::wildcard_imports,
1699 clippy::let_unit_value,
1700 )]
1701 use tonic::codegen::*;
1702 use tonic::codegen::http::Uri;
1703 #[derive(Debug, Clone)]
1704 pub struct TelemetryInfoServiceClient<T> {
1705 inner: tonic::client::Grpc<T>,
1706 }
1707 impl TelemetryInfoServiceClient<tonic::transport::Channel> {
1708 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1710 where
1711 D: TryInto<tonic::transport::Endpoint>,
1712 D::Error: Into<StdError>,
1713 {
1714 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1715 Ok(Self::new(conn))
1716 }
1717 }
1718 impl<T> TelemetryInfoServiceClient<T>
1719 where
1720 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1721 T::Error: Into<StdError>,
1722 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1723 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1724 {
1725 pub fn new(inner: T) -> Self {
1726 let inner = tonic::client::Grpc::new(inner);
1727 Self { inner }
1728 }
1729 pub fn with_origin(inner: T, origin: Uri) -> Self {
1730 let inner = tonic::client::Grpc::with_origin(inner, origin);
1731 Self { inner }
1732 }
1733 pub fn with_interceptor<F>(
1734 inner: T,
1735 interceptor: F,
1736 ) -> TelemetryInfoServiceClient<InterceptedService<T, F>>
1737 where
1738 F: tonic::service::Interceptor,
1739 T::ResponseBody: Default,
1740 T: tonic::codegen::Service<
1741 http::Request<tonic::body::BoxBody>,
1742 Response = http::Response<
1743 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1744 >,
1745 >,
1746 <T as tonic::codegen::Service<
1747 http::Request<tonic::body::BoxBody>,
1748 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1749 {
1750 TelemetryInfoServiceClient::new(InterceptedService::new(inner, interceptor))
1751 }
1752 #[must_use]
1757 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1758 self.inner = self.inner.send_compressed(encoding);
1759 self
1760 }
1761 #[must_use]
1763 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1764 self.inner = self.inner.accept_compressed(encoding);
1765 self
1766 }
1767 #[must_use]
1771 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1772 self.inner = self.inner.max_decoding_message_size(limit);
1773 self
1774 }
1775 #[must_use]
1779 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1780 self.inner = self.inner.max_encoding_message_size(limit);
1781 self
1782 }
1783 pub async fn get_telemetry_info(
1785 &mut self,
1786 request: impl tonic::IntoRequest<super::GetTelemetryInfoRequest>,
1787 ) -> std::result::Result<
1788 tonic::Response<super::TelemetryInfoResponse>,
1789 tonic::Status,
1790 > {
1791 self.inner
1792 .ready()
1793 .await
1794 .map_err(|e| {
1795 tonic::Status::unknown(
1796 format!("Service was not ready: {}", e.into()),
1797 )
1798 })?;
1799 let codec = tonic::codec::ProstCodec::default();
1800 let path = http::uri::PathAndQuery::from_static(
1801 "/meta.TelemetryInfoService/GetTelemetryInfo",
1802 );
1803 let mut req = request.into_request();
1804 req.extensions_mut()
1805 .insert(
1806 GrpcMethod::new("meta.TelemetryInfoService", "GetTelemetryInfo"),
1807 );
1808 self.inner.unary(req, path, codec).await
1809 }
1810 }
1811}
1812pub mod heartbeat_service_client {
1814 #![allow(
1815 unused_variables,
1816 dead_code,
1817 missing_docs,
1818 clippy::wildcard_imports,
1819 clippy::let_unit_value,
1820 )]
1821 use tonic::codegen::*;
1822 use tonic::codegen::http::Uri;
1823 #[derive(Debug, Clone)]
1824 pub struct HeartbeatServiceClient<T> {
1825 inner: tonic::client::Grpc<T>,
1826 }
1827 impl HeartbeatServiceClient<tonic::transport::Channel> {
1828 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1830 where
1831 D: TryInto<tonic::transport::Endpoint>,
1832 D::Error: Into<StdError>,
1833 {
1834 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1835 Ok(Self::new(conn))
1836 }
1837 }
1838 impl<T> HeartbeatServiceClient<T>
1839 where
1840 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1841 T::Error: Into<StdError>,
1842 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1843 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1844 {
1845 pub fn new(inner: T) -> Self {
1846 let inner = tonic::client::Grpc::new(inner);
1847 Self { inner }
1848 }
1849 pub fn with_origin(inner: T, origin: Uri) -> Self {
1850 let inner = tonic::client::Grpc::with_origin(inner, origin);
1851 Self { inner }
1852 }
1853 pub fn with_interceptor<F>(
1854 inner: T,
1855 interceptor: F,
1856 ) -> HeartbeatServiceClient<InterceptedService<T, F>>
1857 where
1858 F: tonic::service::Interceptor,
1859 T::ResponseBody: Default,
1860 T: tonic::codegen::Service<
1861 http::Request<tonic::body::BoxBody>,
1862 Response = http::Response<
1863 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1864 >,
1865 >,
1866 <T as tonic::codegen::Service<
1867 http::Request<tonic::body::BoxBody>,
1868 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1869 {
1870 HeartbeatServiceClient::new(InterceptedService::new(inner, interceptor))
1871 }
1872 #[must_use]
1877 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1878 self.inner = self.inner.send_compressed(encoding);
1879 self
1880 }
1881 #[must_use]
1883 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1884 self.inner = self.inner.accept_compressed(encoding);
1885 self
1886 }
1887 #[must_use]
1891 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1892 self.inner = self.inner.max_decoding_message_size(limit);
1893 self
1894 }
1895 #[must_use]
1899 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1900 self.inner = self.inner.max_encoding_message_size(limit);
1901 self
1902 }
1903 pub async fn heartbeat(
1904 &mut self,
1905 request: impl tonic::IntoRequest<super::HeartbeatRequest>,
1906 ) -> std::result::Result<
1907 tonic::Response<super::HeartbeatResponse>,
1908 tonic::Status,
1909 > {
1910 self.inner
1911 .ready()
1912 .await
1913 .map_err(|e| {
1914 tonic::Status::unknown(
1915 format!("Service was not ready: {}", e.into()),
1916 )
1917 })?;
1918 let codec = tonic::codec::ProstCodec::default();
1919 let path = http::uri::PathAndQuery::from_static(
1920 "/meta.HeartbeatService/Heartbeat",
1921 );
1922 let mut req = request.into_request();
1923 req.extensions_mut()
1924 .insert(GrpcMethod::new("meta.HeartbeatService", "Heartbeat"));
1925 self.inner.unary(req, path, codec).await
1926 }
1927 }
1928}
1929pub mod stream_manager_service_client {
1931 #![allow(
1932 unused_variables,
1933 dead_code,
1934 missing_docs,
1935 clippy::wildcard_imports,
1936 clippy::let_unit_value,
1937 )]
1938 use tonic::codegen::*;
1939 use tonic::codegen::http::Uri;
1940 #[derive(Debug, Clone)]
1941 pub struct StreamManagerServiceClient<T> {
1942 inner: tonic::client::Grpc<T>,
1943 }
1944 impl StreamManagerServiceClient<tonic::transport::Channel> {
1945 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1947 where
1948 D: TryInto<tonic::transport::Endpoint>,
1949 D::Error: Into<StdError>,
1950 {
1951 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1952 Ok(Self::new(conn))
1953 }
1954 }
1955 impl<T> StreamManagerServiceClient<T>
1956 where
1957 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1958 T::Error: Into<StdError>,
1959 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1960 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1961 {
1962 pub fn new(inner: T) -> Self {
1963 let inner = tonic::client::Grpc::new(inner);
1964 Self { inner }
1965 }
1966 pub fn with_origin(inner: T, origin: Uri) -> Self {
1967 let inner = tonic::client::Grpc::with_origin(inner, origin);
1968 Self { inner }
1969 }
1970 pub fn with_interceptor<F>(
1971 inner: T,
1972 interceptor: F,
1973 ) -> StreamManagerServiceClient<InterceptedService<T, F>>
1974 where
1975 F: tonic::service::Interceptor,
1976 T::ResponseBody: Default,
1977 T: tonic::codegen::Service<
1978 http::Request<tonic::body::BoxBody>,
1979 Response = http::Response<
1980 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1981 >,
1982 >,
1983 <T as tonic::codegen::Service<
1984 http::Request<tonic::body::BoxBody>,
1985 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1986 {
1987 StreamManagerServiceClient::new(InterceptedService::new(inner, interceptor))
1988 }
1989 #[must_use]
1994 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1995 self.inner = self.inner.send_compressed(encoding);
1996 self
1997 }
1998 #[must_use]
2000 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2001 self.inner = self.inner.accept_compressed(encoding);
2002 self
2003 }
2004 #[must_use]
2008 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2009 self.inner = self.inner.max_decoding_message_size(limit);
2010 self
2011 }
2012 #[must_use]
2016 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2017 self.inner = self.inner.max_encoding_message_size(limit);
2018 self
2019 }
2020 pub async fn flush(
2021 &mut self,
2022 request: impl tonic::IntoRequest<super::FlushRequest>,
2023 ) -> std::result::Result<tonic::Response<super::FlushResponse>, tonic::Status> {
2024 self.inner
2025 .ready()
2026 .await
2027 .map_err(|e| {
2028 tonic::Status::unknown(
2029 format!("Service was not ready: {}", e.into()),
2030 )
2031 })?;
2032 let codec = tonic::codec::ProstCodec::default();
2033 let path = http::uri::PathAndQuery::from_static(
2034 "/meta.StreamManagerService/Flush",
2035 );
2036 let mut req = request.into_request();
2037 req.extensions_mut()
2038 .insert(GrpcMethod::new("meta.StreamManagerService", "Flush"));
2039 self.inner.unary(req, path, codec).await
2040 }
2041 pub async fn pause(
2042 &mut self,
2043 request: impl tonic::IntoRequest<super::PauseRequest>,
2044 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status> {
2045 self.inner
2046 .ready()
2047 .await
2048 .map_err(|e| {
2049 tonic::Status::unknown(
2050 format!("Service was not ready: {}", e.into()),
2051 )
2052 })?;
2053 let codec = tonic::codec::ProstCodec::default();
2054 let path = http::uri::PathAndQuery::from_static(
2055 "/meta.StreamManagerService/Pause",
2056 );
2057 let mut req = request.into_request();
2058 req.extensions_mut()
2059 .insert(GrpcMethod::new("meta.StreamManagerService", "Pause"));
2060 self.inner.unary(req, path, codec).await
2061 }
2062 pub async fn resume(
2063 &mut self,
2064 request: impl tonic::IntoRequest<super::ResumeRequest>,
2065 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status> {
2066 self.inner
2067 .ready()
2068 .await
2069 .map_err(|e| {
2070 tonic::Status::unknown(
2071 format!("Service was not ready: {}", e.into()),
2072 )
2073 })?;
2074 let codec = tonic::codec::ProstCodec::default();
2075 let path = http::uri::PathAndQuery::from_static(
2076 "/meta.StreamManagerService/Resume",
2077 );
2078 let mut req = request.into_request();
2079 req.extensions_mut()
2080 .insert(GrpcMethod::new("meta.StreamManagerService", "Resume"));
2081 self.inner.unary(req, path, codec).await
2082 }
2083 pub async fn cancel_creating_jobs(
2084 &mut self,
2085 request: impl tonic::IntoRequest<super::CancelCreatingJobsRequest>,
2086 ) -> std::result::Result<
2087 tonic::Response<super::CancelCreatingJobsResponse>,
2088 tonic::Status,
2089 > {
2090 self.inner
2091 .ready()
2092 .await
2093 .map_err(|e| {
2094 tonic::Status::unknown(
2095 format!("Service was not ready: {}", e.into()),
2096 )
2097 })?;
2098 let codec = tonic::codec::ProstCodec::default();
2099 let path = http::uri::PathAndQuery::from_static(
2100 "/meta.StreamManagerService/CancelCreatingJobs",
2101 );
2102 let mut req = request.into_request();
2103 req.extensions_mut()
2104 .insert(
2105 GrpcMethod::new("meta.StreamManagerService", "CancelCreatingJobs"),
2106 );
2107 self.inner.unary(req, path, codec).await
2108 }
2109 pub async fn list_table_fragments(
2110 &mut self,
2111 request: impl tonic::IntoRequest<super::ListTableFragmentsRequest>,
2112 ) -> std::result::Result<
2113 tonic::Response<super::ListTableFragmentsResponse>,
2114 tonic::Status,
2115 > {
2116 self.inner
2117 .ready()
2118 .await
2119 .map_err(|e| {
2120 tonic::Status::unknown(
2121 format!("Service was not ready: {}", e.into()),
2122 )
2123 })?;
2124 let codec = tonic::codec::ProstCodec::default();
2125 let path = http::uri::PathAndQuery::from_static(
2126 "/meta.StreamManagerService/ListTableFragments",
2127 );
2128 let mut req = request.into_request();
2129 req.extensions_mut()
2130 .insert(
2131 GrpcMethod::new("meta.StreamManagerService", "ListTableFragments"),
2132 );
2133 self.inner.unary(req, path, codec).await
2134 }
2135 pub async fn list_streaming_job_states(
2136 &mut self,
2137 request: impl tonic::IntoRequest<super::ListStreamingJobStatesRequest>,
2138 ) -> std::result::Result<
2139 tonic::Response<super::ListStreamingJobStatesResponse>,
2140 tonic::Status,
2141 > {
2142 self.inner
2143 .ready()
2144 .await
2145 .map_err(|e| {
2146 tonic::Status::unknown(
2147 format!("Service was not ready: {}", e.into()),
2148 )
2149 })?;
2150 let codec = tonic::codec::ProstCodec::default();
2151 let path = http::uri::PathAndQuery::from_static(
2152 "/meta.StreamManagerService/ListStreamingJobStates",
2153 );
2154 let mut req = request.into_request();
2155 req.extensions_mut()
2156 .insert(
2157 GrpcMethod::new(
2158 "meta.StreamManagerService",
2159 "ListStreamingJobStates",
2160 ),
2161 );
2162 self.inner.unary(req, path, codec).await
2163 }
2164 pub async fn list_fragment_distribution(
2165 &mut self,
2166 request: impl tonic::IntoRequest<super::ListFragmentDistributionRequest>,
2167 ) -> std::result::Result<
2168 tonic::Response<super::ListFragmentDistributionResponse>,
2169 tonic::Status,
2170 > {
2171 self.inner
2172 .ready()
2173 .await
2174 .map_err(|e| {
2175 tonic::Status::unknown(
2176 format!("Service was not ready: {}", e.into()),
2177 )
2178 })?;
2179 let codec = tonic::codec::ProstCodec::default();
2180 let path = http::uri::PathAndQuery::from_static(
2181 "/meta.StreamManagerService/ListFragmentDistribution",
2182 );
2183 let mut req = request.into_request();
2184 req.extensions_mut()
2185 .insert(
2186 GrpcMethod::new(
2187 "meta.StreamManagerService",
2188 "ListFragmentDistribution",
2189 ),
2190 );
2191 self.inner.unary(req, path, codec).await
2192 }
2193 pub async fn list_actor_states(
2194 &mut self,
2195 request: impl tonic::IntoRequest<super::ListActorStatesRequest>,
2196 ) -> std::result::Result<
2197 tonic::Response<super::ListActorStatesResponse>,
2198 tonic::Status,
2199 > {
2200 self.inner
2201 .ready()
2202 .await
2203 .map_err(|e| {
2204 tonic::Status::unknown(
2205 format!("Service was not ready: {}", e.into()),
2206 )
2207 })?;
2208 let codec = tonic::codec::ProstCodec::default();
2209 let path = http::uri::PathAndQuery::from_static(
2210 "/meta.StreamManagerService/ListActorStates",
2211 );
2212 let mut req = request.into_request();
2213 req.extensions_mut()
2214 .insert(GrpcMethod::new("meta.StreamManagerService", "ListActorStates"));
2215 self.inner.unary(req, path, codec).await
2216 }
2217 pub async fn list_actor_splits(
2218 &mut self,
2219 request: impl tonic::IntoRequest<super::ListActorSplitsRequest>,
2220 ) -> std::result::Result<
2221 tonic::Response<super::ListActorSplitsResponse>,
2222 tonic::Status,
2223 > {
2224 self.inner
2225 .ready()
2226 .await
2227 .map_err(|e| {
2228 tonic::Status::unknown(
2229 format!("Service was not ready: {}", e.into()),
2230 )
2231 })?;
2232 let codec = tonic::codec::ProstCodec::default();
2233 let path = http::uri::PathAndQuery::from_static(
2234 "/meta.StreamManagerService/ListActorSplits",
2235 );
2236 let mut req = request.into_request();
2237 req.extensions_mut()
2238 .insert(GrpcMethod::new("meta.StreamManagerService", "ListActorSplits"));
2239 self.inner.unary(req, path, codec).await
2240 }
2241 pub async fn list_object_dependencies(
2242 &mut self,
2243 request: impl tonic::IntoRequest<super::ListObjectDependenciesRequest>,
2244 ) -> std::result::Result<
2245 tonic::Response<super::ListObjectDependenciesResponse>,
2246 tonic::Status,
2247 > {
2248 self.inner
2249 .ready()
2250 .await
2251 .map_err(|e| {
2252 tonic::Status::unknown(
2253 format!("Service was not ready: {}", e.into()),
2254 )
2255 })?;
2256 let codec = tonic::codec::ProstCodec::default();
2257 let path = http::uri::PathAndQuery::from_static(
2258 "/meta.StreamManagerService/ListObjectDependencies",
2259 );
2260 let mut req = request.into_request();
2261 req.extensions_mut()
2262 .insert(
2263 GrpcMethod::new(
2264 "meta.StreamManagerService",
2265 "ListObjectDependencies",
2266 ),
2267 );
2268 self.inner.unary(req, path, codec).await
2269 }
2270 pub async fn apply_throttle(
2271 &mut self,
2272 request: impl tonic::IntoRequest<super::ApplyThrottleRequest>,
2273 ) -> std::result::Result<
2274 tonic::Response<super::ApplyThrottleResponse>,
2275 tonic::Status,
2276 > {
2277 self.inner
2278 .ready()
2279 .await
2280 .map_err(|e| {
2281 tonic::Status::unknown(
2282 format!("Service was not ready: {}", e.into()),
2283 )
2284 })?;
2285 let codec = tonic::codec::ProstCodec::default();
2286 let path = http::uri::PathAndQuery::from_static(
2287 "/meta.StreamManagerService/ApplyThrottle",
2288 );
2289 let mut req = request.into_request();
2290 req.extensions_mut()
2291 .insert(GrpcMethod::new("meta.StreamManagerService", "ApplyThrottle"));
2292 self.inner.unary(req, path, codec).await
2293 }
2294 pub async fn recover(
2295 &mut self,
2296 request: impl tonic::IntoRequest<super::RecoverRequest>,
2297 ) -> std::result::Result<
2298 tonic::Response<super::RecoverResponse>,
2299 tonic::Status,
2300 > {
2301 self.inner
2302 .ready()
2303 .await
2304 .map_err(|e| {
2305 tonic::Status::unknown(
2306 format!("Service was not ready: {}", e.into()),
2307 )
2308 })?;
2309 let codec = tonic::codec::ProstCodec::default();
2310 let path = http::uri::PathAndQuery::from_static(
2311 "/meta.StreamManagerService/Recover",
2312 );
2313 let mut req = request.into_request();
2314 req.extensions_mut()
2315 .insert(GrpcMethod::new("meta.StreamManagerService", "Recover"));
2316 self.inner.unary(req, path, codec).await
2317 }
2318 pub async fn list_rate_limits(
2319 &mut self,
2320 request: impl tonic::IntoRequest<super::ListRateLimitsRequest>,
2321 ) -> std::result::Result<
2322 tonic::Response<super::ListRateLimitsResponse>,
2323 tonic::Status,
2324 > {
2325 self.inner
2326 .ready()
2327 .await
2328 .map_err(|e| {
2329 tonic::Status::unknown(
2330 format!("Service was not ready: {}", e.into()),
2331 )
2332 })?;
2333 let codec = tonic::codec::ProstCodec::default();
2334 let path = http::uri::PathAndQuery::from_static(
2335 "/meta.StreamManagerService/ListRateLimits",
2336 );
2337 let mut req = request.into_request();
2338 req.extensions_mut()
2339 .insert(GrpcMethod::new("meta.StreamManagerService", "ListRateLimits"));
2340 self.inner.unary(req, path, codec).await
2341 }
2342 }
2343}
2344pub mod cluster_service_client {
2346 #![allow(
2347 unused_variables,
2348 dead_code,
2349 missing_docs,
2350 clippy::wildcard_imports,
2351 clippy::let_unit_value,
2352 )]
2353 use tonic::codegen::*;
2354 use tonic::codegen::http::Uri;
2355 #[derive(Debug, Clone)]
2356 pub struct ClusterServiceClient<T> {
2357 inner: tonic::client::Grpc<T>,
2358 }
2359 impl ClusterServiceClient<tonic::transport::Channel> {
2360 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2362 where
2363 D: TryInto<tonic::transport::Endpoint>,
2364 D::Error: Into<StdError>,
2365 {
2366 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2367 Ok(Self::new(conn))
2368 }
2369 }
2370 impl<T> ClusterServiceClient<T>
2371 where
2372 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2373 T::Error: Into<StdError>,
2374 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2375 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2376 {
2377 pub fn new(inner: T) -> Self {
2378 let inner = tonic::client::Grpc::new(inner);
2379 Self { inner }
2380 }
2381 pub fn with_origin(inner: T, origin: Uri) -> Self {
2382 let inner = tonic::client::Grpc::with_origin(inner, origin);
2383 Self { inner }
2384 }
2385 pub fn with_interceptor<F>(
2386 inner: T,
2387 interceptor: F,
2388 ) -> ClusterServiceClient<InterceptedService<T, F>>
2389 where
2390 F: tonic::service::Interceptor,
2391 T::ResponseBody: Default,
2392 T: tonic::codegen::Service<
2393 http::Request<tonic::body::BoxBody>,
2394 Response = http::Response<
2395 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2396 >,
2397 >,
2398 <T as tonic::codegen::Service<
2399 http::Request<tonic::body::BoxBody>,
2400 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2401 {
2402 ClusterServiceClient::new(InterceptedService::new(inner, interceptor))
2403 }
2404 #[must_use]
2409 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2410 self.inner = self.inner.send_compressed(encoding);
2411 self
2412 }
2413 #[must_use]
2415 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2416 self.inner = self.inner.accept_compressed(encoding);
2417 self
2418 }
2419 #[must_use]
2423 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2424 self.inner = self.inner.max_decoding_message_size(limit);
2425 self
2426 }
2427 #[must_use]
2431 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2432 self.inner = self.inner.max_encoding_message_size(limit);
2433 self
2434 }
2435 pub async fn add_worker_node(
2436 &mut self,
2437 request: impl tonic::IntoRequest<super::AddWorkerNodeRequest>,
2438 ) -> std::result::Result<
2439 tonic::Response<super::AddWorkerNodeResponse>,
2440 tonic::Status,
2441 > {
2442 self.inner
2443 .ready()
2444 .await
2445 .map_err(|e| {
2446 tonic::Status::unknown(
2447 format!("Service was not ready: {}", e.into()),
2448 )
2449 })?;
2450 let codec = tonic::codec::ProstCodec::default();
2451 let path = http::uri::PathAndQuery::from_static(
2452 "/meta.ClusterService/AddWorkerNode",
2453 );
2454 let mut req = request.into_request();
2455 req.extensions_mut()
2456 .insert(GrpcMethod::new("meta.ClusterService", "AddWorkerNode"));
2457 self.inner.unary(req, path, codec).await
2458 }
2459 pub async fn activate_worker_node(
2460 &mut self,
2461 request: impl tonic::IntoRequest<super::ActivateWorkerNodeRequest>,
2462 ) -> std::result::Result<
2463 tonic::Response<super::ActivateWorkerNodeResponse>,
2464 tonic::Status,
2465 > {
2466 self.inner
2467 .ready()
2468 .await
2469 .map_err(|e| {
2470 tonic::Status::unknown(
2471 format!("Service was not ready: {}", e.into()),
2472 )
2473 })?;
2474 let codec = tonic::codec::ProstCodec::default();
2475 let path = http::uri::PathAndQuery::from_static(
2476 "/meta.ClusterService/ActivateWorkerNode",
2477 );
2478 let mut req = request.into_request();
2479 req.extensions_mut()
2480 .insert(GrpcMethod::new("meta.ClusterService", "ActivateWorkerNode"));
2481 self.inner.unary(req, path, codec).await
2482 }
2483 pub async fn delete_worker_node(
2484 &mut self,
2485 request: impl tonic::IntoRequest<super::DeleteWorkerNodeRequest>,
2486 ) -> std::result::Result<
2487 tonic::Response<super::DeleteWorkerNodeResponse>,
2488 tonic::Status,
2489 > {
2490 self.inner
2491 .ready()
2492 .await
2493 .map_err(|e| {
2494 tonic::Status::unknown(
2495 format!("Service was not ready: {}", e.into()),
2496 )
2497 })?;
2498 let codec = tonic::codec::ProstCodec::default();
2499 let path = http::uri::PathAndQuery::from_static(
2500 "/meta.ClusterService/DeleteWorkerNode",
2501 );
2502 let mut req = request.into_request();
2503 req.extensions_mut()
2504 .insert(GrpcMethod::new("meta.ClusterService", "DeleteWorkerNode"));
2505 self.inner.unary(req, path, codec).await
2506 }
2507 pub async fn update_worker_node_schedulability(
2508 &mut self,
2509 request: impl tonic::IntoRequest<
2510 super::UpdateWorkerNodeSchedulabilityRequest,
2511 >,
2512 ) -> std::result::Result<
2513 tonic::Response<super::UpdateWorkerNodeSchedulabilityResponse>,
2514 tonic::Status,
2515 > {
2516 self.inner
2517 .ready()
2518 .await
2519 .map_err(|e| {
2520 tonic::Status::unknown(
2521 format!("Service was not ready: {}", e.into()),
2522 )
2523 })?;
2524 let codec = tonic::codec::ProstCodec::default();
2525 let path = http::uri::PathAndQuery::from_static(
2526 "/meta.ClusterService/UpdateWorkerNodeSchedulability",
2527 );
2528 let mut req = request.into_request();
2529 req.extensions_mut()
2530 .insert(
2531 GrpcMethod::new(
2532 "meta.ClusterService",
2533 "UpdateWorkerNodeSchedulability",
2534 ),
2535 );
2536 self.inner.unary(req, path, codec).await
2537 }
2538 pub async fn list_all_nodes(
2539 &mut self,
2540 request: impl tonic::IntoRequest<super::ListAllNodesRequest>,
2541 ) -> std::result::Result<
2542 tonic::Response<super::ListAllNodesResponse>,
2543 tonic::Status,
2544 > {
2545 self.inner
2546 .ready()
2547 .await
2548 .map_err(|e| {
2549 tonic::Status::unknown(
2550 format!("Service was not ready: {}", e.into()),
2551 )
2552 })?;
2553 let codec = tonic::codec::ProstCodec::default();
2554 let path = http::uri::PathAndQuery::from_static(
2555 "/meta.ClusterService/ListAllNodes",
2556 );
2557 let mut req = request.into_request();
2558 req.extensions_mut()
2559 .insert(GrpcMethod::new("meta.ClusterService", "ListAllNodes"));
2560 self.inner.unary(req, path, codec).await
2561 }
2562 pub async fn get_cluster_recovery_status(
2563 &mut self,
2564 request: impl tonic::IntoRequest<super::GetClusterRecoveryStatusRequest>,
2565 ) -> std::result::Result<
2566 tonic::Response<super::GetClusterRecoveryStatusResponse>,
2567 tonic::Status,
2568 > {
2569 self.inner
2570 .ready()
2571 .await
2572 .map_err(|e| {
2573 tonic::Status::unknown(
2574 format!("Service was not ready: {}", e.into()),
2575 )
2576 })?;
2577 let codec = tonic::codec::ProstCodec::default();
2578 let path = http::uri::PathAndQuery::from_static(
2579 "/meta.ClusterService/GetClusterRecoveryStatus",
2580 );
2581 let mut req = request.into_request();
2582 req.extensions_mut()
2583 .insert(
2584 GrpcMethod::new("meta.ClusterService", "GetClusterRecoveryStatus"),
2585 );
2586 self.inner.unary(req, path, codec).await
2587 }
2588 pub async fn get_meta_store_info(
2589 &mut self,
2590 request: impl tonic::IntoRequest<super::GetMetaStoreInfoRequest>,
2591 ) -> std::result::Result<
2592 tonic::Response<super::GetMetaStoreInfoResponse>,
2593 tonic::Status,
2594 > {
2595 self.inner
2596 .ready()
2597 .await
2598 .map_err(|e| {
2599 tonic::Status::unknown(
2600 format!("Service was not ready: {}", e.into()),
2601 )
2602 })?;
2603 let codec = tonic::codec::ProstCodec::default();
2604 let path = http::uri::PathAndQuery::from_static(
2605 "/meta.ClusterService/GetMetaStoreInfo",
2606 );
2607 let mut req = request.into_request();
2608 req.extensions_mut()
2609 .insert(GrpcMethod::new("meta.ClusterService", "GetMetaStoreInfo"));
2610 self.inner.unary(req, path, codec).await
2611 }
2612 }
2613}
2614pub mod notification_service_client {
2616 #![allow(
2617 unused_variables,
2618 dead_code,
2619 missing_docs,
2620 clippy::wildcard_imports,
2621 clippy::let_unit_value,
2622 )]
2623 use tonic::codegen::*;
2624 use tonic::codegen::http::Uri;
2625 #[derive(Debug, Clone)]
2626 pub struct NotificationServiceClient<T> {
2627 inner: tonic::client::Grpc<T>,
2628 }
2629 impl NotificationServiceClient<tonic::transport::Channel> {
2630 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2632 where
2633 D: TryInto<tonic::transport::Endpoint>,
2634 D::Error: Into<StdError>,
2635 {
2636 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2637 Ok(Self::new(conn))
2638 }
2639 }
2640 impl<T> NotificationServiceClient<T>
2641 where
2642 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2643 T::Error: Into<StdError>,
2644 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2645 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2646 {
2647 pub fn new(inner: T) -> Self {
2648 let inner = tonic::client::Grpc::new(inner);
2649 Self { inner }
2650 }
2651 pub fn with_origin(inner: T, origin: Uri) -> Self {
2652 let inner = tonic::client::Grpc::with_origin(inner, origin);
2653 Self { inner }
2654 }
2655 pub fn with_interceptor<F>(
2656 inner: T,
2657 interceptor: F,
2658 ) -> NotificationServiceClient<InterceptedService<T, F>>
2659 where
2660 F: tonic::service::Interceptor,
2661 T::ResponseBody: Default,
2662 T: tonic::codegen::Service<
2663 http::Request<tonic::body::BoxBody>,
2664 Response = http::Response<
2665 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2666 >,
2667 >,
2668 <T as tonic::codegen::Service<
2669 http::Request<tonic::body::BoxBody>,
2670 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2671 {
2672 NotificationServiceClient::new(InterceptedService::new(inner, interceptor))
2673 }
2674 #[must_use]
2679 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2680 self.inner = self.inner.send_compressed(encoding);
2681 self
2682 }
2683 #[must_use]
2685 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2686 self.inner = self.inner.accept_compressed(encoding);
2687 self
2688 }
2689 #[must_use]
2693 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2694 self.inner = self.inner.max_decoding_message_size(limit);
2695 self
2696 }
2697 #[must_use]
2701 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2702 self.inner = self.inner.max_encoding_message_size(limit);
2703 self
2704 }
2705 pub async fn subscribe(
2706 &mut self,
2707 request: impl tonic::IntoRequest<super::SubscribeRequest>,
2708 ) -> std::result::Result<
2709 tonic::Response<tonic::codec::Streaming<super::SubscribeResponse>>,
2710 tonic::Status,
2711 > {
2712 self.inner
2713 .ready()
2714 .await
2715 .map_err(|e| {
2716 tonic::Status::unknown(
2717 format!("Service was not ready: {}", e.into()),
2718 )
2719 })?;
2720 let codec = tonic::codec::ProstCodec::default();
2721 let path = http::uri::PathAndQuery::from_static(
2722 "/meta.NotificationService/Subscribe",
2723 );
2724 let mut req = request.into_request();
2725 req.extensions_mut()
2726 .insert(GrpcMethod::new("meta.NotificationService", "Subscribe"));
2727 self.inner.server_streaming(req, path, codec).await
2728 }
2729 }
2730}
2731pub mod scale_service_client {
2733 #![allow(
2734 unused_variables,
2735 dead_code,
2736 missing_docs,
2737 clippy::wildcard_imports,
2738 clippy::let_unit_value,
2739 )]
2740 use tonic::codegen::*;
2741 use tonic::codegen::http::Uri;
2742 #[derive(Debug, Clone)]
2744 pub struct ScaleServiceClient<T> {
2745 inner: tonic::client::Grpc<T>,
2746 }
2747 impl ScaleServiceClient<tonic::transport::Channel> {
2748 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2750 where
2751 D: TryInto<tonic::transport::Endpoint>,
2752 D::Error: Into<StdError>,
2753 {
2754 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2755 Ok(Self::new(conn))
2756 }
2757 }
2758 impl<T> ScaleServiceClient<T>
2759 where
2760 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2761 T::Error: Into<StdError>,
2762 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2763 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2764 {
2765 pub fn new(inner: T) -> Self {
2766 let inner = tonic::client::Grpc::new(inner);
2767 Self { inner }
2768 }
2769 pub fn with_origin(inner: T, origin: Uri) -> Self {
2770 let inner = tonic::client::Grpc::with_origin(inner, origin);
2771 Self { inner }
2772 }
2773 pub fn with_interceptor<F>(
2774 inner: T,
2775 interceptor: F,
2776 ) -> ScaleServiceClient<InterceptedService<T, F>>
2777 where
2778 F: tonic::service::Interceptor,
2779 T::ResponseBody: Default,
2780 T: tonic::codegen::Service<
2781 http::Request<tonic::body::BoxBody>,
2782 Response = http::Response<
2783 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2784 >,
2785 >,
2786 <T as tonic::codegen::Service<
2787 http::Request<tonic::body::BoxBody>,
2788 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2789 {
2790 ScaleServiceClient::new(InterceptedService::new(inner, interceptor))
2791 }
2792 #[must_use]
2797 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2798 self.inner = self.inner.send_compressed(encoding);
2799 self
2800 }
2801 #[must_use]
2803 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2804 self.inner = self.inner.accept_compressed(encoding);
2805 self
2806 }
2807 #[must_use]
2811 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2812 self.inner = self.inner.max_decoding_message_size(limit);
2813 self
2814 }
2815 #[must_use]
2819 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2820 self.inner = self.inner.max_encoding_message_size(limit);
2821 self
2822 }
2823 pub async fn get_cluster_info(
2824 &mut self,
2825 request: impl tonic::IntoRequest<super::GetClusterInfoRequest>,
2826 ) -> std::result::Result<
2827 tonic::Response<super::GetClusterInfoResponse>,
2828 tonic::Status,
2829 > {
2830 self.inner
2831 .ready()
2832 .await
2833 .map_err(|e| {
2834 tonic::Status::unknown(
2835 format!("Service was not ready: {}", e.into()),
2836 )
2837 })?;
2838 let codec = tonic::codec::ProstCodec::default();
2839 let path = http::uri::PathAndQuery::from_static(
2840 "/meta.ScaleService/GetClusterInfo",
2841 );
2842 let mut req = request.into_request();
2843 req.extensions_mut()
2844 .insert(GrpcMethod::new("meta.ScaleService", "GetClusterInfo"));
2845 self.inner.unary(req, path, codec).await
2846 }
2847 pub async fn reschedule(
2848 &mut self,
2849 request: impl tonic::IntoRequest<super::RescheduleRequest>,
2850 ) -> std::result::Result<
2851 tonic::Response<super::RescheduleResponse>,
2852 tonic::Status,
2853 > {
2854 self.inner
2855 .ready()
2856 .await
2857 .map_err(|e| {
2858 tonic::Status::unknown(
2859 format!("Service was not ready: {}", e.into()),
2860 )
2861 })?;
2862 let codec = tonic::codec::ProstCodec::default();
2863 let path = http::uri::PathAndQuery::from_static(
2864 "/meta.ScaleService/Reschedule",
2865 );
2866 let mut req = request.into_request();
2867 req.extensions_mut()
2868 .insert(GrpcMethod::new("meta.ScaleService", "Reschedule"));
2869 self.inner.unary(req, path, codec).await
2870 }
2871 pub async fn update_streaming_job_node_labels(
2872 &mut self,
2873 request: impl tonic::IntoRequest<super::UpdateStreamingJobNodeLabelsRequest>,
2874 ) -> std::result::Result<
2875 tonic::Response<super::UpdateStreamingJobNodeLabelsResponse>,
2876 tonic::Status,
2877 > {
2878 self.inner
2879 .ready()
2880 .await
2881 .map_err(|e| {
2882 tonic::Status::unknown(
2883 format!("Service was not ready: {}", e.into()),
2884 )
2885 })?;
2886 let codec = tonic::codec::ProstCodec::default();
2887 let path = http::uri::PathAndQuery::from_static(
2888 "/meta.ScaleService/UpdateStreamingJobNodeLabels",
2889 );
2890 let mut req = request.into_request();
2891 req.extensions_mut()
2892 .insert(
2893 GrpcMethod::new("meta.ScaleService", "UpdateStreamingJobNodeLabels"),
2894 );
2895 self.inner.unary(req, path, codec).await
2896 }
2897 pub async fn get_serverless_streaming_jobs_status(
2898 &mut self,
2899 request: impl tonic::IntoRequest<
2900 super::GetServerlessStreamingJobsStatusRequest,
2901 >,
2902 ) -> std::result::Result<
2903 tonic::Response<super::GetServerlessStreamingJobsStatusResponse>,
2904 tonic::Status,
2905 > {
2906 self.inner
2907 .ready()
2908 .await
2909 .map_err(|e| {
2910 tonic::Status::unknown(
2911 format!("Service was not ready: {}", e.into()),
2912 )
2913 })?;
2914 let codec = tonic::codec::ProstCodec::default();
2915 let path = http::uri::PathAndQuery::from_static(
2916 "/meta.ScaleService/GetServerlessStreamingJobsStatus",
2917 );
2918 let mut req = request.into_request();
2919 req.extensions_mut()
2920 .insert(
2921 GrpcMethod::new(
2922 "meta.ScaleService",
2923 "GetServerlessStreamingJobsStatus",
2924 ),
2925 );
2926 self.inner.unary(req, path, codec).await
2927 }
2928 }
2929}
2930pub mod meta_member_service_client {
2932 #![allow(
2933 unused_variables,
2934 dead_code,
2935 missing_docs,
2936 clippy::wildcard_imports,
2937 clippy::let_unit_value,
2938 )]
2939 use tonic::codegen::*;
2940 use tonic::codegen::http::Uri;
2941 #[derive(Debug, Clone)]
2942 pub struct MetaMemberServiceClient<T> {
2943 inner: tonic::client::Grpc<T>,
2944 }
2945 impl MetaMemberServiceClient<tonic::transport::Channel> {
2946 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2948 where
2949 D: TryInto<tonic::transport::Endpoint>,
2950 D::Error: Into<StdError>,
2951 {
2952 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2953 Ok(Self::new(conn))
2954 }
2955 }
2956 impl<T> MetaMemberServiceClient<T>
2957 where
2958 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2959 T::Error: Into<StdError>,
2960 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2961 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2962 {
2963 pub fn new(inner: T) -> Self {
2964 let inner = tonic::client::Grpc::new(inner);
2965 Self { inner }
2966 }
2967 pub fn with_origin(inner: T, origin: Uri) -> Self {
2968 let inner = tonic::client::Grpc::with_origin(inner, origin);
2969 Self { inner }
2970 }
2971 pub fn with_interceptor<F>(
2972 inner: T,
2973 interceptor: F,
2974 ) -> MetaMemberServiceClient<InterceptedService<T, F>>
2975 where
2976 F: tonic::service::Interceptor,
2977 T::ResponseBody: Default,
2978 T: tonic::codegen::Service<
2979 http::Request<tonic::body::BoxBody>,
2980 Response = http::Response<
2981 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2982 >,
2983 >,
2984 <T as tonic::codegen::Service<
2985 http::Request<tonic::body::BoxBody>,
2986 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2987 {
2988 MetaMemberServiceClient::new(InterceptedService::new(inner, interceptor))
2989 }
2990 #[must_use]
2995 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2996 self.inner = self.inner.send_compressed(encoding);
2997 self
2998 }
2999 #[must_use]
3001 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3002 self.inner = self.inner.accept_compressed(encoding);
3003 self
3004 }
3005 #[must_use]
3009 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3010 self.inner = self.inner.max_decoding_message_size(limit);
3011 self
3012 }
3013 #[must_use]
3017 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3018 self.inner = self.inner.max_encoding_message_size(limit);
3019 self
3020 }
3021 pub async fn members(
3022 &mut self,
3023 request: impl tonic::IntoRequest<super::MembersRequest>,
3024 ) -> std::result::Result<
3025 tonic::Response<super::MembersResponse>,
3026 tonic::Status,
3027 > {
3028 self.inner
3029 .ready()
3030 .await
3031 .map_err(|e| {
3032 tonic::Status::unknown(
3033 format!("Service was not ready: {}", e.into()),
3034 )
3035 })?;
3036 let codec = tonic::codec::ProstCodec::default();
3037 let path = http::uri::PathAndQuery::from_static(
3038 "/meta.MetaMemberService/Members",
3039 );
3040 let mut req = request.into_request();
3041 req.extensions_mut()
3042 .insert(GrpcMethod::new("meta.MetaMemberService", "Members"));
3043 self.inner.unary(req, path, codec).await
3044 }
3045 }
3046}
3047pub mod system_params_service_client {
3049 #![allow(
3050 unused_variables,
3051 dead_code,
3052 missing_docs,
3053 clippy::wildcard_imports,
3054 clippy::let_unit_value,
3055 )]
3056 use tonic::codegen::*;
3057 use tonic::codegen::http::Uri;
3058 #[derive(Debug, Clone)]
3059 pub struct SystemParamsServiceClient<T> {
3060 inner: tonic::client::Grpc<T>,
3061 }
3062 impl SystemParamsServiceClient<tonic::transport::Channel> {
3063 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3065 where
3066 D: TryInto<tonic::transport::Endpoint>,
3067 D::Error: Into<StdError>,
3068 {
3069 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3070 Ok(Self::new(conn))
3071 }
3072 }
3073 impl<T> SystemParamsServiceClient<T>
3074 where
3075 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3076 T::Error: Into<StdError>,
3077 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3078 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3079 {
3080 pub fn new(inner: T) -> Self {
3081 let inner = tonic::client::Grpc::new(inner);
3082 Self { inner }
3083 }
3084 pub fn with_origin(inner: T, origin: Uri) -> Self {
3085 let inner = tonic::client::Grpc::with_origin(inner, origin);
3086 Self { inner }
3087 }
3088 pub fn with_interceptor<F>(
3089 inner: T,
3090 interceptor: F,
3091 ) -> SystemParamsServiceClient<InterceptedService<T, F>>
3092 where
3093 F: tonic::service::Interceptor,
3094 T::ResponseBody: Default,
3095 T: tonic::codegen::Service<
3096 http::Request<tonic::body::BoxBody>,
3097 Response = http::Response<
3098 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3099 >,
3100 >,
3101 <T as tonic::codegen::Service<
3102 http::Request<tonic::body::BoxBody>,
3103 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3104 {
3105 SystemParamsServiceClient::new(InterceptedService::new(inner, interceptor))
3106 }
3107 #[must_use]
3112 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3113 self.inner = self.inner.send_compressed(encoding);
3114 self
3115 }
3116 #[must_use]
3118 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3119 self.inner = self.inner.accept_compressed(encoding);
3120 self
3121 }
3122 #[must_use]
3126 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3127 self.inner = self.inner.max_decoding_message_size(limit);
3128 self
3129 }
3130 #[must_use]
3134 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3135 self.inner = self.inner.max_encoding_message_size(limit);
3136 self
3137 }
3138 pub async fn get_system_params(
3139 &mut self,
3140 request: impl tonic::IntoRequest<super::GetSystemParamsRequest>,
3141 ) -> std::result::Result<
3142 tonic::Response<super::GetSystemParamsResponse>,
3143 tonic::Status,
3144 > {
3145 self.inner
3146 .ready()
3147 .await
3148 .map_err(|e| {
3149 tonic::Status::unknown(
3150 format!("Service was not ready: {}", e.into()),
3151 )
3152 })?;
3153 let codec = tonic::codec::ProstCodec::default();
3154 let path = http::uri::PathAndQuery::from_static(
3155 "/meta.SystemParamsService/GetSystemParams",
3156 );
3157 let mut req = request.into_request();
3158 req.extensions_mut()
3159 .insert(GrpcMethod::new("meta.SystemParamsService", "GetSystemParams"));
3160 self.inner.unary(req, path, codec).await
3161 }
3162 pub async fn set_system_param(
3163 &mut self,
3164 request: impl tonic::IntoRequest<super::SetSystemParamRequest>,
3165 ) -> std::result::Result<
3166 tonic::Response<super::SetSystemParamResponse>,
3167 tonic::Status,
3168 > {
3169 self.inner
3170 .ready()
3171 .await
3172 .map_err(|e| {
3173 tonic::Status::unknown(
3174 format!("Service was not ready: {}", e.into()),
3175 )
3176 })?;
3177 let codec = tonic::codec::ProstCodec::default();
3178 let path = http::uri::PathAndQuery::from_static(
3179 "/meta.SystemParamsService/SetSystemParam",
3180 );
3181 let mut req = request.into_request();
3182 req.extensions_mut()
3183 .insert(GrpcMethod::new("meta.SystemParamsService", "SetSystemParam"));
3184 self.inner.unary(req, path, codec).await
3185 }
3186 }
3187}
3188pub mod session_param_service_client {
3190 #![allow(
3191 unused_variables,
3192 dead_code,
3193 missing_docs,
3194 clippy::wildcard_imports,
3195 clippy::let_unit_value,
3196 )]
3197 use tonic::codegen::*;
3198 use tonic::codegen::http::Uri;
3199 #[derive(Debug, Clone)]
3201 pub struct SessionParamServiceClient<T> {
3202 inner: tonic::client::Grpc<T>,
3203 }
3204 impl SessionParamServiceClient<tonic::transport::Channel> {
3205 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3207 where
3208 D: TryInto<tonic::transport::Endpoint>,
3209 D::Error: Into<StdError>,
3210 {
3211 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3212 Ok(Self::new(conn))
3213 }
3214 }
3215 impl<T> SessionParamServiceClient<T>
3216 where
3217 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3218 T::Error: Into<StdError>,
3219 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3220 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3221 {
3222 pub fn new(inner: T) -> Self {
3223 let inner = tonic::client::Grpc::new(inner);
3224 Self { inner }
3225 }
3226 pub fn with_origin(inner: T, origin: Uri) -> Self {
3227 let inner = tonic::client::Grpc::with_origin(inner, origin);
3228 Self { inner }
3229 }
3230 pub fn with_interceptor<F>(
3231 inner: T,
3232 interceptor: F,
3233 ) -> SessionParamServiceClient<InterceptedService<T, F>>
3234 where
3235 F: tonic::service::Interceptor,
3236 T::ResponseBody: Default,
3237 T: tonic::codegen::Service<
3238 http::Request<tonic::body::BoxBody>,
3239 Response = http::Response<
3240 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3241 >,
3242 >,
3243 <T as tonic::codegen::Service<
3244 http::Request<tonic::body::BoxBody>,
3245 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3246 {
3247 SessionParamServiceClient::new(InterceptedService::new(inner, interceptor))
3248 }
3249 #[must_use]
3254 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3255 self.inner = self.inner.send_compressed(encoding);
3256 self
3257 }
3258 #[must_use]
3260 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3261 self.inner = self.inner.accept_compressed(encoding);
3262 self
3263 }
3264 #[must_use]
3268 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3269 self.inner = self.inner.max_decoding_message_size(limit);
3270 self
3271 }
3272 #[must_use]
3276 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3277 self.inner = self.inner.max_encoding_message_size(limit);
3278 self
3279 }
3280 pub async fn get_session_params(
3281 &mut self,
3282 request: impl tonic::IntoRequest<super::GetSessionParamsRequest>,
3283 ) -> std::result::Result<
3284 tonic::Response<super::GetSessionParamsResponse>,
3285 tonic::Status,
3286 > {
3287 self.inner
3288 .ready()
3289 .await
3290 .map_err(|e| {
3291 tonic::Status::unknown(
3292 format!("Service was not ready: {}", e.into()),
3293 )
3294 })?;
3295 let codec = tonic::codec::ProstCodec::default();
3296 let path = http::uri::PathAndQuery::from_static(
3297 "/meta.SessionParamService/GetSessionParams",
3298 );
3299 let mut req = request.into_request();
3300 req.extensions_mut()
3301 .insert(GrpcMethod::new("meta.SessionParamService", "GetSessionParams"));
3302 self.inner.unary(req, path, codec).await
3303 }
3304 pub async fn set_session_param(
3305 &mut self,
3306 request: impl tonic::IntoRequest<super::SetSessionParamRequest>,
3307 ) -> std::result::Result<
3308 tonic::Response<super::SetSessionParamResponse>,
3309 tonic::Status,
3310 > {
3311 self.inner
3312 .ready()
3313 .await
3314 .map_err(|e| {
3315 tonic::Status::unknown(
3316 format!("Service was not ready: {}", e.into()),
3317 )
3318 })?;
3319 let codec = tonic::codec::ProstCodec::default();
3320 let path = http::uri::PathAndQuery::from_static(
3321 "/meta.SessionParamService/SetSessionParam",
3322 );
3323 let mut req = request.into_request();
3324 req.extensions_mut()
3325 .insert(GrpcMethod::new("meta.SessionParamService", "SetSessionParam"));
3326 self.inner.unary(req, path, codec).await
3327 }
3328 }
3329}
3330pub mod serving_service_client {
3332 #![allow(
3333 unused_variables,
3334 dead_code,
3335 missing_docs,
3336 clippy::wildcard_imports,
3337 clippy::let_unit_value,
3338 )]
3339 use tonic::codegen::*;
3340 use tonic::codegen::http::Uri;
3341 #[derive(Debug, Clone)]
3342 pub struct ServingServiceClient<T> {
3343 inner: tonic::client::Grpc<T>,
3344 }
3345 impl ServingServiceClient<tonic::transport::Channel> {
3346 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3348 where
3349 D: TryInto<tonic::transport::Endpoint>,
3350 D::Error: Into<StdError>,
3351 {
3352 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3353 Ok(Self::new(conn))
3354 }
3355 }
3356 impl<T> ServingServiceClient<T>
3357 where
3358 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3359 T::Error: Into<StdError>,
3360 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3361 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3362 {
3363 pub fn new(inner: T) -> Self {
3364 let inner = tonic::client::Grpc::new(inner);
3365 Self { inner }
3366 }
3367 pub fn with_origin(inner: T, origin: Uri) -> Self {
3368 let inner = tonic::client::Grpc::with_origin(inner, origin);
3369 Self { inner }
3370 }
3371 pub fn with_interceptor<F>(
3372 inner: T,
3373 interceptor: F,
3374 ) -> ServingServiceClient<InterceptedService<T, F>>
3375 where
3376 F: tonic::service::Interceptor,
3377 T::ResponseBody: Default,
3378 T: tonic::codegen::Service<
3379 http::Request<tonic::body::BoxBody>,
3380 Response = http::Response<
3381 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3382 >,
3383 >,
3384 <T as tonic::codegen::Service<
3385 http::Request<tonic::body::BoxBody>,
3386 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3387 {
3388 ServingServiceClient::new(InterceptedService::new(inner, interceptor))
3389 }
3390 #[must_use]
3395 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3396 self.inner = self.inner.send_compressed(encoding);
3397 self
3398 }
3399 #[must_use]
3401 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3402 self.inner = self.inner.accept_compressed(encoding);
3403 self
3404 }
3405 #[must_use]
3409 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3410 self.inner = self.inner.max_decoding_message_size(limit);
3411 self
3412 }
3413 #[must_use]
3417 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3418 self.inner = self.inner.max_encoding_message_size(limit);
3419 self
3420 }
3421 pub async fn get_serving_vnode_mappings(
3422 &mut self,
3423 request: impl tonic::IntoRequest<super::GetServingVnodeMappingsRequest>,
3424 ) -> std::result::Result<
3425 tonic::Response<super::GetServingVnodeMappingsResponse>,
3426 tonic::Status,
3427 > {
3428 self.inner
3429 .ready()
3430 .await
3431 .map_err(|e| {
3432 tonic::Status::unknown(
3433 format!("Service was not ready: {}", e.into()),
3434 )
3435 })?;
3436 let codec = tonic::codec::ProstCodec::default();
3437 let path = http::uri::PathAndQuery::from_static(
3438 "/meta.ServingService/GetServingVnodeMappings",
3439 );
3440 let mut req = request.into_request();
3441 req.extensions_mut()
3442 .insert(
3443 GrpcMethod::new("meta.ServingService", "GetServingVnodeMappings"),
3444 );
3445 self.inner.unary(req, path, codec).await
3446 }
3447 }
3448}
3449pub mod event_log_service_client {
3451 #![allow(
3452 unused_variables,
3453 dead_code,
3454 missing_docs,
3455 clippy::wildcard_imports,
3456 clippy::let_unit_value,
3457 )]
3458 use tonic::codegen::*;
3459 use tonic::codegen::http::Uri;
3460 #[derive(Debug, Clone)]
3461 pub struct EventLogServiceClient<T> {
3462 inner: tonic::client::Grpc<T>,
3463 }
3464 impl EventLogServiceClient<tonic::transport::Channel> {
3465 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3467 where
3468 D: TryInto<tonic::transport::Endpoint>,
3469 D::Error: Into<StdError>,
3470 {
3471 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3472 Ok(Self::new(conn))
3473 }
3474 }
3475 impl<T> EventLogServiceClient<T>
3476 where
3477 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3478 T::Error: Into<StdError>,
3479 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3480 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3481 {
3482 pub fn new(inner: T) -> Self {
3483 let inner = tonic::client::Grpc::new(inner);
3484 Self { inner }
3485 }
3486 pub fn with_origin(inner: T, origin: Uri) -> Self {
3487 let inner = tonic::client::Grpc::with_origin(inner, origin);
3488 Self { inner }
3489 }
3490 pub fn with_interceptor<F>(
3491 inner: T,
3492 interceptor: F,
3493 ) -> EventLogServiceClient<InterceptedService<T, F>>
3494 where
3495 F: tonic::service::Interceptor,
3496 T::ResponseBody: Default,
3497 T: tonic::codegen::Service<
3498 http::Request<tonic::body::BoxBody>,
3499 Response = http::Response<
3500 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3501 >,
3502 >,
3503 <T as tonic::codegen::Service<
3504 http::Request<tonic::body::BoxBody>,
3505 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3506 {
3507 EventLogServiceClient::new(InterceptedService::new(inner, interceptor))
3508 }
3509 #[must_use]
3514 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3515 self.inner = self.inner.send_compressed(encoding);
3516 self
3517 }
3518 #[must_use]
3520 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3521 self.inner = self.inner.accept_compressed(encoding);
3522 self
3523 }
3524 #[must_use]
3528 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3529 self.inner = self.inner.max_decoding_message_size(limit);
3530 self
3531 }
3532 #[must_use]
3536 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3537 self.inner = self.inner.max_encoding_message_size(limit);
3538 self
3539 }
3540 pub async fn list_event_log(
3541 &mut self,
3542 request: impl tonic::IntoRequest<super::ListEventLogRequest>,
3543 ) -> std::result::Result<
3544 tonic::Response<super::ListEventLogResponse>,
3545 tonic::Status,
3546 > {
3547 self.inner
3548 .ready()
3549 .await
3550 .map_err(|e| {
3551 tonic::Status::unknown(
3552 format!("Service was not ready: {}", e.into()),
3553 )
3554 })?;
3555 let codec = tonic::codec::ProstCodec::default();
3556 let path = http::uri::PathAndQuery::from_static(
3557 "/meta.EventLogService/ListEventLog",
3558 );
3559 let mut req = request.into_request();
3560 req.extensions_mut()
3561 .insert(GrpcMethod::new("meta.EventLogService", "ListEventLog"));
3562 self.inner.unary(req, path, codec).await
3563 }
3564 pub async fn add_event_log(
3565 &mut self,
3566 request: impl tonic::IntoRequest<super::AddEventLogRequest>,
3567 ) -> std::result::Result<
3568 tonic::Response<super::AddEventLogResponse>,
3569 tonic::Status,
3570 > {
3571 self.inner
3572 .ready()
3573 .await
3574 .map_err(|e| {
3575 tonic::Status::unknown(
3576 format!("Service was not ready: {}", e.into()),
3577 )
3578 })?;
3579 let codec = tonic::codec::ProstCodec::default();
3580 let path = http::uri::PathAndQuery::from_static(
3581 "/meta.EventLogService/AddEventLog",
3582 );
3583 let mut req = request.into_request();
3584 req.extensions_mut()
3585 .insert(GrpcMethod::new("meta.EventLogService", "AddEventLog"));
3586 self.inner.unary(req, path, codec).await
3587 }
3588 }
3589}
3590pub mod cluster_limit_service_client {
3592 #![allow(
3593 unused_variables,
3594 dead_code,
3595 missing_docs,
3596 clippy::wildcard_imports,
3597 clippy::let_unit_value,
3598 )]
3599 use tonic::codegen::*;
3600 use tonic::codegen::http::Uri;
3601 #[derive(Debug, Clone)]
3602 pub struct ClusterLimitServiceClient<T> {
3603 inner: tonic::client::Grpc<T>,
3604 }
3605 impl ClusterLimitServiceClient<tonic::transport::Channel> {
3606 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3608 where
3609 D: TryInto<tonic::transport::Endpoint>,
3610 D::Error: Into<StdError>,
3611 {
3612 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3613 Ok(Self::new(conn))
3614 }
3615 }
3616 impl<T> ClusterLimitServiceClient<T>
3617 where
3618 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3619 T::Error: Into<StdError>,
3620 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3621 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3622 {
3623 pub fn new(inner: T) -> Self {
3624 let inner = tonic::client::Grpc::new(inner);
3625 Self { inner }
3626 }
3627 pub fn with_origin(inner: T, origin: Uri) -> Self {
3628 let inner = tonic::client::Grpc::with_origin(inner, origin);
3629 Self { inner }
3630 }
3631 pub fn with_interceptor<F>(
3632 inner: T,
3633 interceptor: F,
3634 ) -> ClusterLimitServiceClient<InterceptedService<T, F>>
3635 where
3636 F: tonic::service::Interceptor,
3637 T::ResponseBody: Default,
3638 T: tonic::codegen::Service<
3639 http::Request<tonic::body::BoxBody>,
3640 Response = http::Response<
3641 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3642 >,
3643 >,
3644 <T as tonic::codegen::Service<
3645 http::Request<tonic::body::BoxBody>,
3646 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3647 {
3648 ClusterLimitServiceClient::new(InterceptedService::new(inner, interceptor))
3649 }
3650 #[must_use]
3655 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3656 self.inner = self.inner.send_compressed(encoding);
3657 self
3658 }
3659 #[must_use]
3661 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3662 self.inner = self.inner.accept_compressed(encoding);
3663 self
3664 }
3665 #[must_use]
3669 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3670 self.inner = self.inner.max_decoding_message_size(limit);
3671 self
3672 }
3673 #[must_use]
3677 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3678 self.inner = self.inner.max_encoding_message_size(limit);
3679 self
3680 }
3681 pub async fn get_cluster_limits(
3682 &mut self,
3683 request: impl tonic::IntoRequest<super::GetClusterLimitsRequest>,
3684 ) -> std::result::Result<
3685 tonic::Response<super::GetClusterLimitsResponse>,
3686 tonic::Status,
3687 > {
3688 self.inner
3689 .ready()
3690 .await
3691 .map_err(|e| {
3692 tonic::Status::unknown(
3693 format!("Service was not ready: {}", e.into()),
3694 )
3695 })?;
3696 let codec = tonic::codec::ProstCodec::default();
3697 let path = http::uri::PathAndQuery::from_static(
3698 "/meta.ClusterLimitService/GetClusterLimits",
3699 );
3700 let mut req = request.into_request();
3701 req.extensions_mut()
3702 .insert(GrpcMethod::new("meta.ClusterLimitService", "GetClusterLimits"));
3703 self.inner.unary(req, path, codec).await
3704 }
3705 }
3706}
3707pub mod telemetry_info_service_server {
3709 #![allow(
3710 unused_variables,
3711 dead_code,
3712 missing_docs,
3713 clippy::wildcard_imports,
3714 clippy::let_unit_value,
3715 )]
3716 use tonic::codegen::*;
3717 #[async_trait]
3719 pub trait TelemetryInfoService: std::marker::Send + std::marker::Sync + 'static {
3720 async fn get_telemetry_info(
3722 &self,
3723 request: tonic::Request<super::GetTelemetryInfoRequest>,
3724 ) -> std::result::Result<
3725 tonic::Response<super::TelemetryInfoResponse>,
3726 tonic::Status,
3727 >;
3728 }
3729 #[derive(Debug)]
3730 pub struct TelemetryInfoServiceServer<T> {
3731 inner: Arc<T>,
3732 accept_compression_encodings: EnabledCompressionEncodings,
3733 send_compression_encodings: EnabledCompressionEncodings,
3734 max_decoding_message_size: Option<usize>,
3735 max_encoding_message_size: Option<usize>,
3736 }
3737 impl<T> TelemetryInfoServiceServer<T> {
3738 pub fn new(inner: T) -> Self {
3739 Self::from_arc(Arc::new(inner))
3740 }
3741 pub fn from_arc(inner: Arc<T>) -> Self {
3742 Self {
3743 inner,
3744 accept_compression_encodings: Default::default(),
3745 send_compression_encodings: Default::default(),
3746 max_decoding_message_size: None,
3747 max_encoding_message_size: None,
3748 }
3749 }
3750 pub fn with_interceptor<F>(
3751 inner: T,
3752 interceptor: F,
3753 ) -> InterceptedService<Self, F>
3754 where
3755 F: tonic::service::Interceptor,
3756 {
3757 InterceptedService::new(Self::new(inner), interceptor)
3758 }
3759 #[must_use]
3761 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3762 self.accept_compression_encodings.enable(encoding);
3763 self
3764 }
3765 #[must_use]
3767 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3768 self.send_compression_encodings.enable(encoding);
3769 self
3770 }
3771 #[must_use]
3775 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3776 self.max_decoding_message_size = Some(limit);
3777 self
3778 }
3779 #[must_use]
3783 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3784 self.max_encoding_message_size = Some(limit);
3785 self
3786 }
3787 }
3788 impl<T, B> tonic::codegen::Service<http::Request<B>>
3789 for TelemetryInfoServiceServer<T>
3790 where
3791 T: TelemetryInfoService,
3792 B: Body + std::marker::Send + 'static,
3793 B::Error: Into<StdError> + std::marker::Send + 'static,
3794 {
3795 type Response = http::Response<tonic::body::BoxBody>;
3796 type Error = std::convert::Infallible;
3797 type Future = BoxFuture<Self::Response, Self::Error>;
3798 fn poll_ready(
3799 &mut self,
3800 _cx: &mut Context<'_>,
3801 ) -> Poll<std::result::Result<(), Self::Error>> {
3802 Poll::Ready(Ok(()))
3803 }
3804 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3805 match req.uri().path() {
3806 "/meta.TelemetryInfoService/GetTelemetryInfo" => {
3807 #[allow(non_camel_case_types)]
3808 struct GetTelemetryInfoSvc<T: TelemetryInfoService>(pub Arc<T>);
3809 impl<
3810 T: TelemetryInfoService,
3811 > tonic::server::UnaryService<super::GetTelemetryInfoRequest>
3812 for GetTelemetryInfoSvc<T> {
3813 type Response = super::TelemetryInfoResponse;
3814 type Future = BoxFuture<
3815 tonic::Response<Self::Response>,
3816 tonic::Status,
3817 >;
3818 fn call(
3819 &mut self,
3820 request: tonic::Request<super::GetTelemetryInfoRequest>,
3821 ) -> Self::Future {
3822 let inner = Arc::clone(&self.0);
3823 let fut = async move {
3824 <T as TelemetryInfoService>::get_telemetry_info(
3825 &inner,
3826 request,
3827 )
3828 .await
3829 };
3830 Box::pin(fut)
3831 }
3832 }
3833 let accept_compression_encodings = self.accept_compression_encodings;
3834 let send_compression_encodings = self.send_compression_encodings;
3835 let max_decoding_message_size = self.max_decoding_message_size;
3836 let max_encoding_message_size = self.max_encoding_message_size;
3837 let inner = self.inner.clone();
3838 let fut = async move {
3839 let method = GetTelemetryInfoSvc(inner);
3840 let codec = tonic::codec::ProstCodec::default();
3841 let mut grpc = tonic::server::Grpc::new(codec)
3842 .apply_compression_config(
3843 accept_compression_encodings,
3844 send_compression_encodings,
3845 )
3846 .apply_max_message_size_config(
3847 max_decoding_message_size,
3848 max_encoding_message_size,
3849 );
3850 let res = grpc.unary(method, req).await;
3851 Ok(res)
3852 };
3853 Box::pin(fut)
3854 }
3855 _ => {
3856 Box::pin(async move {
3857 let mut response = http::Response::new(empty_body());
3858 let headers = response.headers_mut();
3859 headers
3860 .insert(
3861 tonic::Status::GRPC_STATUS,
3862 (tonic::Code::Unimplemented as i32).into(),
3863 );
3864 headers
3865 .insert(
3866 http::header::CONTENT_TYPE,
3867 tonic::metadata::GRPC_CONTENT_TYPE,
3868 );
3869 Ok(response)
3870 })
3871 }
3872 }
3873 }
3874 }
3875 impl<T> Clone for TelemetryInfoServiceServer<T> {
3876 fn clone(&self) -> Self {
3877 let inner = self.inner.clone();
3878 Self {
3879 inner,
3880 accept_compression_encodings: self.accept_compression_encodings,
3881 send_compression_encodings: self.send_compression_encodings,
3882 max_decoding_message_size: self.max_decoding_message_size,
3883 max_encoding_message_size: self.max_encoding_message_size,
3884 }
3885 }
3886 }
3887 pub const SERVICE_NAME: &str = "meta.TelemetryInfoService";
3889 impl<T> tonic::server::NamedService for TelemetryInfoServiceServer<T> {
3890 const NAME: &'static str = SERVICE_NAME;
3891 }
3892}
3893pub mod heartbeat_service_server {
3895 #![allow(
3896 unused_variables,
3897 dead_code,
3898 missing_docs,
3899 clippy::wildcard_imports,
3900 clippy::let_unit_value,
3901 )]
3902 use tonic::codegen::*;
3903 #[async_trait]
3905 pub trait HeartbeatService: std::marker::Send + std::marker::Sync + 'static {
3906 async fn heartbeat(
3907 &self,
3908 request: tonic::Request<super::HeartbeatRequest>,
3909 ) -> std::result::Result<
3910 tonic::Response<super::HeartbeatResponse>,
3911 tonic::Status,
3912 >;
3913 }
3914 #[derive(Debug)]
3915 pub struct HeartbeatServiceServer<T> {
3916 inner: Arc<T>,
3917 accept_compression_encodings: EnabledCompressionEncodings,
3918 send_compression_encodings: EnabledCompressionEncodings,
3919 max_decoding_message_size: Option<usize>,
3920 max_encoding_message_size: Option<usize>,
3921 }
3922 impl<T> HeartbeatServiceServer<T> {
3923 pub fn new(inner: T) -> Self {
3924 Self::from_arc(Arc::new(inner))
3925 }
3926 pub fn from_arc(inner: Arc<T>) -> Self {
3927 Self {
3928 inner,
3929 accept_compression_encodings: Default::default(),
3930 send_compression_encodings: Default::default(),
3931 max_decoding_message_size: None,
3932 max_encoding_message_size: None,
3933 }
3934 }
3935 pub fn with_interceptor<F>(
3936 inner: T,
3937 interceptor: F,
3938 ) -> InterceptedService<Self, F>
3939 where
3940 F: tonic::service::Interceptor,
3941 {
3942 InterceptedService::new(Self::new(inner), interceptor)
3943 }
3944 #[must_use]
3946 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3947 self.accept_compression_encodings.enable(encoding);
3948 self
3949 }
3950 #[must_use]
3952 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3953 self.send_compression_encodings.enable(encoding);
3954 self
3955 }
3956 #[must_use]
3960 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3961 self.max_decoding_message_size = Some(limit);
3962 self
3963 }
3964 #[must_use]
3968 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3969 self.max_encoding_message_size = Some(limit);
3970 self
3971 }
3972 }
3973 impl<T, B> tonic::codegen::Service<http::Request<B>> for HeartbeatServiceServer<T>
3974 where
3975 T: HeartbeatService,
3976 B: Body + std::marker::Send + 'static,
3977 B::Error: Into<StdError> + std::marker::Send + 'static,
3978 {
3979 type Response = http::Response<tonic::body::BoxBody>;
3980 type Error = std::convert::Infallible;
3981 type Future = BoxFuture<Self::Response, Self::Error>;
3982 fn poll_ready(
3983 &mut self,
3984 _cx: &mut Context<'_>,
3985 ) -> Poll<std::result::Result<(), Self::Error>> {
3986 Poll::Ready(Ok(()))
3987 }
3988 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3989 match req.uri().path() {
3990 "/meta.HeartbeatService/Heartbeat" => {
3991 #[allow(non_camel_case_types)]
3992 struct HeartbeatSvc<T: HeartbeatService>(pub Arc<T>);
3993 impl<
3994 T: HeartbeatService,
3995 > tonic::server::UnaryService<super::HeartbeatRequest>
3996 for HeartbeatSvc<T> {
3997 type Response = super::HeartbeatResponse;
3998 type Future = BoxFuture<
3999 tonic::Response<Self::Response>,
4000 tonic::Status,
4001 >;
4002 fn call(
4003 &mut self,
4004 request: tonic::Request<super::HeartbeatRequest>,
4005 ) -> Self::Future {
4006 let inner = Arc::clone(&self.0);
4007 let fut = async move {
4008 <T as HeartbeatService>::heartbeat(&inner, request).await
4009 };
4010 Box::pin(fut)
4011 }
4012 }
4013 let accept_compression_encodings = self.accept_compression_encodings;
4014 let send_compression_encodings = self.send_compression_encodings;
4015 let max_decoding_message_size = self.max_decoding_message_size;
4016 let max_encoding_message_size = self.max_encoding_message_size;
4017 let inner = self.inner.clone();
4018 let fut = async move {
4019 let method = HeartbeatSvc(inner);
4020 let codec = tonic::codec::ProstCodec::default();
4021 let mut grpc = tonic::server::Grpc::new(codec)
4022 .apply_compression_config(
4023 accept_compression_encodings,
4024 send_compression_encodings,
4025 )
4026 .apply_max_message_size_config(
4027 max_decoding_message_size,
4028 max_encoding_message_size,
4029 );
4030 let res = grpc.unary(method, req).await;
4031 Ok(res)
4032 };
4033 Box::pin(fut)
4034 }
4035 _ => {
4036 Box::pin(async move {
4037 let mut response = http::Response::new(empty_body());
4038 let headers = response.headers_mut();
4039 headers
4040 .insert(
4041 tonic::Status::GRPC_STATUS,
4042 (tonic::Code::Unimplemented as i32).into(),
4043 );
4044 headers
4045 .insert(
4046 http::header::CONTENT_TYPE,
4047 tonic::metadata::GRPC_CONTENT_TYPE,
4048 );
4049 Ok(response)
4050 })
4051 }
4052 }
4053 }
4054 }
4055 impl<T> Clone for HeartbeatServiceServer<T> {
4056 fn clone(&self) -> Self {
4057 let inner = self.inner.clone();
4058 Self {
4059 inner,
4060 accept_compression_encodings: self.accept_compression_encodings,
4061 send_compression_encodings: self.send_compression_encodings,
4062 max_decoding_message_size: self.max_decoding_message_size,
4063 max_encoding_message_size: self.max_encoding_message_size,
4064 }
4065 }
4066 }
4067 pub const SERVICE_NAME: &str = "meta.HeartbeatService";
4069 impl<T> tonic::server::NamedService for HeartbeatServiceServer<T> {
4070 const NAME: &'static str = SERVICE_NAME;
4071 }
4072}
4073pub mod stream_manager_service_server {
4075 #![allow(
4076 unused_variables,
4077 dead_code,
4078 missing_docs,
4079 clippy::wildcard_imports,
4080 clippy::let_unit_value,
4081 )]
4082 use tonic::codegen::*;
4083 #[async_trait]
4085 pub trait StreamManagerService: std::marker::Send + std::marker::Sync + 'static {
4086 async fn flush(
4087 &self,
4088 request: tonic::Request<super::FlushRequest>,
4089 ) -> std::result::Result<tonic::Response<super::FlushResponse>, tonic::Status>;
4090 async fn pause(
4091 &self,
4092 request: tonic::Request<super::PauseRequest>,
4093 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status>;
4094 async fn resume(
4095 &self,
4096 request: tonic::Request<super::ResumeRequest>,
4097 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status>;
4098 async fn cancel_creating_jobs(
4099 &self,
4100 request: tonic::Request<super::CancelCreatingJobsRequest>,
4101 ) -> std::result::Result<
4102 tonic::Response<super::CancelCreatingJobsResponse>,
4103 tonic::Status,
4104 >;
4105 async fn list_table_fragments(
4106 &self,
4107 request: tonic::Request<super::ListTableFragmentsRequest>,
4108 ) -> std::result::Result<
4109 tonic::Response<super::ListTableFragmentsResponse>,
4110 tonic::Status,
4111 >;
4112 async fn list_streaming_job_states(
4113 &self,
4114 request: tonic::Request<super::ListStreamingJobStatesRequest>,
4115 ) -> std::result::Result<
4116 tonic::Response<super::ListStreamingJobStatesResponse>,
4117 tonic::Status,
4118 >;
4119 async fn list_fragment_distribution(
4120 &self,
4121 request: tonic::Request<super::ListFragmentDistributionRequest>,
4122 ) -> std::result::Result<
4123 tonic::Response<super::ListFragmentDistributionResponse>,
4124 tonic::Status,
4125 >;
4126 async fn list_actor_states(
4127 &self,
4128 request: tonic::Request<super::ListActorStatesRequest>,
4129 ) -> std::result::Result<
4130 tonic::Response<super::ListActorStatesResponse>,
4131 tonic::Status,
4132 >;
4133 async fn list_actor_splits(
4134 &self,
4135 request: tonic::Request<super::ListActorSplitsRequest>,
4136 ) -> std::result::Result<
4137 tonic::Response<super::ListActorSplitsResponse>,
4138 tonic::Status,
4139 >;
4140 async fn list_object_dependencies(
4141 &self,
4142 request: tonic::Request<super::ListObjectDependenciesRequest>,
4143 ) -> std::result::Result<
4144 tonic::Response<super::ListObjectDependenciesResponse>,
4145 tonic::Status,
4146 >;
4147 async fn apply_throttle(
4148 &self,
4149 request: tonic::Request<super::ApplyThrottleRequest>,
4150 ) -> std::result::Result<
4151 tonic::Response<super::ApplyThrottleResponse>,
4152 tonic::Status,
4153 >;
4154 async fn recover(
4155 &self,
4156 request: tonic::Request<super::RecoverRequest>,
4157 ) -> std::result::Result<tonic::Response<super::RecoverResponse>, tonic::Status>;
4158 async fn list_rate_limits(
4159 &self,
4160 request: tonic::Request<super::ListRateLimitsRequest>,
4161 ) -> std::result::Result<
4162 tonic::Response<super::ListRateLimitsResponse>,
4163 tonic::Status,
4164 >;
4165 }
4166 #[derive(Debug)]
4167 pub struct StreamManagerServiceServer<T> {
4168 inner: Arc<T>,
4169 accept_compression_encodings: EnabledCompressionEncodings,
4170 send_compression_encodings: EnabledCompressionEncodings,
4171 max_decoding_message_size: Option<usize>,
4172 max_encoding_message_size: Option<usize>,
4173 }
4174 impl<T> StreamManagerServiceServer<T> {
4175 pub fn new(inner: T) -> Self {
4176 Self::from_arc(Arc::new(inner))
4177 }
4178 pub fn from_arc(inner: Arc<T>) -> Self {
4179 Self {
4180 inner,
4181 accept_compression_encodings: Default::default(),
4182 send_compression_encodings: Default::default(),
4183 max_decoding_message_size: None,
4184 max_encoding_message_size: None,
4185 }
4186 }
4187 pub fn with_interceptor<F>(
4188 inner: T,
4189 interceptor: F,
4190 ) -> InterceptedService<Self, F>
4191 where
4192 F: tonic::service::Interceptor,
4193 {
4194 InterceptedService::new(Self::new(inner), interceptor)
4195 }
4196 #[must_use]
4198 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4199 self.accept_compression_encodings.enable(encoding);
4200 self
4201 }
4202 #[must_use]
4204 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4205 self.send_compression_encodings.enable(encoding);
4206 self
4207 }
4208 #[must_use]
4212 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4213 self.max_decoding_message_size = Some(limit);
4214 self
4215 }
4216 #[must_use]
4220 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4221 self.max_encoding_message_size = Some(limit);
4222 self
4223 }
4224 }
4225 impl<T, B> tonic::codegen::Service<http::Request<B>>
4226 for StreamManagerServiceServer<T>
4227 where
4228 T: StreamManagerService,
4229 B: Body + std::marker::Send + 'static,
4230 B::Error: Into<StdError> + std::marker::Send + 'static,
4231 {
4232 type Response = http::Response<tonic::body::BoxBody>;
4233 type Error = std::convert::Infallible;
4234 type Future = BoxFuture<Self::Response, Self::Error>;
4235 fn poll_ready(
4236 &mut self,
4237 _cx: &mut Context<'_>,
4238 ) -> Poll<std::result::Result<(), Self::Error>> {
4239 Poll::Ready(Ok(()))
4240 }
4241 fn call(&mut self, req: http::Request<B>) -> Self::Future {
4242 match req.uri().path() {
4243 "/meta.StreamManagerService/Flush" => {
4244 #[allow(non_camel_case_types)]
4245 struct FlushSvc<T: StreamManagerService>(pub Arc<T>);
4246 impl<
4247 T: StreamManagerService,
4248 > tonic::server::UnaryService<super::FlushRequest> for FlushSvc<T> {
4249 type Response = super::FlushResponse;
4250 type Future = BoxFuture<
4251 tonic::Response<Self::Response>,
4252 tonic::Status,
4253 >;
4254 fn call(
4255 &mut self,
4256 request: tonic::Request<super::FlushRequest>,
4257 ) -> Self::Future {
4258 let inner = Arc::clone(&self.0);
4259 let fut = async move {
4260 <T as StreamManagerService>::flush(&inner, request).await
4261 };
4262 Box::pin(fut)
4263 }
4264 }
4265 let accept_compression_encodings = self.accept_compression_encodings;
4266 let send_compression_encodings = self.send_compression_encodings;
4267 let max_decoding_message_size = self.max_decoding_message_size;
4268 let max_encoding_message_size = self.max_encoding_message_size;
4269 let inner = self.inner.clone();
4270 let fut = async move {
4271 let method = FlushSvc(inner);
4272 let codec = tonic::codec::ProstCodec::default();
4273 let mut grpc = tonic::server::Grpc::new(codec)
4274 .apply_compression_config(
4275 accept_compression_encodings,
4276 send_compression_encodings,
4277 )
4278 .apply_max_message_size_config(
4279 max_decoding_message_size,
4280 max_encoding_message_size,
4281 );
4282 let res = grpc.unary(method, req).await;
4283 Ok(res)
4284 };
4285 Box::pin(fut)
4286 }
4287 "/meta.StreamManagerService/Pause" => {
4288 #[allow(non_camel_case_types)]
4289 struct PauseSvc<T: StreamManagerService>(pub Arc<T>);
4290 impl<
4291 T: StreamManagerService,
4292 > tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> {
4293 type Response = super::PauseResponse;
4294 type Future = BoxFuture<
4295 tonic::Response<Self::Response>,
4296 tonic::Status,
4297 >;
4298 fn call(
4299 &mut self,
4300 request: tonic::Request<super::PauseRequest>,
4301 ) -> Self::Future {
4302 let inner = Arc::clone(&self.0);
4303 let fut = async move {
4304 <T as StreamManagerService>::pause(&inner, request).await
4305 };
4306 Box::pin(fut)
4307 }
4308 }
4309 let accept_compression_encodings = self.accept_compression_encodings;
4310 let send_compression_encodings = self.send_compression_encodings;
4311 let max_decoding_message_size = self.max_decoding_message_size;
4312 let max_encoding_message_size = self.max_encoding_message_size;
4313 let inner = self.inner.clone();
4314 let fut = async move {
4315 let method = PauseSvc(inner);
4316 let codec = tonic::codec::ProstCodec::default();
4317 let mut grpc = tonic::server::Grpc::new(codec)
4318 .apply_compression_config(
4319 accept_compression_encodings,
4320 send_compression_encodings,
4321 )
4322 .apply_max_message_size_config(
4323 max_decoding_message_size,
4324 max_encoding_message_size,
4325 );
4326 let res = grpc.unary(method, req).await;
4327 Ok(res)
4328 };
4329 Box::pin(fut)
4330 }
4331 "/meta.StreamManagerService/Resume" => {
4332 #[allow(non_camel_case_types)]
4333 struct ResumeSvc<T: StreamManagerService>(pub Arc<T>);
4334 impl<
4335 T: StreamManagerService,
4336 > tonic::server::UnaryService<super::ResumeRequest>
4337 for ResumeSvc<T> {
4338 type Response = super::ResumeResponse;
4339 type Future = BoxFuture<
4340 tonic::Response<Self::Response>,
4341 tonic::Status,
4342 >;
4343 fn call(
4344 &mut self,
4345 request: tonic::Request<super::ResumeRequest>,
4346 ) -> Self::Future {
4347 let inner = Arc::clone(&self.0);
4348 let fut = async move {
4349 <T as StreamManagerService>::resume(&inner, request).await
4350 };
4351 Box::pin(fut)
4352 }
4353 }
4354 let accept_compression_encodings = self.accept_compression_encodings;
4355 let send_compression_encodings = self.send_compression_encodings;
4356 let max_decoding_message_size = self.max_decoding_message_size;
4357 let max_encoding_message_size = self.max_encoding_message_size;
4358 let inner = self.inner.clone();
4359 let fut = async move {
4360 let method = ResumeSvc(inner);
4361 let codec = tonic::codec::ProstCodec::default();
4362 let mut grpc = tonic::server::Grpc::new(codec)
4363 .apply_compression_config(
4364 accept_compression_encodings,
4365 send_compression_encodings,
4366 )
4367 .apply_max_message_size_config(
4368 max_decoding_message_size,
4369 max_encoding_message_size,
4370 );
4371 let res = grpc.unary(method, req).await;
4372 Ok(res)
4373 };
4374 Box::pin(fut)
4375 }
4376 "/meta.StreamManagerService/CancelCreatingJobs" => {
4377 #[allow(non_camel_case_types)]
4378 struct CancelCreatingJobsSvc<T: StreamManagerService>(pub Arc<T>);
4379 impl<
4380 T: StreamManagerService,
4381 > tonic::server::UnaryService<super::CancelCreatingJobsRequest>
4382 for CancelCreatingJobsSvc<T> {
4383 type Response = super::CancelCreatingJobsResponse;
4384 type Future = BoxFuture<
4385 tonic::Response<Self::Response>,
4386 tonic::Status,
4387 >;
4388 fn call(
4389 &mut self,
4390 request: tonic::Request<super::CancelCreatingJobsRequest>,
4391 ) -> Self::Future {
4392 let inner = Arc::clone(&self.0);
4393 let fut = async move {
4394 <T as StreamManagerService>::cancel_creating_jobs(
4395 &inner,
4396 request,
4397 )
4398 .await
4399 };
4400 Box::pin(fut)
4401 }
4402 }
4403 let accept_compression_encodings = self.accept_compression_encodings;
4404 let send_compression_encodings = self.send_compression_encodings;
4405 let max_decoding_message_size = self.max_decoding_message_size;
4406 let max_encoding_message_size = self.max_encoding_message_size;
4407 let inner = self.inner.clone();
4408 let fut = async move {
4409 let method = CancelCreatingJobsSvc(inner);
4410 let codec = tonic::codec::ProstCodec::default();
4411 let mut grpc = tonic::server::Grpc::new(codec)
4412 .apply_compression_config(
4413 accept_compression_encodings,
4414 send_compression_encodings,
4415 )
4416 .apply_max_message_size_config(
4417 max_decoding_message_size,
4418 max_encoding_message_size,
4419 );
4420 let res = grpc.unary(method, req).await;
4421 Ok(res)
4422 };
4423 Box::pin(fut)
4424 }
4425 "/meta.StreamManagerService/ListTableFragments" => {
4426 #[allow(non_camel_case_types)]
4427 struct ListTableFragmentsSvc<T: StreamManagerService>(pub Arc<T>);
4428 impl<
4429 T: StreamManagerService,
4430 > tonic::server::UnaryService<super::ListTableFragmentsRequest>
4431 for ListTableFragmentsSvc<T> {
4432 type Response = super::ListTableFragmentsResponse;
4433 type Future = BoxFuture<
4434 tonic::Response<Self::Response>,
4435 tonic::Status,
4436 >;
4437 fn call(
4438 &mut self,
4439 request: tonic::Request<super::ListTableFragmentsRequest>,
4440 ) -> Self::Future {
4441 let inner = Arc::clone(&self.0);
4442 let fut = async move {
4443 <T as StreamManagerService>::list_table_fragments(
4444 &inner,
4445 request,
4446 )
4447 .await
4448 };
4449 Box::pin(fut)
4450 }
4451 }
4452 let accept_compression_encodings = self.accept_compression_encodings;
4453 let send_compression_encodings = self.send_compression_encodings;
4454 let max_decoding_message_size = self.max_decoding_message_size;
4455 let max_encoding_message_size = self.max_encoding_message_size;
4456 let inner = self.inner.clone();
4457 let fut = async move {
4458 let method = ListTableFragmentsSvc(inner);
4459 let codec = tonic::codec::ProstCodec::default();
4460 let mut grpc = tonic::server::Grpc::new(codec)
4461 .apply_compression_config(
4462 accept_compression_encodings,
4463 send_compression_encodings,
4464 )
4465 .apply_max_message_size_config(
4466 max_decoding_message_size,
4467 max_encoding_message_size,
4468 );
4469 let res = grpc.unary(method, req).await;
4470 Ok(res)
4471 };
4472 Box::pin(fut)
4473 }
4474 "/meta.StreamManagerService/ListStreamingJobStates" => {
4475 #[allow(non_camel_case_types)]
4476 struct ListStreamingJobStatesSvc<T: StreamManagerService>(
4477 pub Arc<T>,
4478 );
4479 impl<
4480 T: StreamManagerService,
4481 > tonic::server::UnaryService<super::ListStreamingJobStatesRequest>
4482 for ListStreamingJobStatesSvc<T> {
4483 type Response = super::ListStreamingJobStatesResponse;
4484 type Future = BoxFuture<
4485 tonic::Response<Self::Response>,
4486 tonic::Status,
4487 >;
4488 fn call(
4489 &mut self,
4490 request: tonic::Request<super::ListStreamingJobStatesRequest>,
4491 ) -> Self::Future {
4492 let inner = Arc::clone(&self.0);
4493 let fut = async move {
4494 <T as StreamManagerService>::list_streaming_job_states(
4495 &inner,
4496 request,
4497 )
4498 .await
4499 };
4500 Box::pin(fut)
4501 }
4502 }
4503 let accept_compression_encodings = self.accept_compression_encodings;
4504 let send_compression_encodings = self.send_compression_encodings;
4505 let max_decoding_message_size = self.max_decoding_message_size;
4506 let max_encoding_message_size = self.max_encoding_message_size;
4507 let inner = self.inner.clone();
4508 let fut = async move {
4509 let method = ListStreamingJobStatesSvc(inner);
4510 let codec = tonic::codec::ProstCodec::default();
4511 let mut grpc = tonic::server::Grpc::new(codec)
4512 .apply_compression_config(
4513 accept_compression_encodings,
4514 send_compression_encodings,
4515 )
4516 .apply_max_message_size_config(
4517 max_decoding_message_size,
4518 max_encoding_message_size,
4519 );
4520 let res = grpc.unary(method, req).await;
4521 Ok(res)
4522 };
4523 Box::pin(fut)
4524 }
4525 "/meta.StreamManagerService/ListFragmentDistribution" => {
4526 #[allow(non_camel_case_types)]
4527 struct ListFragmentDistributionSvc<T: StreamManagerService>(
4528 pub Arc<T>,
4529 );
4530 impl<
4531 T: StreamManagerService,
4532 > tonic::server::UnaryService<super::ListFragmentDistributionRequest>
4533 for ListFragmentDistributionSvc<T> {
4534 type Response = super::ListFragmentDistributionResponse;
4535 type Future = BoxFuture<
4536 tonic::Response<Self::Response>,
4537 tonic::Status,
4538 >;
4539 fn call(
4540 &mut self,
4541 request: tonic::Request<
4542 super::ListFragmentDistributionRequest,
4543 >,
4544 ) -> Self::Future {
4545 let inner = Arc::clone(&self.0);
4546 let fut = async move {
4547 <T as StreamManagerService>::list_fragment_distribution(
4548 &inner,
4549 request,
4550 )
4551 .await
4552 };
4553 Box::pin(fut)
4554 }
4555 }
4556 let accept_compression_encodings = self.accept_compression_encodings;
4557 let send_compression_encodings = self.send_compression_encodings;
4558 let max_decoding_message_size = self.max_decoding_message_size;
4559 let max_encoding_message_size = self.max_encoding_message_size;
4560 let inner = self.inner.clone();
4561 let fut = async move {
4562 let method = ListFragmentDistributionSvc(inner);
4563 let codec = tonic::codec::ProstCodec::default();
4564 let mut grpc = tonic::server::Grpc::new(codec)
4565 .apply_compression_config(
4566 accept_compression_encodings,
4567 send_compression_encodings,
4568 )
4569 .apply_max_message_size_config(
4570 max_decoding_message_size,
4571 max_encoding_message_size,
4572 );
4573 let res = grpc.unary(method, req).await;
4574 Ok(res)
4575 };
4576 Box::pin(fut)
4577 }
4578 "/meta.StreamManagerService/ListActorStates" => {
4579 #[allow(non_camel_case_types)]
4580 struct ListActorStatesSvc<T: StreamManagerService>(pub Arc<T>);
4581 impl<
4582 T: StreamManagerService,
4583 > tonic::server::UnaryService<super::ListActorStatesRequest>
4584 for ListActorStatesSvc<T> {
4585 type Response = super::ListActorStatesResponse;
4586 type Future = BoxFuture<
4587 tonic::Response<Self::Response>,
4588 tonic::Status,
4589 >;
4590 fn call(
4591 &mut self,
4592 request: tonic::Request<super::ListActorStatesRequest>,
4593 ) -> Self::Future {
4594 let inner = Arc::clone(&self.0);
4595 let fut = async move {
4596 <T as StreamManagerService>::list_actor_states(
4597 &inner,
4598 request,
4599 )
4600 .await
4601 };
4602 Box::pin(fut)
4603 }
4604 }
4605 let accept_compression_encodings = self.accept_compression_encodings;
4606 let send_compression_encodings = self.send_compression_encodings;
4607 let max_decoding_message_size = self.max_decoding_message_size;
4608 let max_encoding_message_size = self.max_encoding_message_size;
4609 let inner = self.inner.clone();
4610 let fut = async move {
4611 let method = ListActorStatesSvc(inner);
4612 let codec = tonic::codec::ProstCodec::default();
4613 let mut grpc = tonic::server::Grpc::new(codec)
4614 .apply_compression_config(
4615 accept_compression_encodings,
4616 send_compression_encodings,
4617 )
4618 .apply_max_message_size_config(
4619 max_decoding_message_size,
4620 max_encoding_message_size,
4621 );
4622 let res = grpc.unary(method, req).await;
4623 Ok(res)
4624 };
4625 Box::pin(fut)
4626 }
4627 "/meta.StreamManagerService/ListActorSplits" => {
4628 #[allow(non_camel_case_types)]
4629 struct ListActorSplitsSvc<T: StreamManagerService>(pub Arc<T>);
4630 impl<
4631 T: StreamManagerService,
4632 > tonic::server::UnaryService<super::ListActorSplitsRequest>
4633 for ListActorSplitsSvc<T> {
4634 type Response = super::ListActorSplitsResponse;
4635 type Future = BoxFuture<
4636 tonic::Response<Self::Response>,
4637 tonic::Status,
4638 >;
4639 fn call(
4640 &mut self,
4641 request: tonic::Request<super::ListActorSplitsRequest>,
4642 ) -> Self::Future {
4643 let inner = Arc::clone(&self.0);
4644 let fut = async move {
4645 <T as StreamManagerService>::list_actor_splits(
4646 &inner,
4647 request,
4648 )
4649 .await
4650 };
4651 Box::pin(fut)
4652 }
4653 }
4654 let accept_compression_encodings = self.accept_compression_encodings;
4655 let send_compression_encodings = self.send_compression_encodings;
4656 let max_decoding_message_size = self.max_decoding_message_size;
4657 let max_encoding_message_size = self.max_encoding_message_size;
4658 let inner = self.inner.clone();
4659 let fut = async move {
4660 let method = ListActorSplitsSvc(inner);
4661 let codec = tonic::codec::ProstCodec::default();
4662 let mut grpc = tonic::server::Grpc::new(codec)
4663 .apply_compression_config(
4664 accept_compression_encodings,
4665 send_compression_encodings,
4666 )
4667 .apply_max_message_size_config(
4668 max_decoding_message_size,
4669 max_encoding_message_size,
4670 );
4671 let res = grpc.unary(method, req).await;
4672 Ok(res)
4673 };
4674 Box::pin(fut)
4675 }
4676 "/meta.StreamManagerService/ListObjectDependencies" => {
4677 #[allow(non_camel_case_types)]
4678 struct ListObjectDependenciesSvc<T: StreamManagerService>(
4679 pub Arc<T>,
4680 );
4681 impl<
4682 T: StreamManagerService,
4683 > tonic::server::UnaryService<super::ListObjectDependenciesRequest>
4684 for ListObjectDependenciesSvc<T> {
4685 type Response = super::ListObjectDependenciesResponse;
4686 type Future = BoxFuture<
4687 tonic::Response<Self::Response>,
4688 tonic::Status,
4689 >;
4690 fn call(
4691 &mut self,
4692 request: tonic::Request<super::ListObjectDependenciesRequest>,
4693 ) -> Self::Future {
4694 let inner = Arc::clone(&self.0);
4695 let fut = async move {
4696 <T as StreamManagerService>::list_object_dependencies(
4697 &inner,
4698 request,
4699 )
4700 .await
4701 };
4702 Box::pin(fut)
4703 }
4704 }
4705 let accept_compression_encodings = self.accept_compression_encodings;
4706 let send_compression_encodings = self.send_compression_encodings;
4707 let max_decoding_message_size = self.max_decoding_message_size;
4708 let max_encoding_message_size = self.max_encoding_message_size;
4709 let inner = self.inner.clone();
4710 let fut = async move {
4711 let method = ListObjectDependenciesSvc(inner);
4712 let codec = tonic::codec::ProstCodec::default();
4713 let mut grpc = tonic::server::Grpc::new(codec)
4714 .apply_compression_config(
4715 accept_compression_encodings,
4716 send_compression_encodings,
4717 )
4718 .apply_max_message_size_config(
4719 max_decoding_message_size,
4720 max_encoding_message_size,
4721 );
4722 let res = grpc.unary(method, req).await;
4723 Ok(res)
4724 };
4725 Box::pin(fut)
4726 }
4727 "/meta.StreamManagerService/ApplyThrottle" => {
4728 #[allow(non_camel_case_types)]
4729 struct ApplyThrottleSvc<T: StreamManagerService>(pub Arc<T>);
4730 impl<
4731 T: StreamManagerService,
4732 > tonic::server::UnaryService<super::ApplyThrottleRequest>
4733 for ApplyThrottleSvc<T> {
4734 type Response = super::ApplyThrottleResponse;
4735 type Future = BoxFuture<
4736 tonic::Response<Self::Response>,
4737 tonic::Status,
4738 >;
4739 fn call(
4740 &mut self,
4741 request: tonic::Request<super::ApplyThrottleRequest>,
4742 ) -> Self::Future {
4743 let inner = Arc::clone(&self.0);
4744 let fut = async move {
4745 <T as StreamManagerService>::apply_throttle(&inner, request)
4746 .await
4747 };
4748 Box::pin(fut)
4749 }
4750 }
4751 let accept_compression_encodings = self.accept_compression_encodings;
4752 let send_compression_encodings = self.send_compression_encodings;
4753 let max_decoding_message_size = self.max_decoding_message_size;
4754 let max_encoding_message_size = self.max_encoding_message_size;
4755 let inner = self.inner.clone();
4756 let fut = async move {
4757 let method = ApplyThrottleSvc(inner);
4758 let codec = tonic::codec::ProstCodec::default();
4759 let mut grpc = tonic::server::Grpc::new(codec)
4760 .apply_compression_config(
4761 accept_compression_encodings,
4762 send_compression_encodings,
4763 )
4764 .apply_max_message_size_config(
4765 max_decoding_message_size,
4766 max_encoding_message_size,
4767 );
4768 let res = grpc.unary(method, req).await;
4769 Ok(res)
4770 };
4771 Box::pin(fut)
4772 }
4773 "/meta.StreamManagerService/Recover" => {
4774 #[allow(non_camel_case_types)]
4775 struct RecoverSvc<T: StreamManagerService>(pub Arc<T>);
4776 impl<
4777 T: StreamManagerService,
4778 > tonic::server::UnaryService<super::RecoverRequest>
4779 for RecoverSvc<T> {
4780 type Response = super::RecoverResponse;
4781 type Future = BoxFuture<
4782 tonic::Response<Self::Response>,
4783 tonic::Status,
4784 >;
4785 fn call(
4786 &mut self,
4787 request: tonic::Request<super::RecoverRequest>,
4788 ) -> Self::Future {
4789 let inner = Arc::clone(&self.0);
4790 let fut = async move {
4791 <T as StreamManagerService>::recover(&inner, request).await
4792 };
4793 Box::pin(fut)
4794 }
4795 }
4796 let accept_compression_encodings = self.accept_compression_encodings;
4797 let send_compression_encodings = self.send_compression_encodings;
4798 let max_decoding_message_size = self.max_decoding_message_size;
4799 let max_encoding_message_size = self.max_encoding_message_size;
4800 let inner = self.inner.clone();
4801 let fut = async move {
4802 let method = RecoverSvc(inner);
4803 let codec = tonic::codec::ProstCodec::default();
4804 let mut grpc = tonic::server::Grpc::new(codec)
4805 .apply_compression_config(
4806 accept_compression_encodings,
4807 send_compression_encodings,
4808 )
4809 .apply_max_message_size_config(
4810 max_decoding_message_size,
4811 max_encoding_message_size,
4812 );
4813 let res = grpc.unary(method, req).await;
4814 Ok(res)
4815 };
4816 Box::pin(fut)
4817 }
4818 "/meta.StreamManagerService/ListRateLimits" => {
4819 #[allow(non_camel_case_types)]
4820 struct ListRateLimitsSvc<T: StreamManagerService>(pub Arc<T>);
4821 impl<
4822 T: StreamManagerService,
4823 > tonic::server::UnaryService<super::ListRateLimitsRequest>
4824 for ListRateLimitsSvc<T> {
4825 type Response = super::ListRateLimitsResponse;
4826 type Future = BoxFuture<
4827 tonic::Response<Self::Response>,
4828 tonic::Status,
4829 >;
4830 fn call(
4831 &mut self,
4832 request: tonic::Request<super::ListRateLimitsRequest>,
4833 ) -> Self::Future {
4834 let inner = Arc::clone(&self.0);
4835 let fut = async move {
4836 <T as StreamManagerService>::list_rate_limits(
4837 &inner,
4838 request,
4839 )
4840 .await
4841 };
4842 Box::pin(fut)
4843 }
4844 }
4845 let accept_compression_encodings = self.accept_compression_encodings;
4846 let send_compression_encodings = self.send_compression_encodings;
4847 let max_decoding_message_size = self.max_decoding_message_size;
4848 let max_encoding_message_size = self.max_encoding_message_size;
4849 let inner = self.inner.clone();
4850 let fut = async move {
4851 let method = ListRateLimitsSvc(inner);
4852 let codec = tonic::codec::ProstCodec::default();
4853 let mut grpc = tonic::server::Grpc::new(codec)
4854 .apply_compression_config(
4855 accept_compression_encodings,
4856 send_compression_encodings,
4857 )
4858 .apply_max_message_size_config(
4859 max_decoding_message_size,
4860 max_encoding_message_size,
4861 );
4862 let res = grpc.unary(method, req).await;
4863 Ok(res)
4864 };
4865 Box::pin(fut)
4866 }
4867 _ => {
4868 Box::pin(async move {
4869 let mut response = http::Response::new(empty_body());
4870 let headers = response.headers_mut();
4871 headers
4872 .insert(
4873 tonic::Status::GRPC_STATUS,
4874 (tonic::Code::Unimplemented as i32).into(),
4875 );
4876 headers
4877 .insert(
4878 http::header::CONTENT_TYPE,
4879 tonic::metadata::GRPC_CONTENT_TYPE,
4880 );
4881 Ok(response)
4882 })
4883 }
4884 }
4885 }
4886 }
4887 impl<T> Clone for StreamManagerServiceServer<T> {
4888 fn clone(&self) -> Self {
4889 let inner = self.inner.clone();
4890 Self {
4891 inner,
4892 accept_compression_encodings: self.accept_compression_encodings,
4893 send_compression_encodings: self.send_compression_encodings,
4894 max_decoding_message_size: self.max_decoding_message_size,
4895 max_encoding_message_size: self.max_encoding_message_size,
4896 }
4897 }
4898 }
4899 pub const SERVICE_NAME: &str = "meta.StreamManagerService";
4901 impl<T> tonic::server::NamedService for StreamManagerServiceServer<T> {
4902 const NAME: &'static str = SERVICE_NAME;
4903 }
4904}
4905pub mod cluster_service_server {
4907 #![allow(
4908 unused_variables,
4909 dead_code,
4910 missing_docs,
4911 clippy::wildcard_imports,
4912 clippy::let_unit_value,
4913 )]
4914 use tonic::codegen::*;
4915 #[async_trait]
4917 pub trait ClusterService: std::marker::Send + std::marker::Sync + 'static {
4918 async fn add_worker_node(
4919 &self,
4920 request: tonic::Request<super::AddWorkerNodeRequest>,
4921 ) -> std::result::Result<
4922 tonic::Response<super::AddWorkerNodeResponse>,
4923 tonic::Status,
4924 >;
4925 async fn activate_worker_node(
4926 &self,
4927 request: tonic::Request<super::ActivateWorkerNodeRequest>,
4928 ) -> std::result::Result<
4929 tonic::Response<super::ActivateWorkerNodeResponse>,
4930 tonic::Status,
4931 >;
4932 async fn delete_worker_node(
4933 &self,
4934 request: tonic::Request<super::DeleteWorkerNodeRequest>,
4935 ) -> std::result::Result<
4936 tonic::Response<super::DeleteWorkerNodeResponse>,
4937 tonic::Status,
4938 >;
4939 async fn update_worker_node_schedulability(
4940 &self,
4941 request: tonic::Request<super::UpdateWorkerNodeSchedulabilityRequest>,
4942 ) -> std::result::Result<
4943 tonic::Response<super::UpdateWorkerNodeSchedulabilityResponse>,
4944 tonic::Status,
4945 >;
4946 async fn list_all_nodes(
4947 &self,
4948 request: tonic::Request<super::ListAllNodesRequest>,
4949 ) -> std::result::Result<
4950 tonic::Response<super::ListAllNodesResponse>,
4951 tonic::Status,
4952 >;
4953 async fn get_cluster_recovery_status(
4954 &self,
4955 request: tonic::Request<super::GetClusterRecoveryStatusRequest>,
4956 ) -> std::result::Result<
4957 tonic::Response<super::GetClusterRecoveryStatusResponse>,
4958 tonic::Status,
4959 >;
4960 async fn get_meta_store_info(
4961 &self,
4962 request: tonic::Request<super::GetMetaStoreInfoRequest>,
4963 ) -> std::result::Result<
4964 tonic::Response<super::GetMetaStoreInfoResponse>,
4965 tonic::Status,
4966 >;
4967 }
4968 #[derive(Debug)]
4969 pub struct ClusterServiceServer<T> {
4970 inner: Arc<T>,
4971 accept_compression_encodings: EnabledCompressionEncodings,
4972 send_compression_encodings: EnabledCompressionEncodings,
4973 max_decoding_message_size: Option<usize>,
4974 max_encoding_message_size: Option<usize>,
4975 }
4976 impl<T> ClusterServiceServer<T> {
4977 pub fn new(inner: T) -> Self {
4978 Self::from_arc(Arc::new(inner))
4979 }
4980 pub fn from_arc(inner: Arc<T>) -> Self {
4981 Self {
4982 inner,
4983 accept_compression_encodings: Default::default(),
4984 send_compression_encodings: Default::default(),
4985 max_decoding_message_size: None,
4986 max_encoding_message_size: None,
4987 }
4988 }
4989 pub fn with_interceptor<F>(
4990 inner: T,
4991 interceptor: F,
4992 ) -> InterceptedService<Self, F>
4993 where
4994 F: tonic::service::Interceptor,
4995 {
4996 InterceptedService::new(Self::new(inner), interceptor)
4997 }
4998 #[must_use]
5000 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5001 self.accept_compression_encodings.enable(encoding);
5002 self
5003 }
5004 #[must_use]
5006 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5007 self.send_compression_encodings.enable(encoding);
5008 self
5009 }
5010 #[must_use]
5014 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5015 self.max_decoding_message_size = Some(limit);
5016 self
5017 }
5018 #[must_use]
5022 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5023 self.max_encoding_message_size = Some(limit);
5024 self
5025 }
5026 }
5027 impl<T, B> tonic::codegen::Service<http::Request<B>> for ClusterServiceServer<T>
5028 where
5029 T: ClusterService,
5030 B: Body + std::marker::Send + 'static,
5031 B::Error: Into<StdError> + std::marker::Send + 'static,
5032 {
5033 type Response = http::Response<tonic::body::BoxBody>;
5034 type Error = std::convert::Infallible;
5035 type Future = BoxFuture<Self::Response, Self::Error>;
5036 fn poll_ready(
5037 &mut self,
5038 _cx: &mut Context<'_>,
5039 ) -> Poll<std::result::Result<(), Self::Error>> {
5040 Poll::Ready(Ok(()))
5041 }
5042 fn call(&mut self, req: http::Request<B>) -> Self::Future {
5043 match req.uri().path() {
5044 "/meta.ClusterService/AddWorkerNode" => {
5045 #[allow(non_camel_case_types)]
5046 struct AddWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
5047 impl<
5048 T: ClusterService,
5049 > tonic::server::UnaryService<super::AddWorkerNodeRequest>
5050 for AddWorkerNodeSvc<T> {
5051 type Response = super::AddWorkerNodeResponse;
5052 type Future = BoxFuture<
5053 tonic::Response<Self::Response>,
5054 tonic::Status,
5055 >;
5056 fn call(
5057 &mut self,
5058 request: tonic::Request<super::AddWorkerNodeRequest>,
5059 ) -> Self::Future {
5060 let inner = Arc::clone(&self.0);
5061 let fut = async move {
5062 <T as ClusterService>::add_worker_node(&inner, request)
5063 .await
5064 };
5065 Box::pin(fut)
5066 }
5067 }
5068 let accept_compression_encodings = self.accept_compression_encodings;
5069 let send_compression_encodings = self.send_compression_encodings;
5070 let max_decoding_message_size = self.max_decoding_message_size;
5071 let max_encoding_message_size = self.max_encoding_message_size;
5072 let inner = self.inner.clone();
5073 let fut = async move {
5074 let method = AddWorkerNodeSvc(inner);
5075 let codec = tonic::codec::ProstCodec::default();
5076 let mut grpc = tonic::server::Grpc::new(codec)
5077 .apply_compression_config(
5078 accept_compression_encodings,
5079 send_compression_encodings,
5080 )
5081 .apply_max_message_size_config(
5082 max_decoding_message_size,
5083 max_encoding_message_size,
5084 );
5085 let res = grpc.unary(method, req).await;
5086 Ok(res)
5087 };
5088 Box::pin(fut)
5089 }
5090 "/meta.ClusterService/ActivateWorkerNode" => {
5091 #[allow(non_camel_case_types)]
5092 struct ActivateWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
5093 impl<
5094 T: ClusterService,
5095 > tonic::server::UnaryService<super::ActivateWorkerNodeRequest>
5096 for ActivateWorkerNodeSvc<T> {
5097 type Response = super::ActivateWorkerNodeResponse;
5098 type Future = BoxFuture<
5099 tonic::Response<Self::Response>,
5100 tonic::Status,
5101 >;
5102 fn call(
5103 &mut self,
5104 request: tonic::Request<super::ActivateWorkerNodeRequest>,
5105 ) -> Self::Future {
5106 let inner = Arc::clone(&self.0);
5107 let fut = async move {
5108 <T as ClusterService>::activate_worker_node(&inner, request)
5109 .await
5110 };
5111 Box::pin(fut)
5112 }
5113 }
5114 let accept_compression_encodings = self.accept_compression_encodings;
5115 let send_compression_encodings = self.send_compression_encodings;
5116 let max_decoding_message_size = self.max_decoding_message_size;
5117 let max_encoding_message_size = self.max_encoding_message_size;
5118 let inner = self.inner.clone();
5119 let fut = async move {
5120 let method = ActivateWorkerNodeSvc(inner);
5121 let codec = tonic::codec::ProstCodec::default();
5122 let mut grpc = tonic::server::Grpc::new(codec)
5123 .apply_compression_config(
5124 accept_compression_encodings,
5125 send_compression_encodings,
5126 )
5127 .apply_max_message_size_config(
5128 max_decoding_message_size,
5129 max_encoding_message_size,
5130 );
5131 let res = grpc.unary(method, req).await;
5132 Ok(res)
5133 };
5134 Box::pin(fut)
5135 }
5136 "/meta.ClusterService/DeleteWorkerNode" => {
5137 #[allow(non_camel_case_types)]
5138 struct DeleteWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
5139 impl<
5140 T: ClusterService,
5141 > tonic::server::UnaryService<super::DeleteWorkerNodeRequest>
5142 for DeleteWorkerNodeSvc<T> {
5143 type Response = super::DeleteWorkerNodeResponse;
5144 type Future = BoxFuture<
5145 tonic::Response<Self::Response>,
5146 tonic::Status,
5147 >;
5148 fn call(
5149 &mut self,
5150 request: tonic::Request<super::DeleteWorkerNodeRequest>,
5151 ) -> Self::Future {
5152 let inner = Arc::clone(&self.0);
5153 let fut = async move {
5154 <T as ClusterService>::delete_worker_node(&inner, request)
5155 .await
5156 };
5157 Box::pin(fut)
5158 }
5159 }
5160 let accept_compression_encodings = self.accept_compression_encodings;
5161 let send_compression_encodings = self.send_compression_encodings;
5162 let max_decoding_message_size = self.max_decoding_message_size;
5163 let max_encoding_message_size = self.max_encoding_message_size;
5164 let inner = self.inner.clone();
5165 let fut = async move {
5166 let method = DeleteWorkerNodeSvc(inner);
5167 let codec = tonic::codec::ProstCodec::default();
5168 let mut grpc = tonic::server::Grpc::new(codec)
5169 .apply_compression_config(
5170 accept_compression_encodings,
5171 send_compression_encodings,
5172 )
5173 .apply_max_message_size_config(
5174 max_decoding_message_size,
5175 max_encoding_message_size,
5176 );
5177 let res = grpc.unary(method, req).await;
5178 Ok(res)
5179 };
5180 Box::pin(fut)
5181 }
5182 "/meta.ClusterService/UpdateWorkerNodeSchedulability" => {
5183 #[allow(non_camel_case_types)]
5184 struct UpdateWorkerNodeSchedulabilitySvc<T: ClusterService>(
5185 pub Arc<T>,
5186 );
5187 impl<
5188 T: ClusterService,
5189 > tonic::server::UnaryService<
5190 super::UpdateWorkerNodeSchedulabilityRequest,
5191 > for UpdateWorkerNodeSchedulabilitySvc<T> {
5192 type Response = super::UpdateWorkerNodeSchedulabilityResponse;
5193 type Future = BoxFuture<
5194 tonic::Response<Self::Response>,
5195 tonic::Status,
5196 >;
5197 fn call(
5198 &mut self,
5199 request: tonic::Request<
5200 super::UpdateWorkerNodeSchedulabilityRequest,
5201 >,
5202 ) -> Self::Future {
5203 let inner = Arc::clone(&self.0);
5204 let fut = async move {
5205 <T as ClusterService>::update_worker_node_schedulability(
5206 &inner,
5207 request,
5208 )
5209 .await
5210 };
5211 Box::pin(fut)
5212 }
5213 }
5214 let accept_compression_encodings = self.accept_compression_encodings;
5215 let send_compression_encodings = self.send_compression_encodings;
5216 let max_decoding_message_size = self.max_decoding_message_size;
5217 let max_encoding_message_size = self.max_encoding_message_size;
5218 let inner = self.inner.clone();
5219 let fut = async move {
5220 let method = UpdateWorkerNodeSchedulabilitySvc(inner);
5221 let codec = tonic::codec::ProstCodec::default();
5222 let mut grpc = tonic::server::Grpc::new(codec)
5223 .apply_compression_config(
5224 accept_compression_encodings,
5225 send_compression_encodings,
5226 )
5227 .apply_max_message_size_config(
5228 max_decoding_message_size,
5229 max_encoding_message_size,
5230 );
5231 let res = grpc.unary(method, req).await;
5232 Ok(res)
5233 };
5234 Box::pin(fut)
5235 }
5236 "/meta.ClusterService/ListAllNodes" => {
5237 #[allow(non_camel_case_types)]
5238 struct ListAllNodesSvc<T: ClusterService>(pub Arc<T>);
5239 impl<
5240 T: ClusterService,
5241 > tonic::server::UnaryService<super::ListAllNodesRequest>
5242 for ListAllNodesSvc<T> {
5243 type Response = super::ListAllNodesResponse;
5244 type Future = BoxFuture<
5245 tonic::Response<Self::Response>,
5246 tonic::Status,
5247 >;
5248 fn call(
5249 &mut self,
5250 request: tonic::Request<super::ListAllNodesRequest>,
5251 ) -> Self::Future {
5252 let inner = Arc::clone(&self.0);
5253 let fut = async move {
5254 <T as ClusterService>::list_all_nodes(&inner, request).await
5255 };
5256 Box::pin(fut)
5257 }
5258 }
5259 let accept_compression_encodings = self.accept_compression_encodings;
5260 let send_compression_encodings = self.send_compression_encodings;
5261 let max_decoding_message_size = self.max_decoding_message_size;
5262 let max_encoding_message_size = self.max_encoding_message_size;
5263 let inner = self.inner.clone();
5264 let fut = async move {
5265 let method = ListAllNodesSvc(inner);
5266 let codec = tonic::codec::ProstCodec::default();
5267 let mut grpc = tonic::server::Grpc::new(codec)
5268 .apply_compression_config(
5269 accept_compression_encodings,
5270 send_compression_encodings,
5271 )
5272 .apply_max_message_size_config(
5273 max_decoding_message_size,
5274 max_encoding_message_size,
5275 );
5276 let res = grpc.unary(method, req).await;
5277 Ok(res)
5278 };
5279 Box::pin(fut)
5280 }
5281 "/meta.ClusterService/GetClusterRecoveryStatus" => {
5282 #[allow(non_camel_case_types)]
5283 struct GetClusterRecoveryStatusSvc<T: ClusterService>(pub Arc<T>);
5284 impl<
5285 T: ClusterService,
5286 > tonic::server::UnaryService<super::GetClusterRecoveryStatusRequest>
5287 for GetClusterRecoveryStatusSvc<T> {
5288 type Response = super::GetClusterRecoveryStatusResponse;
5289 type Future = BoxFuture<
5290 tonic::Response<Self::Response>,
5291 tonic::Status,
5292 >;
5293 fn call(
5294 &mut self,
5295 request: tonic::Request<
5296 super::GetClusterRecoveryStatusRequest,
5297 >,
5298 ) -> Self::Future {
5299 let inner = Arc::clone(&self.0);
5300 let fut = async move {
5301 <T as ClusterService>::get_cluster_recovery_status(
5302 &inner,
5303 request,
5304 )
5305 .await
5306 };
5307 Box::pin(fut)
5308 }
5309 }
5310 let accept_compression_encodings = self.accept_compression_encodings;
5311 let send_compression_encodings = self.send_compression_encodings;
5312 let max_decoding_message_size = self.max_decoding_message_size;
5313 let max_encoding_message_size = self.max_encoding_message_size;
5314 let inner = self.inner.clone();
5315 let fut = async move {
5316 let method = GetClusterRecoveryStatusSvc(inner);
5317 let codec = tonic::codec::ProstCodec::default();
5318 let mut grpc = tonic::server::Grpc::new(codec)
5319 .apply_compression_config(
5320 accept_compression_encodings,
5321 send_compression_encodings,
5322 )
5323 .apply_max_message_size_config(
5324 max_decoding_message_size,
5325 max_encoding_message_size,
5326 );
5327 let res = grpc.unary(method, req).await;
5328 Ok(res)
5329 };
5330 Box::pin(fut)
5331 }
5332 "/meta.ClusterService/GetMetaStoreInfo" => {
5333 #[allow(non_camel_case_types)]
5334 struct GetMetaStoreInfoSvc<T: ClusterService>(pub Arc<T>);
5335 impl<
5336 T: ClusterService,
5337 > tonic::server::UnaryService<super::GetMetaStoreInfoRequest>
5338 for GetMetaStoreInfoSvc<T> {
5339 type Response = super::GetMetaStoreInfoResponse;
5340 type Future = BoxFuture<
5341 tonic::Response<Self::Response>,
5342 tonic::Status,
5343 >;
5344 fn call(
5345 &mut self,
5346 request: tonic::Request<super::GetMetaStoreInfoRequest>,
5347 ) -> Self::Future {
5348 let inner = Arc::clone(&self.0);
5349 let fut = async move {
5350 <T as ClusterService>::get_meta_store_info(&inner, request)
5351 .await
5352 };
5353 Box::pin(fut)
5354 }
5355 }
5356 let accept_compression_encodings = self.accept_compression_encodings;
5357 let send_compression_encodings = self.send_compression_encodings;
5358 let max_decoding_message_size = self.max_decoding_message_size;
5359 let max_encoding_message_size = self.max_encoding_message_size;
5360 let inner = self.inner.clone();
5361 let fut = async move {
5362 let method = GetMetaStoreInfoSvc(inner);
5363 let codec = tonic::codec::ProstCodec::default();
5364 let mut grpc = tonic::server::Grpc::new(codec)
5365 .apply_compression_config(
5366 accept_compression_encodings,
5367 send_compression_encodings,
5368 )
5369 .apply_max_message_size_config(
5370 max_decoding_message_size,
5371 max_encoding_message_size,
5372 );
5373 let res = grpc.unary(method, req).await;
5374 Ok(res)
5375 };
5376 Box::pin(fut)
5377 }
5378 _ => {
5379 Box::pin(async move {
5380 let mut response = http::Response::new(empty_body());
5381 let headers = response.headers_mut();
5382 headers
5383 .insert(
5384 tonic::Status::GRPC_STATUS,
5385 (tonic::Code::Unimplemented as i32).into(),
5386 );
5387 headers
5388 .insert(
5389 http::header::CONTENT_TYPE,
5390 tonic::metadata::GRPC_CONTENT_TYPE,
5391 );
5392 Ok(response)
5393 })
5394 }
5395 }
5396 }
5397 }
5398 impl<T> Clone for ClusterServiceServer<T> {
5399 fn clone(&self) -> Self {
5400 let inner = self.inner.clone();
5401 Self {
5402 inner,
5403 accept_compression_encodings: self.accept_compression_encodings,
5404 send_compression_encodings: self.send_compression_encodings,
5405 max_decoding_message_size: self.max_decoding_message_size,
5406 max_encoding_message_size: self.max_encoding_message_size,
5407 }
5408 }
5409 }
5410 pub const SERVICE_NAME: &str = "meta.ClusterService";
5412 impl<T> tonic::server::NamedService for ClusterServiceServer<T> {
5413 const NAME: &'static str = SERVICE_NAME;
5414 }
5415}
5416pub mod notification_service_server {
5418 #![allow(
5419 unused_variables,
5420 dead_code,
5421 missing_docs,
5422 clippy::wildcard_imports,
5423 clippy::let_unit_value,
5424 )]
5425 use tonic::codegen::*;
5426 #[async_trait]
5428 pub trait NotificationService: std::marker::Send + std::marker::Sync + 'static {
5429 type SubscribeStream: tonic::codegen::tokio_stream::Stream<
5431 Item = std::result::Result<super::SubscribeResponse, tonic::Status>,
5432 >
5433 + std::marker::Send
5434 + 'static;
5435 async fn subscribe(
5436 &self,
5437 request: tonic::Request<super::SubscribeRequest>,
5438 ) -> std::result::Result<tonic::Response<Self::SubscribeStream>, tonic::Status>;
5439 }
5440 #[derive(Debug)]
5441 pub struct NotificationServiceServer<T> {
5442 inner: Arc<T>,
5443 accept_compression_encodings: EnabledCompressionEncodings,
5444 send_compression_encodings: EnabledCompressionEncodings,
5445 max_decoding_message_size: Option<usize>,
5446 max_encoding_message_size: Option<usize>,
5447 }
5448 impl<T> NotificationServiceServer<T> {
5449 pub fn new(inner: T) -> Self {
5450 Self::from_arc(Arc::new(inner))
5451 }
5452 pub fn from_arc(inner: Arc<T>) -> Self {
5453 Self {
5454 inner,
5455 accept_compression_encodings: Default::default(),
5456 send_compression_encodings: Default::default(),
5457 max_decoding_message_size: None,
5458 max_encoding_message_size: None,
5459 }
5460 }
5461 pub fn with_interceptor<F>(
5462 inner: T,
5463 interceptor: F,
5464 ) -> InterceptedService<Self, F>
5465 where
5466 F: tonic::service::Interceptor,
5467 {
5468 InterceptedService::new(Self::new(inner), interceptor)
5469 }
5470 #[must_use]
5472 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5473 self.accept_compression_encodings.enable(encoding);
5474 self
5475 }
5476 #[must_use]
5478 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5479 self.send_compression_encodings.enable(encoding);
5480 self
5481 }
5482 #[must_use]
5486 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5487 self.max_decoding_message_size = Some(limit);
5488 self
5489 }
5490 #[must_use]
5494 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5495 self.max_encoding_message_size = Some(limit);
5496 self
5497 }
5498 }
5499 impl<T, B> tonic::codegen::Service<http::Request<B>> for NotificationServiceServer<T>
5500 where
5501 T: NotificationService,
5502 B: Body + std::marker::Send + 'static,
5503 B::Error: Into<StdError> + std::marker::Send + 'static,
5504 {
5505 type Response = http::Response<tonic::body::BoxBody>;
5506 type Error = std::convert::Infallible;
5507 type Future = BoxFuture<Self::Response, Self::Error>;
5508 fn poll_ready(
5509 &mut self,
5510 _cx: &mut Context<'_>,
5511 ) -> Poll<std::result::Result<(), Self::Error>> {
5512 Poll::Ready(Ok(()))
5513 }
5514 fn call(&mut self, req: http::Request<B>) -> Self::Future {
5515 match req.uri().path() {
5516 "/meta.NotificationService/Subscribe" => {
5517 #[allow(non_camel_case_types)]
5518 struct SubscribeSvc<T: NotificationService>(pub Arc<T>);
5519 impl<
5520 T: NotificationService,
5521 > tonic::server::ServerStreamingService<super::SubscribeRequest>
5522 for SubscribeSvc<T> {
5523 type Response = super::SubscribeResponse;
5524 type ResponseStream = T::SubscribeStream;
5525 type Future = BoxFuture<
5526 tonic::Response<Self::ResponseStream>,
5527 tonic::Status,
5528 >;
5529 fn call(
5530 &mut self,
5531 request: tonic::Request<super::SubscribeRequest>,
5532 ) -> Self::Future {
5533 let inner = Arc::clone(&self.0);
5534 let fut = async move {
5535 <T as NotificationService>::subscribe(&inner, request).await
5536 };
5537 Box::pin(fut)
5538 }
5539 }
5540 let accept_compression_encodings = self.accept_compression_encodings;
5541 let send_compression_encodings = self.send_compression_encodings;
5542 let max_decoding_message_size = self.max_decoding_message_size;
5543 let max_encoding_message_size = self.max_encoding_message_size;
5544 let inner = self.inner.clone();
5545 let fut = async move {
5546 let method = SubscribeSvc(inner);
5547 let codec = tonic::codec::ProstCodec::default();
5548 let mut grpc = tonic::server::Grpc::new(codec)
5549 .apply_compression_config(
5550 accept_compression_encodings,
5551 send_compression_encodings,
5552 )
5553 .apply_max_message_size_config(
5554 max_decoding_message_size,
5555 max_encoding_message_size,
5556 );
5557 let res = grpc.server_streaming(method, req).await;
5558 Ok(res)
5559 };
5560 Box::pin(fut)
5561 }
5562 _ => {
5563 Box::pin(async move {
5564 let mut response = http::Response::new(empty_body());
5565 let headers = response.headers_mut();
5566 headers
5567 .insert(
5568 tonic::Status::GRPC_STATUS,
5569 (tonic::Code::Unimplemented as i32).into(),
5570 );
5571 headers
5572 .insert(
5573 http::header::CONTENT_TYPE,
5574 tonic::metadata::GRPC_CONTENT_TYPE,
5575 );
5576 Ok(response)
5577 })
5578 }
5579 }
5580 }
5581 }
5582 impl<T> Clone for NotificationServiceServer<T> {
5583 fn clone(&self) -> Self {
5584 let inner = self.inner.clone();
5585 Self {
5586 inner,
5587 accept_compression_encodings: self.accept_compression_encodings,
5588 send_compression_encodings: self.send_compression_encodings,
5589 max_decoding_message_size: self.max_decoding_message_size,
5590 max_encoding_message_size: self.max_encoding_message_size,
5591 }
5592 }
5593 }
5594 pub const SERVICE_NAME: &str = "meta.NotificationService";
5596 impl<T> tonic::server::NamedService for NotificationServiceServer<T> {
5597 const NAME: &'static str = SERVICE_NAME;
5598 }
5599}
5600pub mod scale_service_server {
5602 #![allow(
5603 unused_variables,
5604 dead_code,
5605 missing_docs,
5606 clippy::wildcard_imports,
5607 clippy::let_unit_value,
5608 )]
5609 use tonic::codegen::*;
5610 #[async_trait]
5612 pub trait ScaleService: std::marker::Send + std::marker::Sync + 'static {
5613 async fn get_cluster_info(
5614 &self,
5615 request: tonic::Request<super::GetClusterInfoRequest>,
5616 ) -> std::result::Result<
5617 tonic::Response<super::GetClusterInfoResponse>,
5618 tonic::Status,
5619 >;
5620 async fn reschedule(
5621 &self,
5622 request: tonic::Request<super::RescheduleRequest>,
5623 ) -> std::result::Result<
5624 tonic::Response<super::RescheduleResponse>,
5625 tonic::Status,
5626 >;
5627 async fn update_streaming_job_node_labels(
5628 &self,
5629 request: tonic::Request<super::UpdateStreamingJobNodeLabelsRequest>,
5630 ) -> std::result::Result<
5631 tonic::Response<super::UpdateStreamingJobNodeLabelsResponse>,
5632 tonic::Status,
5633 >;
5634 async fn get_serverless_streaming_jobs_status(
5635 &self,
5636 request: tonic::Request<super::GetServerlessStreamingJobsStatusRequest>,
5637 ) -> std::result::Result<
5638 tonic::Response<super::GetServerlessStreamingJobsStatusResponse>,
5639 tonic::Status,
5640 >;
5641 }
5642 #[derive(Debug)]
5644 pub struct ScaleServiceServer<T> {
5645 inner: Arc<T>,
5646 accept_compression_encodings: EnabledCompressionEncodings,
5647 send_compression_encodings: EnabledCompressionEncodings,
5648 max_decoding_message_size: Option<usize>,
5649 max_encoding_message_size: Option<usize>,
5650 }
5651 impl<T> ScaleServiceServer<T> {
5652 pub fn new(inner: T) -> Self {
5653 Self::from_arc(Arc::new(inner))
5654 }
5655 pub fn from_arc(inner: Arc<T>) -> Self {
5656 Self {
5657 inner,
5658 accept_compression_encodings: Default::default(),
5659 send_compression_encodings: Default::default(),
5660 max_decoding_message_size: None,
5661 max_encoding_message_size: None,
5662 }
5663 }
5664 pub fn with_interceptor<F>(
5665 inner: T,
5666 interceptor: F,
5667 ) -> InterceptedService<Self, F>
5668 where
5669 F: tonic::service::Interceptor,
5670 {
5671 InterceptedService::new(Self::new(inner), interceptor)
5672 }
5673 #[must_use]
5675 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5676 self.accept_compression_encodings.enable(encoding);
5677 self
5678 }
5679 #[must_use]
5681 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5682 self.send_compression_encodings.enable(encoding);
5683 self
5684 }
5685 #[must_use]
5689 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5690 self.max_decoding_message_size = Some(limit);
5691 self
5692 }
5693 #[must_use]
5697 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5698 self.max_encoding_message_size = Some(limit);
5699 self
5700 }
5701 }
5702 impl<T, B> tonic::codegen::Service<http::Request<B>> for ScaleServiceServer<T>
5703 where
5704 T: ScaleService,
5705 B: Body + std::marker::Send + 'static,
5706 B::Error: Into<StdError> + std::marker::Send + 'static,
5707 {
5708 type Response = http::Response<tonic::body::BoxBody>;
5709 type Error = std::convert::Infallible;
5710 type Future = BoxFuture<Self::Response, Self::Error>;
5711 fn poll_ready(
5712 &mut self,
5713 _cx: &mut Context<'_>,
5714 ) -> Poll<std::result::Result<(), Self::Error>> {
5715 Poll::Ready(Ok(()))
5716 }
5717 fn call(&mut self, req: http::Request<B>) -> Self::Future {
5718 match req.uri().path() {
5719 "/meta.ScaleService/GetClusterInfo" => {
5720 #[allow(non_camel_case_types)]
5721 struct GetClusterInfoSvc<T: ScaleService>(pub Arc<T>);
5722 impl<
5723 T: ScaleService,
5724 > tonic::server::UnaryService<super::GetClusterInfoRequest>
5725 for GetClusterInfoSvc<T> {
5726 type Response = super::GetClusterInfoResponse;
5727 type Future = BoxFuture<
5728 tonic::Response<Self::Response>,
5729 tonic::Status,
5730 >;
5731 fn call(
5732 &mut self,
5733 request: tonic::Request<super::GetClusterInfoRequest>,
5734 ) -> Self::Future {
5735 let inner = Arc::clone(&self.0);
5736 let fut = async move {
5737 <T as ScaleService>::get_cluster_info(&inner, request).await
5738 };
5739 Box::pin(fut)
5740 }
5741 }
5742 let accept_compression_encodings = self.accept_compression_encodings;
5743 let send_compression_encodings = self.send_compression_encodings;
5744 let max_decoding_message_size = self.max_decoding_message_size;
5745 let max_encoding_message_size = self.max_encoding_message_size;
5746 let inner = self.inner.clone();
5747 let fut = async move {
5748 let method = GetClusterInfoSvc(inner);
5749 let codec = tonic::codec::ProstCodec::default();
5750 let mut grpc = tonic::server::Grpc::new(codec)
5751 .apply_compression_config(
5752 accept_compression_encodings,
5753 send_compression_encodings,
5754 )
5755 .apply_max_message_size_config(
5756 max_decoding_message_size,
5757 max_encoding_message_size,
5758 );
5759 let res = grpc.unary(method, req).await;
5760 Ok(res)
5761 };
5762 Box::pin(fut)
5763 }
5764 "/meta.ScaleService/Reschedule" => {
5765 #[allow(non_camel_case_types)]
5766 struct RescheduleSvc<T: ScaleService>(pub Arc<T>);
5767 impl<
5768 T: ScaleService,
5769 > tonic::server::UnaryService<super::RescheduleRequest>
5770 for RescheduleSvc<T> {
5771 type Response = super::RescheduleResponse;
5772 type Future = BoxFuture<
5773 tonic::Response<Self::Response>,
5774 tonic::Status,
5775 >;
5776 fn call(
5777 &mut self,
5778 request: tonic::Request<super::RescheduleRequest>,
5779 ) -> Self::Future {
5780 let inner = Arc::clone(&self.0);
5781 let fut = async move {
5782 <T as ScaleService>::reschedule(&inner, request).await
5783 };
5784 Box::pin(fut)
5785 }
5786 }
5787 let accept_compression_encodings = self.accept_compression_encodings;
5788 let send_compression_encodings = self.send_compression_encodings;
5789 let max_decoding_message_size = self.max_decoding_message_size;
5790 let max_encoding_message_size = self.max_encoding_message_size;
5791 let inner = self.inner.clone();
5792 let fut = async move {
5793 let method = RescheduleSvc(inner);
5794 let codec = tonic::codec::ProstCodec::default();
5795 let mut grpc = tonic::server::Grpc::new(codec)
5796 .apply_compression_config(
5797 accept_compression_encodings,
5798 send_compression_encodings,
5799 )
5800 .apply_max_message_size_config(
5801 max_decoding_message_size,
5802 max_encoding_message_size,
5803 );
5804 let res = grpc.unary(method, req).await;
5805 Ok(res)
5806 };
5807 Box::pin(fut)
5808 }
5809 "/meta.ScaleService/UpdateStreamingJobNodeLabels" => {
5810 #[allow(non_camel_case_types)]
5811 struct UpdateStreamingJobNodeLabelsSvc<T: ScaleService>(pub Arc<T>);
5812 impl<
5813 T: ScaleService,
5814 > tonic::server::UnaryService<
5815 super::UpdateStreamingJobNodeLabelsRequest,
5816 > for UpdateStreamingJobNodeLabelsSvc<T> {
5817 type Response = super::UpdateStreamingJobNodeLabelsResponse;
5818 type Future = BoxFuture<
5819 tonic::Response<Self::Response>,
5820 tonic::Status,
5821 >;
5822 fn call(
5823 &mut self,
5824 request: tonic::Request<
5825 super::UpdateStreamingJobNodeLabelsRequest,
5826 >,
5827 ) -> Self::Future {
5828 let inner = Arc::clone(&self.0);
5829 let fut = async move {
5830 <T as ScaleService>::update_streaming_job_node_labels(
5831 &inner,
5832 request,
5833 )
5834 .await
5835 };
5836 Box::pin(fut)
5837 }
5838 }
5839 let accept_compression_encodings = self.accept_compression_encodings;
5840 let send_compression_encodings = self.send_compression_encodings;
5841 let max_decoding_message_size = self.max_decoding_message_size;
5842 let max_encoding_message_size = self.max_encoding_message_size;
5843 let inner = self.inner.clone();
5844 let fut = async move {
5845 let method = UpdateStreamingJobNodeLabelsSvc(inner);
5846 let codec = tonic::codec::ProstCodec::default();
5847 let mut grpc = tonic::server::Grpc::new(codec)
5848 .apply_compression_config(
5849 accept_compression_encodings,
5850 send_compression_encodings,
5851 )
5852 .apply_max_message_size_config(
5853 max_decoding_message_size,
5854 max_encoding_message_size,
5855 );
5856 let res = grpc.unary(method, req).await;
5857 Ok(res)
5858 };
5859 Box::pin(fut)
5860 }
5861 "/meta.ScaleService/GetServerlessStreamingJobsStatus" => {
5862 #[allow(non_camel_case_types)]
5863 struct GetServerlessStreamingJobsStatusSvc<T: ScaleService>(
5864 pub Arc<T>,
5865 );
5866 impl<
5867 T: ScaleService,
5868 > tonic::server::UnaryService<
5869 super::GetServerlessStreamingJobsStatusRequest,
5870 > for GetServerlessStreamingJobsStatusSvc<T> {
5871 type Response = super::GetServerlessStreamingJobsStatusResponse;
5872 type Future = BoxFuture<
5873 tonic::Response<Self::Response>,
5874 tonic::Status,
5875 >;
5876 fn call(
5877 &mut self,
5878 request: tonic::Request<
5879 super::GetServerlessStreamingJobsStatusRequest,
5880 >,
5881 ) -> Self::Future {
5882 let inner = Arc::clone(&self.0);
5883 let fut = async move {
5884 <T as ScaleService>::get_serverless_streaming_jobs_status(
5885 &inner,
5886 request,
5887 )
5888 .await
5889 };
5890 Box::pin(fut)
5891 }
5892 }
5893 let accept_compression_encodings = self.accept_compression_encodings;
5894 let send_compression_encodings = self.send_compression_encodings;
5895 let max_decoding_message_size = self.max_decoding_message_size;
5896 let max_encoding_message_size = self.max_encoding_message_size;
5897 let inner = self.inner.clone();
5898 let fut = async move {
5899 let method = GetServerlessStreamingJobsStatusSvc(inner);
5900 let codec = tonic::codec::ProstCodec::default();
5901 let mut grpc = tonic::server::Grpc::new(codec)
5902 .apply_compression_config(
5903 accept_compression_encodings,
5904 send_compression_encodings,
5905 )
5906 .apply_max_message_size_config(
5907 max_decoding_message_size,
5908 max_encoding_message_size,
5909 );
5910 let res = grpc.unary(method, req).await;
5911 Ok(res)
5912 };
5913 Box::pin(fut)
5914 }
5915 _ => {
5916 Box::pin(async move {
5917 let mut response = http::Response::new(empty_body());
5918 let headers = response.headers_mut();
5919 headers
5920 .insert(
5921 tonic::Status::GRPC_STATUS,
5922 (tonic::Code::Unimplemented as i32).into(),
5923 );
5924 headers
5925 .insert(
5926 http::header::CONTENT_TYPE,
5927 tonic::metadata::GRPC_CONTENT_TYPE,
5928 );
5929 Ok(response)
5930 })
5931 }
5932 }
5933 }
5934 }
5935 impl<T> Clone for ScaleServiceServer<T> {
5936 fn clone(&self) -> Self {
5937 let inner = self.inner.clone();
5938 Self {
5939 inner,
5940 accept_compression_encodings: self.accept_compression_encodings,
5941 send_compression_encodings: self.send_compression_encodings,
5942 max_decoding_message_size: self.max_decoding_message_size,
5943 max_encoding_message_size: self.max_encoding_message_size,
5944 }
5945 }
5946 }
5947 pub const SERVICE_NAME: &str = "meta.ScaleService";
5949 impl<T> tonic::server::NamedService for ScaleServiceServer<T> {
5950 const NAME: &'static str = SERVICE_NAME;
5951 }
5952}
5953pub mod meta_member_service_server {
5955 #![allow(
5956 unused_variables,
5957 dead_code,
5958 missing_docs,
5959 clippy::wildcard_imports,
5960 clippy::let_unit_value,
5961 )]
5962 use tonic::codegen::*;
5963 #[async_trait]
5965 pub trait MetaMemberService: std::marker::Send + std::marker::Sync + 'static {
5966 async fn members(
5967 &self,
5968 request: tonic::Request<super::MembersRequest>,
5969 ) -> std::result::Result<tonic::Response<super::MembersResponse>, tonic::Status>;
5970 }
5971 #[derive(Debug)]
5972 pub struct MetaMemberServiceServer<T> {
5973 inner: Arc<T>,
5974 accept_compression_encodings: EnabledCompressionEncodings,
5975 send_compression_encodings: EnabledCompressionEncodings,
5976 max_decoding_message_size: Option<usize>,
5977 max_encoding_message_size: Option<usize>,
5978 }
5979 impl<T> MetaMemberServiceServer<T> {
5980 pub fn new(inner: T) -> Self {
5981 Self::from_arc(Arc::new(inner))
5982 }
5983 pub fn from_arc(inner: Arc<T>) -> Self {
5984 Self {
5985 inner,
5986 accept_compression_encodings: Default::default(),
5987 send_compression_encodings: Default::default(),
5988 max_decoding_message_size: None,
5989 max_encoding_message_size: None,
5990 }
5991 }
5992 pub fn with_interceptor<F>(
5993 inner: T,
5994 interceptor: F,
5995 ) -> InterceptedService<Self, F>
5996 where
5997 F: tonic::service::Interceptor,
5998 {
5999 InterceptedService::new(Self::new(inner), interceptor)
6000 }
6001 #[must_use]
6003 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6004 self.accept_compression_encodings.enable(encoding);
6005 self
6006 }
6007 #[must_use]
6009 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6010 self.send_compression_encodings.enable(encoding);
6011 self
6012 }
6013 #[must_use]
6017 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6018 self.max_decoding_message_size = Some(limit);
6019 self
6020 }
6021 #[must_use]
6025 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6026 self.max_encoding_message_size = Some(limit);
6027 self
6028 }
6029 }
6030 impl<T, B> tonic::codegen::Service<http::Request<B>> for MetaMemberServiceServer<T>
6031 where
6032 T: MetaMemberService,
6033 B: Body + std::marker::Send + 'static,
6034 B::Error: Into<StdError> + std::marker::Send + 'static,
6035 {
6036 type Response = http::Response<tonic::body::BoxBody>;
6037 type Error = std::convert::Infallible;
6038 type Future = BoxFuture<Self::Response, Self::Error>;
6039 fn poll_ready(
6040 &mut self,
6041 _cx: &mut Context<'_>,
6042 ) -> Poll<std::result::Result<(), Self::Error>> {
6043 Poll::Ready(Ok(()))
6044 }
6045 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6046 match req.uri().path() {
6047 "/meta.MetaMemberService/Members" => {
6048 #[allow(non_camel_case_types)]
6049 struct MembersSvc<T: MetaMemberService>(pub Arc<T>);
6050 impl<
6051 T: MetaMemberService,
6052 > tonic::server::UnaryService<super::MembersRequest>
6053 for MembersSvc<T> {
6054 type Response = super::MembersResponse;
6055 type Future = BoxFuture<
6056 tonic::Response<Self::Response>,
6057 tonic::Status,
6058 >;
6059 fn call(
6060 &mut self,
6061 request: tonic::Request<super::MembersRequest>,
6062 ) -> Self::Future {
6063 let inner = Arc::clone(&self.0);
6064 let fut = async move {
6065 <T as MetaMemberService>::members(&inner, request).await
6066 };
6067 Box::pin(fut)
6068 }
6069 }
6070 let accept_compression_encodings = self.accept_compression_encodings;
6071 let send_compression_encodings = self.send_compression_encodings;
6072 let max_decoding_message_size = self.max_decoding_message_size;
6073 let max_encoding_message_size = self.max_encoding_message_size;
6074 let inner = self.inner.clone();
6075 let fut = async move {
6076 let method = MembersSvc(inner);
6077 let codec = tonic::codec::ProstCodec::default();
6078 let mut grpc = tonic::server::Grpc::new(codec)
6079 .apply_compression_config(
6080 accept_compression_encodings,
6081 send_compression_encodings,
6082 )
6083 .apply_max_message_size_config(
6084 max_decoding_message_size,
6085 max_encoding_message_size,
6086 );
6087 let res = grpc.unary(method, req).await;
6088 Ok(res)
6089 };
6090 Box::pin(fut)
6091 }
6092 _ => {
6093 Box::pin(async move {
6094 let mut response = http::Response::new(empty_body());
6095 let headers = response.headers_mut();
6096 headers
6097 .insert(
6098 tonic::Status::GRPC_STATUS,
6099 (tonic::Code::Unimplemented as i32).into(),
6100 );
6101 headers
6102 .insert(
6103 http::header::CONTENT_TYPE,
6104 tonic::metadata::GRPC_CONTENT_TYPE,
6105 );
6106 Ok(response)
6107 })
6108 }
6109 }
6110 }
6111 }
6112 impl<T> Clone for MetaMemberServiceServer<T> {
6113 fn clone(&self) -> Self {
6114 let inner = self.inner.clone();
6115 Self {
6116 inner,
6117 accept_compression_encodings: self.accept_compression_encodings,
6118 send_compression_encodings: self.send_compression_encodings,
6119 max_decoding_message_size: self.max_decoding_message_size,
6120 max_encoding_message_size: self.max_encoding_message_size,
6121 }
6122 }
6123 }
6124 pub const SERVICE_NAME: &str = "meta.MetaMemberService";
6126 impl<T> tonic::server::NamedService for MetaMemberServiceServer<T> {
6127 const NAME: &'static str = SERVICE_NAME;
6128 }
6129}
6130pub mod system_params_service_server {
6132 #![allow(
6133 unused_variables,
6134 dead_code,
6135 missing_docs,
6136 clippy::wildcard_imports,
6137 clippy::let_unit_value,
6138 )]
6139 use tonic::codegen::*;
6140 #[async_trait]
6142 pub trait SystemParamsService: std::marker::Send + std::marker::Sync + 'static {
6143 async fn get_system_params(
6144 &self,
6145 request: tonic::Request<super::GetSystemParamsRequest>,
6146 ) -> std::result::Result<
6147 tonic::Response<super::GetSystemParamsResponse>,
6148 tonic::Status,
6149 >;
6150 async fn set_system_param(
6151 &self,
6152 request: tonic::Request<super::SetSystemParamRequest>,
6153 ) -> std::result::Result<
6154 tonic::Response<super::SetSystemParamResponse>,
6155 tonic::Status,
6156 >;
6157 }
6158 #[derive(Debug)]
6159 pub struct SystemParamsServiceServer<T> {
6160 inner: Arc<T>,
6161 accept_compression_encodings: EnabledCompressionEncodings,
6162 send_compression_encodings: EnabledCompressionEncodings,
6163 max_decoding_message_size: Option<usize>,
6164 max_encoding_message_size: Option<usize>,
6165 }
6166 impl<T> SystemParamsServiceServer<T> {
6167 pub fn new(inner: T) -> Self {
6168 Self::from_arc(Arc::new(inner))
6169 }
6170 pub fn from_arc(inner: Arc<T>) -> Self {
6171 Self {
6172 inner,
6173 accept_compression_encodings: Default::default(),
6174 send_compression_encodings: Default::default(),
6175 max_decoding_message_size: None,
6176 max_encoding_message_size: None,
6177 }
6178 }
6179 pub fn with_interceptor<F>(
6180 inner: T,
6181 interceptor: F,
6182 ) -> InterceptedService<Self, F>
6183 where
6184 F: tonic::service::Interceptor,
6185 {
6186 InterceptedService::new(Self::new(inner), interceptor)
6187 }
6188 #[must_use]
6190 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6191 self.accept_compression_encodings.enable(encoding);
6192 self
6193 }
6194 #[must_use]
6196 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6197 self.send_compression_encodings.enable(encoding);
6198 self
6199 }
6200 #[must_use]
6204 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6205 self.max_decoding_message_size = Some(limit);
6206 self
6207 }
6208 #[must_use]
6212 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6213 self.max_encoding_message_size = Some(limit);
6214 self
6215 }
6216 }
6217 impl<T, B> tonic::codegen::Service<http::Request<B>> for SystemParamsServiceServer<T>
6218 where
6219 T: SystemParamsService,
6220 B: Body + std::marker::Send + 'static,
6221 B::Error: Into<StdError> + std::marker::Send + 'static,
6222 {
6223 type Response = http::Response<tonic::body::BoxBody>;
6224 type Error = std::convert::Infallible;
6225 type Future = BoxFuture<Self::Response, Self::Error>;
6226 fn poll_ready(
6227 &mut self,
6228 _cx: &mut Context<'_>,
6229 ) -> Poll<std::result::Result<(), Self::Error>> {
6230 Poll::Ready(Ok(()))
6231 }
6232 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6233 match req.uri().path() {
6234 "/meta.SystemParamsService/GetSystemParams" => {
6235 #[allow(non_camel_case_types)]
6236 struct GetSystemParamsSvc<T: SystemParamsService>(pub Arc<T>);
6237 impl<
6238 T: SystemParamsService,
6239 > tonic::server::UnaryService<super::GetSystemParamsRequest>
6240 for GetSystemParamsSvc<T> {
6241 type Response = super::GetSystemParamsResponse;
6242 type Future = BoxFuture<
6243 tonic::Response<Self::Response>,
6244 tonic::Status,
6245 >;
6246 fn call(
6247 &mut self,
6248 request: tonic::Request<super::GetSystemParamsRequest>,
6249 ) -> Self::Future {
6250 let inner = Arc::clone(&self.0);
6251 let fut = async move {
6252 <T as SystemParamsService>::get_system_params(
6253 &inner,
6254 request,
6255 )
6256 .await
6257 };
6258 Box::pin(fut)
6259 }
6260 }
6261 let accept_compression_encodings = self.accept_compression_encodings;
6262 let send_compression_encodings = self.send_compression_encodings;
6263 let max_decoding_message_size = self.max_decoding_message_size;
6264 let max_encoding_message_size = self.max_encoding_message_size;
6265 let inner = self.inner.clone();
6266 let fut = async move {
6267 let method = GetSystemParamsSvc(inner);
6268 let codec = tonic::codec::ProstCodec::default();
6269 let mut grpc = tonic::server::Grpc::new(codec)
6270 .apply_compression_config(
6271 accept_compression_encodings,
6272 send_compression_encodings,
6273 )
6274 .apply_max_message_size_config(
6275 max_decoding_message_size,
6276 max_encoding_message_size,
6277 );
6278 let res = grpc.unary(method, req).await;
6279 Ok(res)
6280 };
6281 Box::pin(fut)
6282 }
6283 "/meta.SystemParamsService/SetSystemParam" => {
6284 #[allow(non_camel_case_types)]
6285 struct SetSystemParamSvc<T: SystemParamsService>(pub Arc<T>);
6286 impl<
6287 T: SystemParamsService,
6288 > tonic::server::UnaryService<super::SetSystemParamRequest>
6289 for SetSystemParamSvc<T> {
6290 type Response = super::SetSystemParamResponse;
6291 type Future = BoxFuture<
6292 tonic::Response<Self::Response>,
6293 tonic::Status,
6294 >;
6295 fn call(
6296 &mut self,
6297 request: tonic::Request<super::SetSystemParamRequest>,
6298 ) -> Self::Future {
6299 let inner = Arc::clone(&self.0);
6300 let fut = async move {
6301 <T as SystemParamsService>::set_system_param(
6302 &inner,
6303 request,
6304 )
6305 .await
6306 };
6307 Box::pin(fut)
6308 }
6309 }
6310 let accept_compression_encodings = self.accept_compression_encodings;
6311 let send_compression_encodings = self.send_compression_encodings;
6312 let max_decoding_message_size = self.max_decoding_message_size;
6313 let max_encoding_message_size = self.max_encoding_message_size;
6314 let inner = self.inner.clone();
6315 let fut = async move {
6316 let method = SetSystemParamSvc(inner);
6317 let codec = tonic::codec::ProstCodec::default();
6318 let mut grpc = tonic::server::Grpc::new(codec)
6319 .apply_compression_config(
6320 accept_compression_encodings,
6321 send_compression_encodings,
6322 )
6323 .apply_max_message_size_config(
6324 max_decoding_message_size,
6325 max_encoding_message_size,
6326 );
6327 let res = grpc.unary(method, req).await;
6328 Ok(res)
6329 };
6330 Box::pin(fut)
6331 }
6332 _ => {
6333 Box::pin(async move {
6334 let mut response = http::Response::new(empty_body());
6335 let headers = response.headers_mut();
6336 headers
6337 .insert(
6338 tonic::Status::GRPC_STATUS,
6339 (tonic::Code::Unimplemented as i32).into(),
6340 );
6341 headers
6342 .insert(
6343 http::header::CONTENT_TYPE,
6344 tonic::metadata::GRPC_CONTENT_TYPE,
6345 );
6346 Ok(response)
6347 })
6348 }
6349 }
6350 }
6351 }
6352 impl<T> Clone for SystemParamsServiceServer<T> {
6353 fn clone(&self) -> Self {
6354 let inner = self.inner.clone();
6355 Self {
6356 inner,
6357 accept_compression_encodings: self.accept_compression_encodings,
6358 send_compression_encodings: self.send_compression_encodings,
6359 max_decoding_message_size: self.max_decoding_message_size,
6360 max_encoding_message_size: self.max_encoding_message_size,
6361 }
6362 }
6363 }
6364 pub const SERVICE_NAME: &str = "meta.SystemParamsService";
6366 impl<T> tonic::server::NamedService for SystemParamsServiceServer<T> {
6367 const NAME: &'static str = SERVICE_NAME;
6368 }
6369}
6370pub mod session_param_service_server {
6372 #![allow(
6373 unused_variables,
6374 dead_code,
6375 missing_docs,
6376 clippy::wildcard_imports,
6377 clippy::let_unit_value,
6378 )]
6379 use tonic::codegen::*;
6380 #[async_trait]
6382 pub trait SessionParamService: std::marker::Send + std::marker::Sync + 'static {
6383 async fn get_session_params(
6384 &self,
6385 request: tonic::Request<super::GetSessionParamsRequest>,
6386 ) -> std::result::Result<
6387 tonic::Response<super::GetSessionParamsResponse>,
6388 tonic::Status,
6389 >;
6390 async fn set_session_param(
6391 &self,
6392 request: tonic::Request<super::SetSessionParamRequest>,
6393 ) -> std::result::Result<
6394 tonic::Response<super::SetSessionParamResponse>,
6395 tonic::Status,
6396 >;
6397 }
6398 #[derive(Debug)]
6400 pub struct SessionParamServiceServer<T> {
6401 inner: Arc<T>,
6402 accept_compression_encodings: EnabledCompressionEncodings,
6403 send_compression_encodings: EnabledCompressionEncodings,
6404 max_decoding_message_size: Option<usize>,
6405 max_encoding_message_size: Option<usize>,
6406 }
6407 impl<T> SessionParamServiceServer<T> {
6408 pub fn new(inner: T) -> Self {
6409 Self::from_arc(Arc::new(inner))
6410 }
6411 pub fn from_arc(inner: Arc<T>) -> Self {
6412 Self {
6413 inner,
6414 accept_compression_encodings: Default::default(),
6415 send_compression_encodings: Default::default(),
6416 max_decoding_message_size: None,
6417 max_encoding_message_size: None,
6418 }
6419 }
6420 pub fn with_interceptor<F>(
6421 inner: T,
6422 interceptor: F,
6423 ) -> InterceptedService<Self, F>
6424 where
6425 F: tonic::service::Interceptor,
6426 {
6427 InterceptedService::new(Self::new(inner), interceptor)
6428 }
6429 #[must_use]
6431 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6432 self.accept_compression_encodings.enable(encoding);
6433 self
6434 }
6435 #[must_use]
6437 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6438 self.send_compression_encodings.enable(encoding);
6439 self
6440 }
6441 #[must_use]
6445 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6446 self.max_decoding_message_size = Some(limit);
6447 self
6448 }
6449 #[must_use]
6453 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6454 self.max_encoding_message_size = Some(limit);
6455 self
6456 }
6457 }
6458 impl<T, B> tonic::codegen::Service<http::Request<B>> for SessionParamServiceServer<T>
6459 where
6460 T: SessionParamService,
6461 B: Body + std::marker::Send + 'static,
6462 B::Error: Into<StdError> + std::marker::Send + 'static,
6463 {
6464 type Response = http::Response<tonic::body::BoxBody>;
6465 type Error = std::convert::Infallible;
6466 type Future = BoxFuture<Self::Response, Self::Error>;
6467 fn poll_ready(
6468 &mut self,
6469 _cx: &mut Context<'_>,
6470 ) -> Poll<std::result::Result<(), Self::Error>> {
6471 Poll::Ready(Ok(()))
6472 }
6473 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6474 match req.uri().path() {
6475 "/meta.SessionParamService/GetSessionParams" => {
6476 #[allow(non_camel_case_types)]
6477 struct GetSessionParamsSvc<T: SessionParamService>(pub Arc<T>);
6478 impl<
6479 T: SessionParamService,
6480 > tonic::server::UnaryService<super::GetSessionParamsRequest>
6481 for GetSessionParamsSvc<T> {
6482 type Response = super::GetSessionParamsResponse;
6483 type Future = BoxFuture<
6484 tonic::Response<Self::Response>,
6485 tonic::Status,
6486 >;
6487 fn call(
6488 &mut self,
6489 request: tonic::Request<super::GetSessionParamsRequest>,
6490 ) -> Self::Future {
6491 let inner = Arc::clone(&self.0);
6492 let fut = async move {
6493 <T as SessionParamService>::get_session_params(
6494 &inner,
6495 request,
6496 )
6497 .await
6498 };
6499 Box::pin(fut)
6500 }
6501 }
6502 let accept_compression_encodings = self.accept_compression_encodings;
6503 let send_compression_encodings = self.send_compression_encodings;
6504 let max_decoding_message_size = self.max_decoding_message_size;
6505 let max_encoding_message_size = self.max_encoding_message_size;
6506 let inner = self.inner.clone();
6507 let fut = async move {
6508 let method = GetSessionParamsSvc(inner);
6509 let codec = tonic::codec::ProstCodec::default();
6510 let mut grpc = tonic::server::Grpc::new(codec)
6511 .apply_compression_config(
6512 accept_compression_encodings,
6513 send_compression_encodings,
6514 )
6515 .apply_max_message_size_config(
6516 max_decoding_message_size,
6517 max_encoding_message_size,
6518 );
6519 let res = grpc.unary(method, req).await;
6520 Ok(res)
6521 };
6522 Box::pin(fut)
6523 }
6524 "/meta.SessionParamService/SetSessionParam" => {
6525 #[allow(non_camel_case_types)]
6526 struct SetSessionParamSvc<T: SessionParamService>(pub Arc<T>);
6527 impl<
6528 T: SessionParamService,
6529 > tonic::server::UnaryService<super::SetSessionParamRequest>
6530 for SetSessionParamSvc<T> {
6531 type Response = super::SetSessionParamResponse;
6532 type Future = BoxFuture<
6533 tonic::Response<Self::Response>,
6534 tonic::Status,
6535 >;
6536 fn call(
6537 &mut self,
6538 request: tonic::Request<super::SetSessionParamRequest>,
6539 ) -> Self::Future {
6540 let inner = Arc::clone(&self.0);
6541 let fut = async move {
6542 <T as SessionParamService>::set_session_param(
6543 &inner,
6544 request,
6545 )
6546 .await
6547 };
6548 Box::pin(fut)
6549 }
6550 }
6551 let accept_compression_encodings = self.accept_compression_encodings;
6552 let send_compression_encodings = self.send_compression_encodings;
6553 let max_decoding_message_size = self.max_decoding_message_size;
6554 let max_encoding_message_size = self.max_encoding_message_size;
6555 let inner = self.inner.clone();
6556 let fut = async move {
6557 let method = SetSessionParamSvc(inner);
6558 let codec = tonic::codec::ProstCodec::default();
6559 let mut grpc = tonic::server::Grpc::new(codec)
6560 .apply_compression_config(
6561 accept_compression_encodings,
6562 send_compression_encodings,
6563 )
6564 .apply_max_message_size_config(
6565 max_decoding_message_size,
6566 max_encoding_message_size,
6567 );
6568 let res = grpc.unary(method, req).await;
6569 Ok(res)
6570 };
6571 Box::pin(fut)
6572 }
6573 _ => {
6574 Box::pin(async move {
6575 let mut response = http::Response::new(empty_body());
6576 let headers = response.headers_mut();
6577 headers
6578 .insert(
6579 tonic::Status::GRPC_STATUS,
6580 (tonic::Code::Unimplemented as i32).into(),
6581 );
6582 headers
6583 .insert(
6584 http::header::CONTENT_TYPE,
6585 tonic::metadata::GRPC_CONTENT_TYPE,
6586 );
6587 Ok(response)
6588 })
6589 }
6590 }
6591 }
6592 }
6593 impl<T> Clone for SessionParamServiceServer<T> {
6594 fn clone(&self) -> Self {
6595 let inner = self.inner.clone();
6596 Self {
6597 inner,
6598 accept_compression_encodings: self.accept_compression_encodings,
6599 send_compression_encodings: self.send_compression_encodings,
6600 max_decoding_message_size: self.max_decoding_message_size,
6601 max_encoding_message_size: self.max_encoding_message_size,
6602 }
6603 }
6604 }
6605 pub const SERVICE_NAME: &str = "meta.SessionParamService";
6607 impl<T> tonic::server::NamedService for SessionParamServiceServer<T> {
6608 const NAME: &'static str = SERVICE_NAME;
6609 }
6610}
6611pub mod serving_service_server {
6613 #![allow(
6614 unused_variables,
6615 dead_code,
6616 missing_docs,
6617 clippy::wildcard_imports,
6618 clippy::let_unit_value,
6619 )]
6620 use tonic::codegen::*;
6621 #[async_trait]
6623 pub trait ServingService: std::marker::Send + std::marker::Sync + 'static {
6624 async fn get_serving_vnode_mappings(
6625 &self,
6626 request: tonic::Request<super::GetServingVnodeMappingsRequest>,
6627 ) -> std::result::Result<
6628 tonic::Response<super::GetServingVnodeMappingsResponse>,
6629 tonic::Status,
6630 >;
6631 }
6632 #[derive(Debug)]
6633 pub struct ServingServiceServer<T> {
6634 inner: Arc<T>,
6635 accept_compression_encodings: EnabledCompressionEncodings,
6636 send_compression_encodings: EnabledCompressionEncodings,
6637 max_decoding_message_size: Option<usize>,
6638 max_encoding_message_size: Option<usize>,
6639 }
6640 impl<T> ServingServiceServer<T> {
6641 pub fn new(inner: T) -> Self {
6642 Self::from_arc(Arc::new(inner))
6643 }
6644 pub fn from_arc(inner: Arc<T>) -> Self {
6645 Self {
6646 inner,
6647 accept_compression_encodings: Default::default(),
6648 send_compression_encodings: Default::default(),
6649 max_decoding_message_size: None,
6650 max_encoding_message_size: None,
6651 }
6652 }
6653 pub fn with_interceptor<F>(
6654 inner: T,
6655 interceptor: F,
6656 ) -> InterceptedService<Self, F>
6657 where
6658 F: tonic::service::Interceptor,
6659 {
6660 InterceptedService::new(Self::new(inner), interceptor)
6661 }
6662 #[must_use]
6664 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6665 self.accept_compression_encodings.enable(encoding);
6666 self
6667 }
6668 #[must_use]
6670 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6671 self.send_compression_encodings.enable(encoding);
6672 self
6673 }
6674 #[must_use]
6678 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6679 self.max_decoding_message_size = Some(limit);
6680 self
6681 }
6682 #[must_use]
6686 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6687 self.max_encoding_message_size = Some(limit);
6688 self
6689 }
6690 }
6691 impl<T, B> tonic::codegen::Service<http::Request<B>> for ServingServiceServer<T>
6692 where
6693 T: ServingService,
6694 B: Body + std::marker::Send + 'static,
6695 B::Error: Into<StdError> + std::marker::Send + 'static,
6696 {
6697 type Response = http::Response<tonic::body::BoxBody>;
6698 type Error = std::convert::Infallible;
6699 type Future = BoxFuture<Self::Response, Self::Error>;
6700 fn poll_ready(
6701 &mut self,
6702 _cx: &mut Context<'_>,
6703 ) -> Poll<std::result::Result<(), Self::Error>> {
6704 Poll::Ready(Ok(()))
6705 }
6706 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6707 match req.uri().path() {
6708 "/meta.ServingService/GetServingVnodeMappings" => {
6709 #[allow(non_camel_case_types)]
6710 struct GetServingVnodeMappingsSvc<T: ServingService>(pub Arc<T>);
6711 impl<
6712 T: ServingService,
6713 > tonic::server::UnaryService<super::GetServingVnodeMappingsRequest>
6714 for GetServingVnodeMappingsSvc<T> {
6715 type Response = super::GetServingVnodeMappingsResponse;
6716 type Future = BoxFuture<
6717 tonic::Response<Self::Response>,
6718 tonic::Status,
6719 >;
6720 fn call(
6721 &mut self,
6722 request: tonic::Request<
6723 super::GetServingVnodeMappingsRequest,
6724 >,
6725 ) -> Self::Future {
6726 let inner = Arc::clone(&self.0);
6727 let fut = async move {
6728 <T as ServingService>::get_serving_vnode_mappings(
6729 &inner,
6730 request,
6731 )
6732 .await
6733 };
6734 Box::pin(fut)
6735 }
6736 }
6737 let accept_compression_encodings = self.accept_compression_encodings;
6738 let send_compression_encodings = self.send_compression_encodings;
6739 let max_decoding_message_size = self.max_decoding_message_size;
6740 let max_encoding_message_size = self.max_encoding_message_size;
6741 let inner = self.inner.clone();
6742 let fut = async move {
6743 let method = GetServingVnodeMappingsSvc(inner);
6744 let codec = tonic::codec::ProstCodec::default();
6745 let mut grpc = tonic::server::Grpc::new(codec)
6746 .apply_compression_config(
6747 accept_compression_encodings,
6748 send_compression_encodings,
6749 )
6750 .apply_max_message_size_config(
6751 max_decoding_message_size,
6752 max_encoding_message_size,
6753 );
6754 let res = grpc.unary(method, req).await;
6755 Ok(res)
6756 };
6757 Box::pin(fut)
6758 }
6759 _ => {
6760 Box::pin(async move {
6761 let mut response = http::Response::new(empty_body());
6762 let headers = response.headers_mut();
6763 headers
6764 .insert(
6765 tonic::Status::GRPC_STATUS,
6766 (tonic::Code::Unimplemented as i32).into(),
6767 );
6768 headers
6769 .insert(
6770 http::header::CONTENT_TYPE,
6771 tonic::metadata::GRPC_CONTENT_TYPE,
6772 );
6773 Ok(response)
6774 })
6775 }
6776 }
6777 }
6778 }
6779 impl<T> Clone for ServingServiceServer<T> {
6780 fn clone(&self) -> Self {
6781 let inner = self.inner.clone();
6782 Self {
6783 inner,
6784 accept_compression_encodings: self.accept_compression_encodings,
6785 send_compression_encodings: self.send_compression_encodings,
6786 max_decoding_message_size: self.max_decoding_message_size,
6787 max_encoding_message_size: self.max_encoding_message_size,
6788 }
6789 }
6790 }
6791 pub const SERVICE_NAME: &str = "meta.ServingService";
6793 impl<T> tonic::server::NamedService for ServingServiceServer<T> {
6794 const NAME: &'static str = SERVICE_NAME;
6795 }
6796}
6797pub mod event_log_service_server {
6799 #![allow(
6800 unused_variables,
6801 dead_code,
6802 missing_docs,
6803 clippy::wildcard_imports,
6804 clippy::let_unit_value,
6805 )]
6806 use tonic::codegen::*;
6807 #[async_trait]
6809 pub trait EventLogService: std::marker::Send + std::marker::Sync + 'static {
6810 async fn list_event_log(
6811 &self,
6812 request: tonic::Request<super::ListEventLogRequest>,
6813 ) -> std::result::Result<
6814 tonic::Response<super::ListEventLogResponse>,
6815 tonic::Status,
6816 >;
6817 async fn add_event_log(
6818 &self,
6819 request: tonic::Request<super::AddEventLogRequest>,
6820 ) -> std::result::Result<
6821 tonic::Response<super::AddEventLogResponse>,
6822 tonic::Status,
6823 >;
6824 }
6825 #[derive(Debug)]
6826 pub struct EventLogServiceServer<T> {
6827 inner: Arc<T>,
6828 accept_compression_encodings: EnabledCompressionEncodings,
6829 send_compression_encodings: EnabledCompressionEncodings,
6830 max_decoding_message_size: Option<usize>,
6831 max_encoding_message_size: Option<usize>,
6832 }
6833 impl<T> EventLogServiceServer<T> {
6834 pub fn new(inner: T) -> Self {
6835 Self::from_arc(Arc::new(inner))
6836 }
6837 pub fn from_arc(inner: Arc<T>) -> Self {
6838 Self {
6839 inner,
6840 accept_compression_encodings: Default::default(),
6841 send_compression_encodings: Default::default(),
6842 max_decoding_message_size: None,
6843 max_encoding_message_size: None,
6844 }
6845 }
6846 pub fn with_interceptor<F>(
6847 inner: T,
6848 interceptor: F,
6849 ) -> InterceptedService<Self, F>
6850 where
6851 F: tonic::service::Interceptor,
6852 {
6853 InterceptedService::new(Self::new(inner), interceptor)
6854 }
6855 #[must_use]
6857 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6858 self.accept_compression_encodings.enable(encoding);
6859 self
6860 }
6861 #[must_use]
6863 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6864 self.send_compression_encodings.enable(encoding);
6865 self
6866 }
6867 #[must_use]
6871 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6872 self.max_decoding_message_size = Some(limit);
6873 self
6874 }
6875 #[must_use]
6879 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6880 self.max_encoding_message_size = Some(limit);
6881 self
6882 }
6883 }
6884 impl<T, B> tonic::codegen::Service<http::Request<B>> for EventLogServiceServer<T>
6885 where
6886 T: EventLogService,
6887 B: Body + std::marker::Send + 'static,
6888 B::Error: Into<StdError> + std::marker::Send + 'static,
6889 {
6890 type Response = http::Response<tonic::body::BoxBody>;
6891 type Error = std::convert::Infallible;
6892 type Future = BoxFuture<Self::Response, Self::Error>;
6893 fn poll_ready(
6894 &mut self,
6895 _cx: &mut Context<'_>,
6896 ) -> Poll<std::result::Result<(), Self::Error>> {
6897 Poll::Ready(Ok(()))
6898 }
6899 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6900 match req.uri().path() {
6901 "/meta.EventLogService/ListEventLog" => {
6902 #[allow(non_camel_case_types)]
6903 struct ListEventLogSvc<T: EventLogService>(pub Arc<T>);
6904 impl<
6905 T: EventLogService,
6906 > tonic::server::UnaryService<super::ListEventLogRequest>
6907 for ListEventLogSvc<T> {
6908 type Response = super::ListEventLogResponse;
6909 type Future = BoxFuture<
6910 tonic::Response<Self::Response>,
6911 tonic::Status,
6912 >;
6913 fn call(
6914 &mut self,
6915 request: tonic::Request<super::ListEventLogRequest>,
6916 ) -> Self::Future {
6917 let inner = Arc::clone(&self.0);
6918 let fut = async move {
6919 <T as EventLogService>::list_event_log(&inner, request)
6920 .await
6921 };
6922 Box::pin(fut)
6923 }
6924 }
6925 let accept_compression_encodings = self.accept_compression_encodings;
6926 let send_compression_encodings = self.send_compression_encodings;
6927 let max_decoding_message_size = self.max_decoding_message_size;
6928 let max_encoding_message_size = self.max_encoding_message_size;
6929 let inner = self.inner.clone();
6930 let fut = async move {
6931 let method = ListEventLogSvc(inner);
6932 let codec = tonic::codec::ProstCodec::default();
6933 let mut grpc = tonic::server::Grpc::new(codec)
6934 .apply_compression_config(
6935 accept_compression_encodings,
6936 send_compression_encodings,
6937 )
6938 .apply_max_message_size_config(
6939 max_decoding_message_size,
6940 max_encoding_message_size,
6941 );
6942 let res = grpc.unary(method, req).await;
6943 Ok(res)
6944 };
6945 Box::pin(fut)
6946 }
6947 "/meta.EventLogService/AddEventLog" => {
6948 #[allow(non_camel_case_types)]
6949 struct AddEventLogSvc<T: EventLogService>(pub Arc<T>);
6950 impl<
6951 T: EventLogService,
6952 > tonic::server::UnaryService<super::AddEventLogRequest>
6953 for AddEventLogSvc<T> {
6954 type Response = super::AddEventLogResponse;
6955 type Future = BoxFuture<
6956 tonic::Response<Self::Response>,
6957 tonic::Status,
6958 >;
6959 fn call(
6960 &mut self,
6961 request: tonic::Request<super::AddEventLogRequest>,
6962 ) -> Self::Future {
6963 let inner = Arc::clone(&self.0);
6964 let fut = async move {
6965 <T as EventLogService>::add_event_log(&inner, request).await
6966 };
6967 Box::pin(fut)
6968 }
6969 }
6970 let accept_compression_encodings = self.accept_compression_encodings;
6971 let send_compression_encodings = self.send_compression_encodings;
6972 let max_decoding_message_size = self.max_decoding_message_size;
6973 let max_encoding_message_size = self.max_encoding_message_size;
6974 let inner = self.inner.clone();
6975 let fut = async move {
6976 let method = AddEventLogSvc(inner);
6977 let codec = tonic::codec::ProstCodec::default();
6978 let mut grpc = tonic::server::Grpc::new(codec)
6979 .apply_compression_config(
6980 accept_compression_encodings,
6981 send_compression_encodings,
6982 )
6983 .apply_max_message_size_config(
6984 max_decoding_message_size,
6985 max_encoding_message_size,
6986 );
6987 let res = grpc.unary(method, req).await;
6988 Ok(res)
6989 };
6990 Box::pin(fut)
6991 }
6992 _ => {
6993 Box::pin(async move {
6994 let mut response = http::Response::new(empty_body());
6995 let headers = response.headers_mut();
6996 headers
6997 .insert(
6998 tonic::Status::GRPC_STATUS,
6999 (tonic::Code::Unimplemented as i32).into(),
7000 );
7001 headers
7002 .insert(
7003 http::header::CONTENT_TYPE,
7004 tonic::metadata::GRPC_CONTENT_TYPE,
7005 );
7006 Ok(response)
7007 })
7008 }
7009 }
7010 }
7011 }
7012 impl<T> Clone for EventLogServiceServer<T> {
7013 fn clone(&self) -> Self {
7014 let inner = self.inner.clone();
7015 Self {
7016 inner,
7017 accept_compression_encodings: self.accept_compression_encodings,
7018 send_compression_encodings: self.send_compression_encodings,
7019 max_decoding_message_size: self.max_decoding_message_size,
7020 max_encoding_message_size: self.max_encoding_message_size,
7021 }
7022 }
7023 }
7024 pub const SERVICE_NAME: &str = "meta.EventLogService";
7026 impl<T> tonic::server::NamedService for EventLogServiceServer<T> {
7027 const NAME: &'static str = SERVICE_NAME;
7028 }
7029}
7030pub mod cluster_limit_service_server {
7032 #![allow(
7033 unused_variables,
7034 dead_code,
7035 missing_docs,
7036 clippy::wildcard_imports,
7037 clippy::let_unit_value,
7038 )]
7039 use tonic::codegen::*;
7040 #[async_trait]
7042 pub trait ClusterLimitService: std::marker::Send + std::marker::Sync + 'static {
7043 async fn get_cluster_limits(
7044 &self,
7045 request: tonic::Request<super::GetClusterLimitsRequest>,
7046 ) -> std::result::Result<
7047 tonic::Response<super::GetClusterLimitsResponse>,
7048 tonic::Status,
7049 >;
7050 }
7051 #[derive(Debug)]
7052 pub struct ClusterLimitServiceServer<T> {
7053 inner: Arc<T>,
7054 accept_compression_encodings: EnabledCompressionEncodings,
7055 send_compression_encodings: EnabledCompressionEncodings,
7056 max_decoding_message_size: Option<usize>,
7057 max_encoding_message_size: Option<usize>,
7058 }
7059 impl<T> ClusterLimitServiceServer<T> {
7060 pub fn new(inner: T) -> Self {
7061 Self::from_arc(Arc::new(inner))
7062 }
7063 pub fn from_arc(inner: Arc<T>) -> Self {
7064 Self {
7065 inner,
7066 accept_compression_encodings: Default::default(),
7067 send_compression_encodings: Default::default(),
7068 max_decoding_message_size: None,
7069 max_encoding_message_size: None,
7070 }
7071 }
7072 pub fn with_interceptor<F>(
7073 inner: T,
7074 interceptor: F,
7075 ) -> InterceptedService<Self, F>
7076 where
7077 F: tonic::service::Interceptor,
7078 {
7079 InterceptedService::new(Self::new(inner), interceptor)
7080 }
7081 #[must_use]
7083 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7084 self.accept_compression_encodings.enable(encoding);
7085 self
7086 }
7087 #[must_use]
7089 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7090 self.send_compression_encodings.enable(encoding);
7091 self
7092 }
7093 #[must_use]
7097 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7098 self.max_decoding_message_size = Some(limit);
7099 self
7100 }
7101 #[must_use]
7105 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7106 self.max_encoding_message_size = Some(limit);
7107 self
7108 }
7109 }
7110 impl<T, B> tonic::codegen::Service<http::Request<B>> for ClusterLimitServiceServer<T>
7111 where
7112 T: ClusterLimitService,
7113 B: Body + std::marker::Send + 'static,
7114 B::Error: Into<StdError> + std::marker::Send + 'static,
7115 {
7116 type Response = http::Response<tonic::body::BoxBody>;
7117 type Error = std::convert::Infallible;
7118 type Future = BoxFuture<Self::Response, Self::Error>;
7119 fn poll_ready(
7120 &mut self,
7121 _cx: &mut Context<'_>,
7122 ) -> Poll<std::result::Result<(), Self::Error>> {
7123 Poll::Ready(Ok(()))
7124 }
7125 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7126 match req.uri().path() {
7127 "/meta.ClusterLimitService/GetClusterLimits" => {
7128 #[allow(non_camel_case_types)]
7129 struct GetClusterLimitsSvc<T: ClusterLimitService>(pub Arc<T>);
7130 impl<
7131 T: ClusterLimitService,
7132 > tonic::server::UnaryService<super::GetClusterLimitsRequest>
7133 for GetClusterLimitsSvc<T> {
7134 type Response = super::GetClusterLimitsResponse;
7135 type Future = BoxFuture<
7136 tonic::Response<Self::Response>,
7137 tonic::Status,
7138 >;
7139 fn call(
7140 &mut self,
7141 request: tonic::Request<super::GetClusterLimitsRequest>,
7142 ) -> Self::Future {
7143 let inner = Arc::clone(&self.0);
7144 let fut = async move {
7145 <T as ClusterLimitService>::get_cluster_limits(
7146 &inner,
7147 request,
7148 )
7149 .await
7150 };
7151 Box::pin(fut)
7152 }
7153 }
7154 let accept_compression_encodings = self.accept_compression_encodings;
7155 let send_compression_encodings = self.send_compression_encodings;
7156 let max_decoding_message_size = self.max_decoding_message_size;
7157 let max_encoding_message_size = self.max_encoding_message_size;
7158 let inner = self.inner.clone();
7159 let fut = async move {
7160 let method = GetClusterLimitsSvc(inner);
7161 let codec = tonic::codec::ProstCodec::default();
7162 let mut grpc = tonic::server::Grpc::new(codec)
7163 .apply_compression_config(
7164 accept_compression_encodings,
7165 send_compression_encodings,
7166 )
7167 .apply_max_message_size_config(
7168 max_decoding_message_size,
7169 max_encoding_message_size,
7170 );
7171 let res = grpc.unary(method, req).await;
7172 Ok(res)
7173 };
7174 Box::pin(fut)
7175 }
7176 _ => {
7177 Box::pin(async move {
7178 let mut response = http::Response::new(empty_body());
7179 let headers = response.headers_mut();
7180 headers
7181 .insert(
7182 tonic::Status::GRPC_STATUS,
7183 (tonic::Code::Unimplemented as i32).into(),
7184 );
7185 headers
7186 .insert(
7187 http::header::CONTENT_TYPE,
7188 tonic::metadata::GRPC_CONTENT_TYPE,
7189 );
7190 Ok(response)
7191 })
7192 }
7193 }
7194 }
7195 }
7196 impl<T> Clone for ClusterLimitServiceServer<T> {
7197 fn clone(&self) -> Self {
7198 let inner = self.inner.clone();
7199 Self {
7200 inner,
7201 accept_compression_encodings: self.accept_compression_encodings,
7202 send_compression_encodings: self.send_compression_encodings,
7203 max_decoding_message_size: self.max_decoding_message_size,
7204 max_encoding_message_size: self.max_encoding_message_size,
7205 }
7206 }
7207 }
7208 pub const SERVICE_NAME: &str = "meta.ClusterLimitService";
7210 impl<T> tonic::server::NamedService for ClusterLimitServiceServer<T> {
7211 const NAME: &'static str = SERVICE_NAME;
7212 }
7213}