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, Copy, PartialEq, ::prost::Message)]
308pub struct RefreshRequest {
309 #[prost(uint32, tag = "1")]
310 pub table_id: u32,
311 #[prost(uint32, tag = "2")]
312 pub associated_source_id: u32,
313}
314#[derive(prost_helpers::AnyPB)]
315#[derive(Clone, PartialEq, ::prost::Message)]
316pub struct RefreshResponse {
317 #[prost(message, optional, tag = "1")]
318 pub status: ::core::option::Option<super::common::Status>,
319}
320#[derive(prost_helpers::AnyPB)]
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct CancelCreatingJobsRequest {
323 #[prost(oneof = "cancel_creating_jobs_request::Jobs", tags = "1, 2")]
324 pub jobs: ::core::option::Option<cancel_creating_jobs_request::Jobs>,
325}
326pub mod cancel_creating_jobs_request {
328 #[derive(prost_helpers::AnyPB)]
329 #[derive(Clone, PartialEq, ::prost::Message)]
330 pub struct CreatingJobInfo {
331 #[prost(uint32, tag = "1")]
332 pub database_id: u32,
333 #[prost(uint32, tag = "2")]
334 pub schema_id: u32,
335 #[prost(string, tag = "3")]
336 pub name: ::prost::alloc::string::String,
337 }
338 #[derive(prost_helpers::AnyPB)]
339 #[derive(Clone, PartialEq, ::prost::Message)]
340 pub struct CreatingJobInfos {
341 #[prost(message, repeated, tag = "1")]
342 pub infos: ::prost::alloc::vec::Vec<CreatingJobInfo>,
343 }
344 #[derive(prost_helpers::AnyPB)]
345 #[derive(Clone, PartialEq, ::prost::Message)]
346 pub struct CreatingJobIds {
347 #[prost(uint32, repeated, tag = "1")]
348 pub job_ids: ::prost::alloc::vec::Vec<u32>,
349 }
350 #[derive(prost_helpers::AnyPB)]
351 #[derive(Clone, PartialEq, ::prost::Oneof)]
352 pub enum Jobs {
353 #[prost(message, tag = "1")]
354 Infos(CreatingJobInfos),
355 #[prost(message, tag = "2")]
356 Ids(CreatingJobIds),
357 }
358}
359#[derive(prost_helpers::AnyPB)]
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct CancelCreatingJobsResponse {
362 #[prost(message, optional, tag = "1")]
363 pub status: ::core::option::Option<super::common::Status>,
364 #[prost(uint32, repeated, tag = "2")]
365 pub canceled_jobs: ::prost::alloc::vec::Vec<u32>,
366}
367#[derive(prost_helpers::AnyPB)]
368#[derive(Clone, PartialEq, ::prost::Message)]
369pub struct ListTableFragmentsRequest {
370 #[prost(uint32, repeated, tag = "1")]
371 pub table_ids: ::prost::alloc::vec::Vec<u32>,
372}
373#[derive(prost_helpers::AnyPB)]
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct ListTableFragmentsResponse {
376 #[prost(map = "uint32, message", tag = "1")]
377 pub table_fragments: ::std::collections::HashMap<
378 u32,
379 list_table_fragments_response::TableFragmentInfo,
380 >,
381}
382pub mod list_table_fragments_response {
384 #[derive(prost_helpers::AnyPB)]
385 #[derive(Clone, PartialEq, ::prost::Message)]
386 pub struct ActorInfo {
387 #[prost(uint32, tag = "1")]
388 pub id: u32,
389 #[prost(message, optional, tag = "2")]
390 pub node: ::core::option::Option<super::super::stream_plan::StreamNode>,
391 #[prost(message, repeated, tag = "3")]
392 pub dispatcher: ::prost::alloc::vec::Vec<super::super::stream_plan::Dispatcher>,
393 }
394 #[derive(prost_helpers::AnyPB)]
395 #[derive(Clone, PartialEq, ::prost::Message)]
396 pub struct FragmentInfo {
397 #[prost(uint32, tag = "1")]
398 pub id: u32,
399 #[prost(message, repeated, tag = "4")]
400 pub actors: ::prost::alloc::vec::Vec<ActorInfo>,
401 }
402 #[derive(prost_helpers::AnyPB)]
403 #[derive(Clone, PartialEq, ::prost::Message)]
404 pub struct TableFragmentInfo {
405 #[prost(message, repeated, tag = "1")]
406 pub fragments: ::prost::alloc::vec::Vec<FragmentInfo>,
407 #[prost(message, optional, tag = "2")]
408 pub ctx: ::core::option::Option<super::super::stream_plan::StreamContext>,
409 }
410}
411#[derive(prost_helpers::AnyPB)]
412#[derive(Clone, Copy, PartialEq, ::prost::Message)]
413pub struct GetFragmentByIdRequest {
414 #[prost(uint32, tag = "1")]
415 pub fragment_id: u32,
416}
417#[derive(prost_helpers::AnyPB)]
418#[derive(Clone, PartialEq, ::prost::Message)]
419pub struct GetFragmentByIdResponse {
420 #[prost(message, optional, tag = "1")]
421 pub distribution: ::core::option::Option<FragmentDistribution>,
422}
423#[derive(prost_helpers::AnyPB)]
424#[derive(Clone, Copy, PartialEq, ::prost::Message)]
425pub struct ListStreamingJobStatesRequest {}
426#[derive(prost_helpers::AnyPB)]
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct ListStreamingJobStatesResponse {
429 #[prost(message, repeated, tag = "1")]
430 pub states: ::prost::alloc::vec::Vec<
431 list_streaming_job_states_response::StreamingJobState,
432 >,
433}
434pub mod list_streaming_job_states_response {
436 #[derive(prost_helpers::AnyPB)]
437 #[derive(Clone, PartialEq, ::prost::Message)]
438 pub struct StreamingJobState {
439 #[prost(uint32, tag = "1")]
440 pub table_id: u32,
441 #[prost(enumeration = "super::table_fragments::State", tag = "2")]
442 pub state: i32,
443 #[prost(message, optional, tag = "3")]
444 pub parallelism: ::core::option::Option<super::TableParallelism>,
445 #[prost(uint32, tag = "4")]
446 pub max_parallelism: u32,
447 #[prost(string, tag = "5")]
448 pub name: ::prost::alloc::string::String,
449 #[prost(string, tag = "6")]
450 pub resource_group: ::prost::alloc::string::String,
451 #[prost(uint32, tag = "7")]
452 pub database_id: u32,
453 #[prost(uint32, tag = "8")]
454 pub schema_id: u32,
455 }
456}
457#[derive(prost_helpers::AnyPB)]
458#[derive(Clone, Copy, PartialEq, ::prost::Message)]
459pub struct ListFragmentDistributionRequest {}
460#[derive(prost_helpers::AnyPB)]
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct FragmentDistribution {
463 #[prost(uint32, tag = "1")]
464 pub fragment_id: u32,
465 #[prost(uint32, tag = "2")]
466 pub table_id: u32,
467 #[prost(
468 enumeration = "table_fragments::fragment::FragmentDistributionType",
469 tag = "3"
470 )]
471 pub distribution_type: i32,
472 #[prost(uint32, repeated, tag = "4")]
473 pub state_table_ids: ::prost::alloc::vec::Vec<u32>,
474 #[prost(uint32, repeated, tag = "5")]
475 pub upstream_fragment_ids: ::prost::alloc::vec::Vec<u32>,
476 #[prost(uint32, tag = "6")]
477 pub fragment_type_mask: u32,
478 #[prost(uint32, tag = "7")]
479 pub parallelism: u32,
480 #[prost(uint32, tag = "8")]
481 pub vnode_count: u32,
482 #[prost(message, optional, tag = "9")]
483 pub node: ::core::option::Option<super::stream_plan::StreamNode>,
484}
485#[derive(prost_helpers::AnyPB)]
486#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct ListFragmentDistributionResponse {
488 #[prost(message, repeated, tag = "1")]
489 pub distributions: ::prost::alloc::vec::Vec<FragmentDistribution>,
490}
491#[derive(prost_helpers::AnyPB)]
494#[derive(Clone, Copy, PartialEq, ::prost::Message)]
495pub struct ListCreatingFragmentDistributionRequest {}
496#[derive(prost_helpers::AnyPB)]
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct ListCreatingFragmentDistributionResponse {
501 #[prost(message, repeated, tag = "1")]
502 pub distributions: ::prost::alloc::vec::Vec<FragmentDistribution>,
503}
504#[derive(prost_helpers::AnyPB)]
505#[derive(Clone, Copy, PartialEq, ::prost::Message)]
506pub struct ListActorStatesRequest {}
507#[derive(prost_helpers::AnyPB)]
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct ListActorStatesResponse {
510 #[prost(message, repeated, tag = "1")]
511 pub states: ::prost::alloc::vec::Vec<list_actor_states_response::ActorState>,
512}
513pub mod list_actor_states_response {
515 #[derive(prost_helpers::AnyPB)]
516 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
517 pub struct ActorState {
518 #[prost(uint32, tag = "1")]
519 pub actor_id: u32,
520 #[prost(uint32, tag = "2")]
521 pub fragment_id: u32,
522 #[prost(
523 enumeration = "super::table_fragments::actor_status::ActorState",
524 tag = "4"
525 )]
526 pub state: i32,
527 #[prost(uint32, tag = "5")]
528 pub worker_id: u32,
529 }
530}
531#[derive(prost_helpers::AnyPB)]
532#[derive(Clone, Copy, PartialEq, ::prost::Message)]
533pub struct ListActorSplitsRequest {}
534#[derive(prost_helpers::AnyPB)]
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct ListActorSplitsResponse {
537 #[prost(message, repeated, tag = "1")]
538 pub actor_splits: ::prost::alloc::vec::Vec<list_actor_splits_response::ActorSplit>,
539}
540pub mod list_actor_splits_response {
542 #[derive(prost_helpers::AnyPB)]
543 #[derive(Clone, PartialEq, ::prost::Message)]
544 pub struct ActorSplit {
545 #[prost(uint32, tag = "1")]
546 pub actor_id: u32,
547 #[prost(uint32, tag = "2")]
548 pub fragment_id: u32,
549 #[prost(uint32, tag = "3")]
550 pub source_id: u32,
551 #[prost(string, tag = "4")]
552 pub split_id: ::prost::alloc::string::String,
553 #[prost(enumeration = "FragmentType", tag = "5")]
554 pub fragment_type: i32,
555 }
556 #[derive(prost_helpers::AnyPB)]
557 #[derive(
558 Clone,
559 Copy,
560 Debug,
561 PartialEq,
562 Eq,
563 Hash,
564 PartialOrd,
565 Ord,
566 ::prost::Enumeration
567 )]
568 #[repr(i32)]
569 pub enum FragmentType {
570 Unspecified = 0,
571 NonSharedSource = 1,
572 SharedSource = 2,
573 SharedSourceBackfill = 3,
574 }
575 impl FragmentType {
576 pub fn as_str_name(&self) -> &'static str {
581 match self {
582 Self::Unspecified => "UNSPECIFIED",
583 Self::NonSharedSource => "NON_SHARED_SOURCE",
584 Self::SharedSource => "SHARED_SOURCE",
585 Self::SharedSourceBackfill => "SHARED_SOURCE_BACKFILL",
586 }
587 }
588 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
590 match value {
591 "UNSPECIFIED" => Some(Self::Unspecified),
592 "NON_SHARED_SOURCE" => Some(Self::NonSharedSource),
593 "SHARED_SOURCE" => Some(Self::SharedSource),
594 "SHARED_SOURCE_BACKFILL" => Some(Self::SharedSourceBackfill),
595 _ => None,
596 }
597 }
598 }
599}
600#[derive(prost_helpers::AnyPB)]
601#[derive(Clone, Copy, PartialEq, ::prost::Message)]
602pub struct ListObjectDependenciesRequest {}
603#[derive(prost_helpers::AnyPB)]
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct ListObjectDependenciesResponse {
606 #[prost(message, repeated, tag = "1")]
607 pub dependencies: ::prost::alloc::vec::Vec<
608 list_object_dependencies_response::ObjectDependencies,
609 >,
610}
611pub mod list_object_dependencies_response {
613 #[derive(prost_helpers::AnyPB)]
614 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
615 pub struct ObjectDependencies {
616 #[prost(uint32, tag = "1")]
617 pub object_id: u32,
618 #[prost(uint32, tag = "2")]
619 pub referenced_object_id: u32,
620 }
621}
622#[derive(prost_helpers::AnyPB)]
623#[derive(Clone, Copy, PartialEq, ::prost::Message)]
624pub struct ApplyThrottleRequest {
625 #[prost(enumeration = "ThrottleTarget", tag = "1")]
626 pub kind: i32,
627 #[prost(uint32, tag = "2")]
628 pub id: u32,
629 #[prost(uint32, optional, tag = "3")]
630 pub rate: ::core::option::Option<u32>,
631}
632#[derive(prost_helpers::AnyPB)]
633#[derive(Clone, PartialEq, ::prost::Message)]
634pub struct ApplyThrottleResponse {
635 #[prost(message, optional, tag = "1")]
636 pub status: ::core::option::Option<super::common::Status>,
637}
638#[derive(prost_helpers::AnyPB)]
639#[derive(Clone, Copy, PartialEq, ::prost::Message)]
640pub struct RecoverRequest {}
641#[derive(prost_helpers::AnyPB)]
642#[derive(Clone, Copy, PartialEq, ::prost::Message)]
643pub struct RecoverResponse {}
644#[derive(prost_helpers::AnyPB)]
645#[derive(Clone, PartialEq, ::prost::Message)]
646pub struct AlterConnectorPropsRequest {
647 #[prost(uint32, tag = "1")]
648 pub object_id: u32,
649 #[prost(map = "string, string", tag = "2")]
650 pub changed_props: ::std::collections::HashMap<
651 ::prost::alloc::string::String,
652 ::prost::alloc::string::String,
653 >,
654 #[prost(map = "string, message", tag = "3")]
655 pub changed_secret_refs: ::std::collections::HashMap<
656 ::prost::alloc::string::String,
657 super::secret::SecretRef,
658 >,
659 #[prost(uint32, optional, tag = "4")]
660 pub connector_conn_ref: ::core::option::Option<u32>,
661 #[prost(
662 enumeration = "alter_connector_props_request::AlterConnectorPropsObject",
663 tag = "5"
664 )]
665 pub object_type: i32,
666}
667pub mod alter_connector_props_request {
669 #[derive(prost_helpers::AnyPB)]
670 #[derive(
671 Clone,
672 Copy,
673 Debug,
674 PartialEq,
675 Eq,
676 Hash,
677 PartialOrd,
678 Ord,
679 ::prost::Enumeration
680 )]
681 #[repr(i32)]
682 pub enum AlterConnectorPropsObject {
683 Unspecified = 0,
684 Source = 1,
685 Sink = 2,
686 Connection = 3,
687 }
688 impl AlterConnectorPropsObject {
689 pub fn as_str_name(&self) -> &'static str {
694 match self {
695 Self::Unspecified => "UNSPECIFIED",
696 Self::Source => "SOURCE",
697 Self::Sink => "SINK",
698 Self::Connection => "CONNECTION",
699 }
700 }
701 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
703 match value {
704 "UNSPECIFIED" => Some(Self::Unspecified),
705 "SOURCE" => Some(Self::Source),
706 "SINK" => Some(Self::Sink),
707 "CONNECTION" => Some(Self::Connection),
708 _ => None,
709 }
710 }
711 }
712}
713#[derive(prost_helpers::AnyPB)]
714#[derive(Clone, Copy, PartialEq, ::prost::Message)]
715pub struct AlterConnectorPropsResponse {}
716#[derive(prost_helpers::AnyPB)]
717#[derive(Clone, Copy, PartialEq, ::prost::Message)]
718pub struct ListCdcProgressRequest {}
719#[derive(prost_helpers::AnyPB)]
720#[derive(Clone, PartialEq, ::prost::Message)]
721pub struct ListCdcProgressResponse {
722 #[prost(map = "uint32, message", tag = "1")]
723 pub cdc_progress: ::std::collections::HashMap<
724 u32,
725 list_cdc_progress_response::CdcProgress,
726 >,
727}
728pub mod list_cdc_progress_response {
730 #[derive(prost_helpers::AnyPB)]
731 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
732 pub struct CdcProgress {
733 #[prost(uint64, tag = "1")]
734 pub split_total_count: u64,
735 #[prost(uint64, tag = "2")]
736 pub split_backfilled_count: u64,
737 #[prost(uint64, tag = "3")]
738 pub split_completed_count: u64,
739 }
740}
741#[derive(prost_helpers::AnyPB)]
743#[derive(Clone, PartialEq, ::prost::Message)]
744pub struct AddWorkerNodeRequest {
745 #[prost(enumeration = "super::common::WorkerType", tag = "1")]
746 pub worker_type: i32,
747 #[prost(message, optional, tag = "2")]
748 pub host: ::core::option::Option<super::common::HostAddress>,
749 #[prost(message, optional, tag = "5")]
750 pub resource: ::core::option::Option<super::common::worker_node::Resource>,
751 #[prost(message, optional, tag = "6")]
752 pub property: ::core::option::Option<super::common::worker_node::Property>,
753}
754#[derive(prost_helpers::AnyPB)]
755#[derive(Clone, PartialEq, ::prost::Message)]
756pub struct AddWorkerNodeResponse {
757 #[prost(uint32, optional, tag = "2")]
758 pub node_id: ::core::option::Option<u32>,
759 #[prost(string, tag = "4")]
760 pub cluster_id: ::prost::alloc::string::String,
761}
762#[derive(prost_helpers::AnyPB)]
763#[derive(Clone, PartialEq, ::prost::Message)]
764pub struct ActivateWorkerNodeRequest {
765 #[prost(message, optional, tag = "1")]
766 pub host: ::core::option::Option<super::common::HostAddress>,
767 #[prost(uint32, tag = "2")]
768 pub node_id: u32,
769}
770#[derive(prost_helpers::AnyPB)]
771#[derive(Clone, PartialEq, ::prost::Message)]
772pub struct ActivateWorkerNodeResponse {
773 #[prost(message, optional, tag = "1")]
774 pub status: ::core::option::Option<super::common::Status>,
775}
776#[derive(prost_helpers::AnyPB)]
777#[derive(Clone, PartialEq, ::prost::Message)]
778pub struct DeleteWorkerNodeRequest {
779 #[prost(message, optional, tag = "1")]
780 pub host: ::core::option::Option<super::common::HostAddress>,
781}
782#[derive(prost_helpers::AnyPB)]
783#[derive(Clone, PartialEq, ::prost::Message)]
784pub struct DeleteWorkerNodeResponse {
785 #[prost(message, optional, tag = "1")]
786 pub status: ::core::option::Option<super::common::Status>,
787}
788#[derive(prost_helpers::AnyPB)]
790#[derive(Clone, PartialEq, ::prost::Message)]
791pub struct UpdateWorkerNodeSchedulabilityRequest {
792 #[prost(uint32, repeated, tag = "1")]
793 pub worker_ids: ::prost::alloc::vec::Vec<u32>,
794 #[prost(
795 enumeration = "update_worker_node_schedulability_request::Schedulability",
796 tag = "2"
797 )]
798 pub schedulability: i32,
799}
800pub mod update_worker_node_schedulability_request {
802 #[derive(prost_helpers::AnyPB)]
803 #[derive(
804 Clone,
805 Copy,
806 Debug,
807 PartialEq,
808 Eq,
809 Hash,
810 PartialOrd,
811 Ord,
812 ::prost::Enumeration
813 )]
814 #[repr(i32)]
815 pub enum Schedulability {
816 Unspecified = 0,
817 Schedulable = 1,
818 Unschedulable = 2,
819 }
820 impl Schedulability {
821 pub fn as_str_name(&self) -> &'static str {
826 match self {
827 Self::Unspecified => "UNSPECIFIED",
828 Self::Schedulable => "SCHEDULABLE",
829 Self::Unschedulable => "UNSCHEDULABLE",
830 }
831 }
832 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
834 match value {
835 "UNSPECIFIED" => Some(Self::Unspecified),
836 "SCHEDULABLE" => Some(Self::Schedulable),
837 "UNSCHEDULABLE" => Some(Self::Unschedulable),
838 _ => None,
839 }
840 }
841 }
842}
843#[derive(prost_helpers::AnyPB)]
844#[derive(Clone, PartialEq, ::prost::Message)]
845pub struct UpdateWorkerNodeSchedulabilityResponse {
846 #[prost(message, optional, tag = "1")]
847 pub status: ::core::option::Option<super::common::Status>,
848}
849#[derive(prost_helpers::AnyPB)]
850#[derive(Clone, Copy, PartialEq, ::prost::Message)]
851pub struct ListAllNodesRequest {
852 #[prost(enumeration = "super::common::WorkerType", optional, tag = "1")]
853 pub worker_type: ::core::option::Option<i32>,
854 #[prost(bool, tag = "2")]
856 pub include_starting_nodes: bool,
857}
858#[derive(prost_helpers::AnyPB)]
859#[derive(Clone, PartialEq, ::prost::Message)]
860pub struct ListAllNodesResponse {
861 #[prost(message, optional, tag = "1")]
862 pub status: ::core::option::Option<super::common::Status>,
863 #[prost(message, repeated, tag = "2")]
864 pub nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
865}
866#[derive(prost_helpers::AnyPB)]
867#[derive(Clone, Copy, PartialEq, ::prost::Message)]
868pub struct GetClusterRecoveryStatusRequest {}
869#[derive(prost_helpers::AnyPB)]
870#[derive(Clone, Copy, PartialEq, ::prost::Message)]
871pub struct GetClusterRecoveryStatusResponse {
872 #[prost(enumeration = "RecoveryStatus", tag = "1")]
873 pub status: i32,
874}
875#[derive(prost_helpers::AnyPB)]
876#[derive(Clone, Copy, PartialEq, ::prost::Message)]
877pub struct GetMetaStoreInfoRequest {}
878#[derive(prost_helpers::AnyPB)]
879#[derive(Clone, PartialEq, ::prost::Message)]
880pub struct GetMetaStoreInfoResponse {
881 #[prost(string, tag = "1")]
882 pub meta_store_endpoint: ::prost::alloc::string::String,
883}
884#[derive(prost_helpers::AnyPB)]
886#[derive(Clone, PartialEq, ::prost::Message)]
887pub struct SubscribeRequest {
888 #[prost(enumeration = "SubscribeType", tag = "1")]
889 pub subscribe_type: i32,
890 #[prost(message, optional, tag = "2")]
891 pub host: ::core::option::Option<super::common::HostAddress>,
892 #[prost(uint32, tag = "3")]
893 pub worker_id: u32,
894}
895#[derive(prost_helpers::AnyPB)]
896#[derive(Clone, PartialEq, ::prost::Message)]
897pub struct MetaSnapshot {
898 #[prost(message, repeated, tag = "1")]
899 pub databases: ::prost::alloc::vec::Vec<super::catalog::Database>,
900 #[prost(message, repeated, tag = "2")]
901 pub schemas: ::prost::alloc::vec::Vec<super::catalog::Schema>,
902 #[prost(message, repeated, tag = "3")]
903 pub sources: ::prost::alloc::vec::Vec<super::catalog::Source>,
904 #[prost(message, repeated, tag = "4")]
905 pub sinks: ::prost::alloc::vec::Vec<super::catalog::Sink>,
906 #[prost(message, repeated, tag = "5")]
907 pub tables: ::prost::alloc::vec::Vec<super::catalog::Table>,
908 #[prost(message, repeated, tag = "6")]
909 pub indexes: ::prost::alloc::vec::Vec<super::catalog::Index>,
910 #[prost(message, repeated, tag = "7")]
911 pub views: ::prost::alloc::vec::Vec<super::catalog::View>,
912 #[prost(message, repeated, tag = "15")]
913 pub functions: ::prost::alloc::vec::Vec<super::catalog::Function>,
914 #[prost(message, repeated, tag = "17")]
915 pub connections: ::prost::alloc::vec::Vec<super::catalog::Connection>,
916 #[prost(message, repeated, tag = "19")]
917 pub subscriptions: ::prost::alloc::vec::Vec<super::catalog::Subscription>,
918 #[prost(message, repeated, tag = "8")]
919 pub users: ::prost::alloc::vec::Vec<super::user::UserInfo>,
920 #[prost(message, optional, tag = "20")]
921 pub session_params: ::core::option::Option<GetSessionParamsResponse>,
922 #[prost(message, repeated, tag = "23")]
923 pub secrets: ::prost::alloc::vec::Vec<super::catalog::Secret>,
924 #[prost(uint64, tag = "24")]
925 pub compute_node_total_cpu_count: u64,
926 #[prost(message, repeated, tag = "10")]
927 pub nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
928 #[prost(message, optional, tag = "12")]
929 pub hummock_version: ::core::option::Option<super::hummock::HummockVersion>,
930 #[prost(message, optional, tag = "14")]
931 pub meta_backup_manifest_id: ::core::option::Option<
932 super::backup_service::MetaBackupManifestId,
933 >,
934 #[prost(message, optional, tag = "16")]
935 pub hummock_write_limits: ::core::option::Option<super::hummock::WriteLimits>,
936 #[prost(message, repeated, tag = "21")]
938 pub streaming_worker_slot_mappings: ::prost::alloc::vec::Vec<
939 FragmentWorkerSlotMapping,
940 >,
941 #[prost(message, repeated, tag = "22")]
942 pub serving_worker_slot_mappings: ::prost::alloc::vec::Vec<
943 FragmentWorkerSlotMapping,
944 >,
945 #[prost(message, optional, tag = "13")]
946 pub version: ::core::option::Option<meta_snapshot::SnapshotVersion>,
947}
948pub mod meta_snapshot {
950 #[derive(prost_helpers::AnyPB)]
951 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
952 pub struct SnapshotVersion {
953 #[prost(uint64, tag = "1")]
954 pub catalog_version: u64,
955 #[prost(uint64, tag = "3")]
956 pub worker_node_version: u64,
957 #[prost(uint64, tag = "4")]
958 pub streaming_worker_slot_mapping_version: u64,
959 }
960}
961#[derive(prost_helpers::AnyPB)]
962#[derive(Clone, PartialEq, ::prost::Message)]
963pub struct Object {
964 #[prost(oneof = "object::ObjectInfo", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11")]
965 pub object_info: ::core::option::Option<object::ObjectInfo>,
966}
967pub mod object {
969 #[derive(prost_helpers::AnyPB)]
970 #[derive(Clone, PartialEq, ::prost::Oneof)]
971 pub enum ObjectInfo {
972 #[prost(message, tag = "1")]
973 Database(super::super::catalog::Database),
974 #[prost(message, tag = "2")]
975 Schema(super::super::catalog::Schema),
976 #[prost(message, tag = "3")]
977 Table(super::super::catalog::Table),
978 #[prost(message, tag = "4")]
979 Index(super::super::catalog::Index),
980 #[prost(message, tag = "5")]
981 Source(super::super::catalog::Source),
982 #[prost(message, tag = "6")]
983 Sink(super::super::catalog::Sink),
984 #[prost(message, tag = "7")]
985 View(super::super::catalog::View),
986 #[prost(message, tag = "8")]
987 Function(super::super::catalog::Function),
988 #[prost(message, tag = "9")]
989 Connection(super::super::catalog::Connection),
990 #[prost(message, tag = "10")]
991 Subscription(super::super::catalog::Subscription),
992 #[prost(message, tag = "11")]
993 Secret(super::super::catalog::Secret),
994 }
995}
996#[derive(prost_helpers::AnyPB)]
997#[derive(Clone, PartialEq, ::prost::Message)]
998pub struct ObjectGroup {
999 #[prost(message, repeated, tag = "1")]
1000 pub objects: ::prost::alloc::vec::Vec<Object>,
1001}
1002#[derive(prost_helpers::AnyPB)]
1003#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1004pub struct Recovery {}
1005#[derive(prost_helpers::AnyPB)]
1006#[derive(Clone, PartialEq, ::prost::Message)]
1007pub struct SubscribeResponse {
1008 #[prost(message, optional, tag = "1")]
1009 pub status: ::core::option::Option<super::common::Status>,
1010 #[prost(enumeration = "subscribe_response::Operation", tag = "2")]
1011 pub operation: i32,
1012 #[prost(uint64, tag = "3")]
1014 pub version: u64,
1015 #[prost(
1016 oneof = "subscribe_response::Info",
1017 tags = "4, 5, 6, 11, 26, 13, 15, 16, 17, 19, 20, 21, 22, 24, 25, 27, 28, 29, 30"
1018 )]
1019 pub info: ::core::option::Option<subscribe_response::Info>,
1020}
1021pub mod subscribe_response {
1023 #[derive(prost_helpers::AnyPB)]
1024 #[derive(
1025 Clone,
1026 Copy,
1027 Debug,
1028 PartialEq,
1029 Eq,
1030 Hash,
1031 PartialOrd,
1032 Ord,
1033 ::prost::Enumeration
1034 )]
1035 #[repr(i32)]
1036 pub enum Operation {
1037 Unspecified = 0,
1038 Add = 1,
1039 Delete = 2,
1040 Update = 3,
1041 Snapshot = 4,
1042 }
1043 impl Operation {
1044 pub fn as_str_name(&self) -> &'static str {
1049 match self {
1050 Self::Unspecified => "UNSPECIFIED",
1051 Self::Add => "ADD",
1052 Self::Delete => "DELETE",
1053 Self::Update => "UPDATE",
1054 Self::Snapshot => "SNAPSHOT",
1055 }
1056 }
1057 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1059 match value {
1060 "UNSPECIFIED" => Some(Self::Unspecified),
1061 "ADD" => Some(Self::Add),
1062 "DELETE" => Some(Self::Delete),
1063 "UPDATE" => Some(Self::Update),
1064 "SNAPSHOT" => Some(Self::Snapshot),
1065 _ => None,
1066 }
1067 }
1068 }
1069 #[derive(prost_helpers::AnyPB)]
1070 #[derive(Clone, PartialEq, ::prost::Oneof)]
1071 pub enum Info {
1072 #[prost(message, tag = "4")]
1073 Database(super::super::catalog::Database),
1074 #[prost(message, tag = "5")]
1075 Schema(super::super::catalog::Schema),
1076 #[prost(message, tag = "6")]
1077 Function(super::super::catalog::Function),
1078 #[prost(message, tag = "11")]
1079 User(super::super::user::UserInfo),
1080 #[prost(message, tag = "26")]
1081 SessionParam(super::SetSessionParamRequest),
1082 #[prost(message, tag = "13")]
1083 Node(super::super::common::WorkerNode),
1084 #[prost(message, tag = "15")]
1085 HummockVersionDeltas(super::super::hummock::HummockVersionDeltas),
1086 #[prost(message, tag = "16")]
1087 Snapshot(super::MetaSnapshot),
1088 #[prost(message, tag = "17")]
1089 MetaBackupManifestId(super::super::backup_service::MetaBackupManifestId),
1090 #[prost(message, tag = "19")]
1091 SystemParams(super::SystemParams),
1092 #[prost(message, tag = "20")]
1093 HummockWriteLimits(super::super::hummock::WriteLimits),
1094 #[prost(message, tag = "21")]
1095 ObjectGroup(super::ObjectGroup),
1096 #[prost(message, tag = "22")]
1097 Connection(super::super::catalog::Connection),
1098 #[prost(message, tag = "24")]
1099 HummockStats(super::super::hummock::HummockVersionStats),
1100 #[prost(message, tag = "25")]
1101 Recovery(super::Recovery),
1102 #[prost(message, tag = "27")]
1103 StreamingWorkerSlotMapping(super::FragmentWorkerSlotMapping),
1104 #[prost(message, tag = "28")]
1105 ServingWorkerSlotMappings(super::FragmentWorkerSlotMappings),
1106 #[prost(message, tag = "29")]
1107 Secret(super::super::catalog::Secret),
1108 #[prost(uint64, tag = "30")]
1109 ComputeNodeTotalCpuCount(u64),
1110 }
1111}
1112#[derive(prost_helpers::AnyPB)]
1113#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1114pub struct GetClusterInfoRequest {}
1115#[derive(prost_helpers::AnyPB)]
1116#[derive(Clone, PartialEq, ::prost::Message)]
1117pub struct GetClusterInfoResponse {
1118 #[prost(message, repeated, tag = "1")]
1119 pub worker_nodes: ::prost::alloc::vec::Vec<super::common::WorkerNode>,
1120 #[prost(message, repeated, tag = "2")]
1121 pub table_fragments: ::prost::alloc::vec::Vec<TableFragments>,
1122 #[prost(map = "uint32, message", tag = "3")]
1124 pub actor_splits: ::std::collections::HashMap<u32, super::source::ConnectorSplits>,
1125 #[prost(map = "uint32, message", tag = "4")]
1126 pub source_infos: ::std::collections::HashMap<u32, super::catalog::Source>,
1127 #[prost(uint64, tag = "5")]
1128 pub revision: u64,
1129}
1130#[derive(prost_helpers::AnyPB)]
1133#[derive(Clone, PartialEq, ::prost::Message)]
1134pub struct WorkerReschedule {
1135 #[prost(map = "uint32, int32", tag = "1")]
1137 pub worker_actor_diff: ::std::collections::HashMap<u32, i32>,
1138}
1139#[derive(prost_helpers::AnyPB)]
1140#[derive(Clone, PartialEq, ::prost::Message)]
1141pub struct RescheduleRequest {
1142 #[prost(uint64, tag = "2")]
1143 pub revision: u64,
1144 #[prost(bool, tag = "3")]
1145 pub resolve_no_shuffle_upstream: bool,
1146 #[prost(map = "uint32, message", tag = "4")]
1147 pub worker_reschedules: ::std::collections::HashMap<u32, WorkerReschedule>,
1148}
1149#[derive(prost_helpers::AnyPB)]
1150#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1151pub struct RescheduleResponse {
1152 #[prost(bool, tag = "1")]
1153 pub success: bool,
1154 #[prost(uint64, tag = "2")]
1155 pub revision: u64,
1156}
1157#[derive(prost_helpers::AnyPB)]
1158#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1159pub struct TableParallelism {
1160 #[prost(oneof = "table_parallelism::Parallelism", tags = "1, 2, 3, 4")]
1161 pub parallelism: ::core::option::Option<table_parallelism::Parallelism>,
1162}
1163pub mod table_parallelism {
1165 #[derive(prost_helpers::AnyPB)]
1166 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1167 pub struct FixedParallelism {
1168 #[prost(uint32, tag = "1")]
1169 pub parallelism: u32,
1170 }
1171 #[derive(prost_helpers::AnyPB)]
1173 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1174 pub struct AutoParallelism {}
1175 #[derive(prost_helpers::AnyPB)]
1176 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1177 pub struct AdaptiveParallelism {}
1178 #[derive(prost_helpers::AnyPB)]
1179 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1180 pub struct CustomParallelism {}
1181 #[derive(prost_helpers::AnyPB)]
1182 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1183 pub enum Parallelism {
1184 #[prost(message, tag = "1")]
1185 Fixed(FixedParallelism),
1186 #[prost(message, tag = "2")]
1187 Auto(AutoParallelism),
1188 #[prost(message, tag = "3")]
1189 Custom(CustomParallelism),
1190 #[prost(message, tag = "4")]
1191 Adaptive(AdaptiveParallelism),
1192 }
1193}
1194#[derive(prost_helpers::AnyPB)]
1197#[derive(Clone, PartialEq, ::prost::Message)]
1198pub struct UpdateStreamingJobNodeLabelsRequest {
1199 #[prost(uint32, tag = "1")]
1201 pub id: u32,
1202 #[prost(string, tag = "2")]
1204 pub node_label: ::prost::alloc::string::String,
1205}
1206#[derive(prost_helpers::AnyPB)]
1208#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1209pub struct UpdateStreamingJobNodeLabelsResponse {}
1210#[derive(prost_helpers::AnyPB)]
1211#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1212pub struct GetServerlessStreamingJobsStatusRequest {}
1213#[derive(prost_helpers::AnyPB)]
1215#[derive(Clone, PartialEq, ::prost::Message)]
1216pub struct GetServerlessStreamingJobsStatusResponse {
1217 #[prost(message, repeated, tag = "1")]
1218 pub streaming_job_statuses: ::prost::alloc::vec::Vec<
1219 get_serverless_streaming_jobs_status_response::Status,
1220 >,
1221}
1222pub mod get_serverless_streaming_jobs_status_response {
1224 #[derive(prost_helpers::AnyPB)]
1225 #[derive(Clone, PartialEq, ::prost::Message)]
1226 pub struct Status {
1227 #[prost(uint32, tag = "1")]
1228 pub table_id: u32,
1229 #[prost(string, tag = "2")]
1230 pub node_label: ::prost::alloc::string::String,
1231 #[prost(bool, tag = "3")]
1232 pub backfill_done: bool,
1233 }
1234}
1235#[derive(prost_helpers::AnyPB)]
1236#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1237pub struct MembersRequest {}
1238#[derive(prost_helpers::AnyPB)]
1239#[derive(Clone, PartialEq, ::prost::Message)]
1240pub struct MetaMember {
1241 #[prost(message, optional, tag = "1")]
1242 pub address: ::core::option::Option<super::common::HostAddress>,
1243 #[prost(bool, tag = "2")]
1244 pub is_leader: bool,
1245}
1246#[derive(prost_helpers::AnyPB)]
1247#[derive(Clone, PartialEq, ::prost::Message)]
1248pub struct MembersResponse {
1249 #[prost(message, repeated, tag = "1")]
1250 pub members: ::prost::alloc::vec::Vec<MetaMember>,
1251}
1252#[derive(prost_helpers::AnyPB)]
1258#[derive(Clone, PartialEq, ::prost::Message)]
1259#[prost(skip_debug)]
1260pub struct SystemParams {
1261 #[prost(uint32, optional, tag = "1")]
1262 pub barrier_interval_ms: ::core::option::Option<u32>,
1263 #[prost(uint64, optional, tag = "2")]
1264 pub checkpoint_frequency: ::core::option::Option<u64>,
1265 #[prost(uint32, optional, tag = "3")]
1266 pub sstable_size_mb: ::core::option::Option<u32>,
1267 #[prost(uint32, optional, tag = "4")]
1268 pub block_size_kb: ::core::option::Option<u32>,
1269 #[prost(double, optional, tag = "5")]
1270 pub bloom_false_positive: ::core::option::Option<f64>,
1271 #[prost(string, optional, tag = "6")]
1272 pub state_store: ::core::option::Option<::prost::alloc::string::String>,
1273 #[prost(string, optional, tag = "7")]
1274 pub data_directory: ::core::option::Option<::prost::alloc::string::String>,
1275 #[prost(string, optional, tag = "8")]
1276 pub backup_storage_url: ::core::option::Option<::prost::alloc::string::String>,
1277 #[prost(string, optional, tag = "9")]
1278 pub backup_storage_directory: ::core::option::Option<::prost::alloc::string::String>,
1279 #[deprecated]
1281 #[prost(bool, optional, tag = "10")]
1282 pub telemetry_enabled: ::core::option::Option<bool>,
1283 #[prost(uint32, optional, tag = "11")]
1284 pub parallel_compact_size_mb: ::core::option::Option<u32>,
1285 #[prost(uint32, optional, tag = "12")]
1286 pub max_concurrent_creating_streaming_jobs: ::core::option::Option<u32>,
1287 #[prost(bool, optional, tag = "13")]
1288 pub pause_on_next_bootstrap: ::core::option::Option<bool>,
1289 #[deprecated]
1290 #[prost(string, optional, tag = "14")]
1291 pub wasm_storage_url: ::core::option::Option<::prost::alloc::string::String>,
1292 #[prost(bool, optional, tag = "15")]
1293 pub enable_tracing: ::core::option::Option<bool>,
1294 #[prost(bool, optional, tag = "16")]
1295 pub use_new_object_prefix_strategy: ::core::option::Option<bool>,
1296 #[prost(string, optional, tag = "17")]
1297 pub license_key: ::core::option::Option<::prost::alloc::string::String>,
1298 #[prost(uint64, optional, tag = "18")]
1299 pub time_travel_retention_ms: ::core::option::Option<u64>,
1300 #[prost(string, optional, tag = "19")]
1301 pub adaptive_parallelism_strategy: ::core::option::Option<
1302 ::prost::alloc::string::String,
1303 >,
1304 #[prost(bool, optional, tag = "20")]
1305 pub per_database_isolation: ::core::option::Option<bool>,
1306 #[prost(bool, optional, tag = "21")]
1307 pub enforce_secret: ::core::option::Option<bool>,
1308}
1309#[derive(prost_helpers::AnyPB)]
1310#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1311pub struct GetSystemParamsRequest {}
1312#[derive(prost_helpers::AnyPB)]
1313#[derive(Clone, PartialEq, ::prost::Message)]
1314pub struct GetSystemParamsResponse {
1315 #[prost(message, optional, tag = "1")]
1316 pub params: ::core::option::Option<SystemParams>,
1317}
1318#[derive(prost_helpers::AnyPB)]
1319#[derive(Clone, PartialEq, ::prost::Message)]
1320pub struct SetSystemParamRequest {
1321 #[prost(string, tag = "1")]
1322 pub param: ::prost::alloc::string::String,
1323 #[prost(string, optional, tag = "2")]
1325 pub value: ::core::option::Option<::prost::alloc::string::String>,
1326}
1327#[derive(prost_helpers::AnyPB)]
1328#[derive(Clone, PartialEq, ::prost::Message)]
1329pub struct SetSystemParamResponse {
1330 #[prost(message, optional, tag = "1")]
1331 pub params: ::core::option::Option<SystemParams>,
1332}
1333#[derive(prost_helpers::AnyPB)]
1334#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1335pub struct GetSessionParamsRequest {}
1336#[derive(prost_helpers::AnyPB)]
1337#[derive(Clone, PartialEq, ::prost::Message)]
1338pub struct GetSessionParamsResponse {
1339 #[prost(string, tag = "1")]
1340 pub params: ::prost::alloc::string::String,
1341}
1342#[derive(prost_helpers::AnyPB)]
1343#[derive(Clone, PartialEq, ::prost::Message)]
1344pub struct SetSessionParamRequest {
1345 #[prost(string, tag = "1")]
1346 pub param: ::prost::alloc::string::String,
1347 #[prost(string, optional, tag = "2")]
1349 pub value: ::core::option::Option<::prost::alloc::string::String>,
1350}
1351#[derive(prost_helpers::AnyPB)]
1352#[derive(Clone, PartialEq, ::prost::Message)]
1353pub struct SetSessionParamResponse {
1354 #[prost(string, tag = "1")]
1355 pub param: ::prost::alloc::string::String,
1356}
1357#[derive(prost_helpers::AnyPB)]
1358#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1359pub struct GetServingVnodeMappingsRequest {}
1360#[derive(prost_helpers::AnyPB)]
1361#[derive(Clone, PartialEq, ::prost::Message)]
1362pub struct GetServingVnodeMappingsResponse {
1363 #[prost(map = "uint32, uint32", tag = "2")]
1364 pub fragment_to_table: ::std::collections::HashMap<u32, u32>,
1365 #[prost(message, repeated, tag = "3")]
1366 pub worker_slot_mappings: ::prost::alloc::vec::Vec<FragmentWorkerSlotMapping>,
1367}
1368#[derive(prost_helpers::AnyPB)]
1369#[derive(Clone, PartialEq, ::prost::Message)]
1370pub struct EventLog {
1371 #[prost(string, optional, tag = "1")]
1373 pub unique_id: ::core::option::Option<::prost::alloc::string::String>,
1374 #[prost(uint64, optional, tag = "2")]
1376 pub timestamp: ::core::option::Option<u64>,
1377 #[prost(oneof = "event_log::Event", tags = "3, 4, 5, 6, 7, 8, 9, 10, 11, 12")]
1378 pub event: ::core::option::Option<event_log::Event>,
1379}
1380pub mod event_log {
1382 #[derive(prost_helpers::AnyPB)]
1383 #[derive(Clone, PartialEq, ::prost::Message)]
1384 pub struct EventMetaNodeStart {
1385 #[prost(string, tag = "1")]
1386 pub advertise_addr: ::prost::alloc::string::String,
1387 #[prost(string, tag = "2")]
1388 pub listen_addr: ::prost::alloc::string::String,
1389 #[prost(string, tag = "3")]
1390 pub opts: ::prost::alloc::string::String,
1391 }
1392 #[derive(prost_helpers::AnyPB)]
1393 #[derive(Clone, PartialEq, ::prost::Message)]
1394 pub struct EventCreateStreamJobFail {
1395 #[prost(uint32, tag = "1")]
1396 pub id: u32,
1397 #[prost(string, tag = "2")]
1398 pub name: ::prost::alloc::string::String,
1399 #[prost(string, tag = "3")]
1400 pub definition: ::prost::alloc::string::String,
1401 #[prost(string, tag = "4")]
1402 pub error: ::prost::alloc::string::String,
1403 }
1404 #[derive(prost_helpers::AnyPB)]
1405 #[derive(Clone, PartialEq, ::prost::Message)]
1406 pub struct EventDirtyStreamJobClear {
1407 #[prost(uint32, tag = "1")]
1408 pub id: u32,
1409 #[prost(string, tag = "2")]
1410 pub name: ::prost::alloc::string::String,
1411 #[prost(string, tag = "3")]
1412 pub definition: ::prost::alloc::string::String,
1413 #[prost(string, tag = "4")]
1414 pub error: ::prost::alloc::string::String,
1415 }
1416 #[derive(prost_helpers::AnyPB)]
1417 #[derive(Clone, PartialEq, ::prost::Message)]
1418 pub struct EventBarrierComplete {
1419 #[prost(uint64, tag = "1")]
1420 pub prev_epoch: u64,
1421 #[prost(uint64, tag = "2")]
1422 pub cur_epoch: u64,
1423 #[prost(double, tag = "3")]
1424 pub duration_sec: f64,
1425 #[prost(string, tag = "4")]
1426 pub command: ::prost::alloc::string::String,
1427 #[prost(string, tag = "5")]
1428 pub barrier_kind: ::prost::alloc::string::String,
1429 }
1430 #[derive(prost_helpers::AnyPB)]
1431 #[derive(Clone, PartialEq, ::prost::Message)]
1432 pub struct EventInjectBarrierFail {
1433 #[prost(uint64, tag = "1")]
1434 pub prev_epoch: u64,
1435 #[prost(uint64, tag = "2")]
1436 pub cur_epoch: u64,
1437 #[prost(string, tag = "3")]
1438 pub error: ::prost::alloc::string::String,
1439 }
1440 #[derive(prost_helpers::AnyPB)]
1441 #[derive(Clone, PartialEq, ::prost::Message)]
1442 pub struct EventCollectBarrierFail {
1443 #[prost(string, tag = "3")]
1444 pub error: ::prost::alloc::string::String,
1445 }
1446 #[derive(prost_helpers::AnyPB)]
1447 #[derive(Clone, PartialEq, ::prost::Message)]
1448 pub struct EventWorkerNodePanic {
1449 #[prost(uint32, tag = "1")]
1450 pub worker_id: u32,
1451 #[prost(enumeration = "super::super::common::WorkerType", tag = "2")]
1452 pub worker_type: i32,
1453 #[prost(message, optional, tag = "3")]
1454 pub host_addr: ::core::option::Option<super::super::common::HostAddress>,
1455 #[prost(string, tag = "4")]
1456 pub panic_info: ::prost::alloc::string::String,
1457 }
1458 #[derive(prost_helpers::AnyPB)]
1459 #[derive(Clone, PartialEq, ::prost::Message)]
1460 pub struct EventAutoSchemaChangeFail {
1461 #[prost(uint32, tag = "1")]
1462 pub table_id: u32,
1463 #[prost(string, tag = "2")]
1464 pub table_name: ::prost::alloc::string::String,
1465 #[prost(string, tag = "3")]
1466 pub cdc_table_id: ::prost::alloc::string::String,
1467 #[prost(string, tag = "4")]
1468 pub upstream_ddl: ::prost::alloc::string::String,
1469 #[prost(string, tag = "5")]
1470 pub fail_info: ::prost::alloc::string::String,
1471 }
1472 #[derive(prost_helpers::AnyPB)]
1473 #[derive(Clone, PartialEq, ::prost::Message)]
1474 pub struct EventSinkFail {
1475 #[prost(uint32, tag = "1")]
1476 pub sink_id: u32,
1477 #[prost(string, tag = "2")]
1478 pub sink_name: ::prost::alloc::string::String,
1479 #[prost(string, tag = "3")]
1480 pub connector: ::prost::alloc::string::String,
1481 #[prost(string, tag = "4")]
1482 pub error: ::prost::alloc::string::String,
1483 }
1484 #[derive(prost_helpers::AnyPB)]
1485 #[derive(Clone, PartialEq, ::prost::Message)]
1486 pub struct EventRecovery {
1487 #[prost(oneof = "event_recovery::RecoveryEvent", tags = "1, 2, 3, 4, 5, 6")]
1488 pub recovery_event: ::core::option::Option<event_recovery::RecoveryEvent>,
1489 }
1490 pub mod event_recovery {
1492 #[derive(prost_helpers::AnyPB)]
1493 #[derive(Clone, PartialEq, ::prost::Message)]
1494 pub struct GlobalRecoveryStart {
1495 #[prost(string, tag = "1")]
1496 pub reason: ::prost::alloc::string::String,
1497 }
1498 #[derive(prost_helpers::AnyPB)]
1499 #[derive(Clone, PartialEq, ::prost::Message)]
1500 pub struct GlobalRecoverySuccess {
1501 #[prost(string, tag = "1")]
1502 pub reason: ::prost::alloc::string::String,
1503 #[prost(float, tag = "2")]
1504 pub duration_secs: f32,
1505 #[prost(uint32, repeated, tag = "3")]
1506 pub running_database_ids: ::prost::alloc::vec::Vec<u32>,
1507 #[prost(uint32, repeated, tag = "4")]
1508 pub recovering_database_ids: ::prost::alloc::vec::Vec<u32>,
1509 }
1510 #[derive(prost_helpers::AnyPB)]
1511 #[derive(Clone, PartialEq, ::prost::Message)]
1512 pub struct GlobalRecoveryFailure {
1513 #[prost(string, tag = "1")]
1514 pub reason: ::prost::alloc::string::String,
1515 #[prost(string, tag = "2")]
1516 pub error: ::prost::alloc::string::String,
1517 }
1518 #[derive(prost_helpers::AnyPB)]
1519 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1520 pub struct DatabaseRecoveryStart {
1521 #[prost(uint32, tag = "1")]
1522 pub database_id: u32,
1523 }
1524 #[derive(prost_helpers::AnyPB)]
1525 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1526 pub struct DatabaseRecoveryFailure {
1527 #[prost(uint32, tag = "1")]
1528 pub database_id: u32,
1529 }
1530 #[derive(prost_helpers::AnyPB)]
1531 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1532 pub struct DatabaseRecoverySuccess {
1533 #[prost(uint32, tag = "1")]
1534 pub database_id: u32,
1535 }
1536 #[derive(prost_helpers::AnyPB)]
1537 #[derive(Clone, PartialEq, ::prost::Oneof)]
1538 pub enum RecoveryEvent {
1539 #[prost(message, tag = "1")]
1540 GlobalStart(GlobalRecoveryStart),
1541 #[prost(message, tag = "2")]
1542 GlobalSuccess(GlobalRecoverySuccess),
1543 #[prost(message, tag = "3")]
1544 GlobalFailure(GlobalRecoveryFailure),
1545 #[prost(message, tag = "4")]
1546 DatabaseStart(DatabaseRecoveryStart),
1547 #[prost(message, tag = "5")]
1548 DatabaseFailure(DatabaseRecoveryFailure),
1549 #[prost(message, tag = "6")]
1550 DatabaseSuccess(DatabaseRecoverySuccess),
1551 }
1552 }
1553 #[derive(prost_helpers::AnyPB)]
1554 #[derive(Clone, PartialEq, ::prost::Oneof)]
1555 pub enum Event {
1556 #[prost(message, tag = "3")]
1557 CreateStreamJobFail(EventCreateStreamJobFail),
1558 #[prost(message, tag = "4")]
1559 DirtyStreamJobClear(EventDirtyStreamJobClear),
1560 #[prost(message, tag = "5")]
1561 MetaNodeStart(EventMetaNodeStart),
1562 #[prost(message, tag = "6")]
1563 BarrierComplete(EventBarrierComplete),
1564 #[prost(message, tag = "7")]
1565 InjectBarrierFail(EventInjectBarrierFail),
1566 #[prost(message, tag = "8")]
1567 CollectBarrierFail(EventCollectBarrierFail),
1568 #[prost(message, tag = "9")]
1569 WorkerNodePanic(EventWorkerNodePanic),
1570 #[prost(message, tag = "10")]
1571 AutoSchemaChangeFail(EventAutoSchemaChangeFail),
1572 #[prost(message, tag = "11")]
1573 SinkFail(EventSinkFail),
1574 #[prost(message, tag = "12")]
1575 Recovery(EventRecovery),
1576 }
1577}
1578#[derive(prost_helpers::AnyPB)]
1579#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1580pub struct ListEventLogRequest {}
1581#[derive(prost_helpers::AnyPB)]
1582#[derive(Clone, PartialEq, ::prost::Message)]
1583pub struct ListEventLogResponse {
1584 #[prost(message, repeated, tag = "1")]
1585 pub event_logs: ::prost::alloc::vec::Vec<EventLog>,
1586}
1587#[derive(prost_helpers::AnyPB)]
1588#[derive(Clone, PartialEq, ::prost::Message)]
1589pub struct AddEventLogRequest {
1590 #[prost(oneof = "add_event_log_request::Event", tags = "1, 2, 3")]
1592 pub event: ::core::option::Option<add_event_log_request::Event>,
1593}
1594pub mod add_event_log_request {
1596 #[derive(prost_helpers::AnyPB)]
1598 #[derive(Clone, PartialEq, ::prost::Oneof)]
1599 pub enum Event {
1600 #[prost(message, tag = "1")]
1601 WorkerNodePanic(super::event_log::EventWorkerNodePanic),
1602 #[prost(message, tag = "2")]
1603 SinkFail(super::event_log::EventSinkFail),
1604 #[prost(message, tag = "3")]
1605 AutoSchemaChangeFail(super::event_log::EventAutoSchemaChangeFail),
1606 }
1607}
1608#[derive(prost_helpers::AnyPB)]
1609#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1610pub struct AddEventLogResponse {}
1611#[derive(prost_helpers::AnyPB)]
1612#[derive(Clone, PartialEq, ::prost::Message)]
1613pub struct ActorIds {
1614 #[prost(uint32, repeated, tag = "1")]
1615 pub ids: ::prost::alloc::vec::Vec<u32>,
1616}
1617#[derive(prost_helpers::AnyPB)]
1618#[derive(Clone, PartialEq, ::prost::Message)]
1619pub struct FragmentIdToActorIdMap {
1620 #[prost(map = "uint32, message", tag = "1")]
1621 pub map: ::std::collections::HashMap<u32, ActorIds>,
1622}
1623#[derive(prost_helpers::AnyPB)]
1628#[derive(Clone, PartialEq, ::prost::Message)]
1629pub struct RelationIdInfos {
1630 #[prost(map = "uint32, message", tag = "1")]
1632 pub map: ::std::collections::HashMap<u32, FragmentIdToActorIdMap>,
1633}
1634#[derive(prost_helpers::AnyPB)]
1635#[derive(Clone, PartialEq, ::prost::Message)]
1636pub struct FragmentToRelationMap {
1637 #[prost(map = "uint32, uint32", tag = "1")]
1639 pub fragment_to_relation_map: ::std::collections::HashMap<u32, u32>,
1640}
1641#[derive(prost_helpers::AnyPB)]
1642#[derive(Clone, PartialEq, ::prost::Message)]
1643pub struct ActorCountPerParallelism {
1644 #[prost(map = "uint32, message", tag = "1")]
1645 pub worker_id_to_actor_count: ::std::collections::HashMap<
1646 u32,
1647 actor_count_per_parallelism::WorkerActorCount,
1648 >,
1649 #[prost(uint64, tag = "2")]
1650 pub hard_limit: u64,
1651 #[prost(uint64, tag = "3")]
1652 pub soft_limit: u64,
1653}
1654pub mod actor_count_per_parallelism {
1656 #[derive(prost_helpers::AnyPB)]
1657 #[derive(Clone, Copy, PartialEq, ::prost::Message)]
1658 pub struct WorkerActorCount {
1659 #[prost(uint64, tag = "1")]
1660 pub actor_count: u64,
1661 #[prost(uint64, tag = "2")]
1662 pub parallelism: u64,
1663 }
1664}
1665#[derive(prost_helpers::AnyPB)]
1666#[derive(Clone, PartialEq, ::prost::Message)]
1667pub struct ClusterLimit {
1668 #[prost(oneof = "cluster_limit::Limit", tags = "1")]
1669 pub limit: ::core::option::Option<cluster_limit::Limit>,
1670}
1671pub mod cluster_limit {
1673 #[derive(prost_helpers::AnyPB)]
1674 #[derive(Clone, PartialEq, ::prost::Oneof)]
1675 pub enum Limit {
1676 #[prost(message, tag = "1")]
1678 ActorCount(super::ActorCountPerParallelism),
1679 }
1680}
1681#[derive(prost_helpers::AnyPB)]
1682#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1683pub struct GetClusterLimitsRequest {}
1684#[derive(prost_helpers::AnyPB)]
1685#[derive(Clone, PartialEq, ::prost::Message)]
1686pub struct GetClusterLimitsResponse {
1687 #[prost(message, repeated, tag = "1")]
1688 pub active_limits: ::prost::alloc::vec::Vec<ClusterLimit>,
1689}
1690#[derive(prost_helpers::AnyPB)]
1691#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1692pub struct ListRateLimitsRequest {}
1693#[derive(prost_helpers::AnyPB)]
1694#[derive(Clone, PartialEq, ::prost::Message)]
1695pub struct ListRateLimitsResponse {
1696 #[prost(message, repeated, tag = "1")]
1697 pub rate_limits: ::prost::alloc::vec::Vec<list_rate_limits_response::RateLimitInfo>,
1698}
1699pub mod list_rate_limits_response {
1701 #[derive(prost_helpers::AnyPB)]
1702 #[derive(Clone, PartialEq, ::prost::Message)]
1703 pub struct RateLimitInfo {
1704 #[prost(uint32, tag = "1")]
1705 pub fragment_id: u32,
1706 #[prost(uint32, tag = "2")]
1707 pub job_id: u32,
1708 #[prost(uint32, tag = "3")]
1709 pub fragment_type_mask: u32,
1710 #[prost(uint32, tag = "4")]
1711 pub rate_limit: u32,
1712 #[prost(string, tag = "5")]
1713 pub node_name: ::prost::alloc::string::String,
1714 }
1715}
1716#[derive(prost_helpers::AnyPB)]
1717#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1718pub struct ListIcebergTablesRequest {}
1719#[derive(prost_helpers::AnyPB)]
1720#[derive(Clone, PartialEq, ::prost::Message)]
1721pub struct ListIcebergTablesResponse {
1722 #[prost(message, repeated, tag = "1")]
1723 pub iceberg_tables: ::prost::alloc::vec::Vec<
1724 list_iceberg_tables_response::IcebergTable,
1725 >,
1726}
1727pub mod list_iceberg_tables_response {
1729 #[derive(prost_helpers::AnyPB)]
1730 #[derive(Clone, PartialEq, ::prost::Message)]
1731 pub struct IcebergTable {
1732 #[prost(string, tag = "1")]
1733 pub catalog_name: ::prost::alloc::string::String,
1734 #[prost(string, tag = "2")]
1735 pub table_namespace: ::prost::alloc::string::String,
1736 #[prost(string, tag = "3")]
1737 pub table_name: ::prost::alloc::string::String,
1738 #[prost(string, optional, tag = "4")]
1739 pub metadata_location: ::core::option::Option<::prost::alloc::string::String>,
1740 #[prost(string, optional, tag = "5")]
1741 pub previous_metadata_location: ::core::option::Option<
1742 ::prost::alloc::string::String,
1743 >,
1744 #[prost(string, optional, tag = "6")]
1745 pub iceberg_type: ::core::option::Option<::prost::alloc::string::String>,
1746 }
1747}
1748#[derive(prost_helpers::AnyPB)]
1749#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1750pub struct SetSyncLogStoreAlignedRequest {
1751 #[prost(uint32, tag = "1")]
1752 pub job_id: u32,
1753 #[prost(bool, tag = "2")]
1754 pub aligned: bool,
1755}
1756#[derive(prost_helpers::AnyPB)]
1757#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1758pub struct SetSyncLogStoreAlignedResponse {}
1759#[derive(prost_helpers::AnyPB)]
1760#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1761#[repr(i32)]
1762pub enum ThrottleTarget {
1763 Unspecified = 0,
1764 Source = 1,
1765 Mv = 2,
1766 TableWithSource = 3,
1767 CdcTable = 4,
1768 TableDml = 5,
1769 Sink = 6,
1770 Fragment = 7,
1771}
1772impl ThrottleTarget {
1773 pub fn as_str_name(&self) -> &'static str {
1778 match self {
1779 Self::Unspecified => "THROTTLE_TARGET_UNSPECIFIED",
1780 Self::Source => "SOURCE",
1781 Self::Mv => "MV",
1782 Self::TableWithSource => "TABLE_WITH_SOURCE",
1783 Self::CdcTable => "CDC_TABLE",
1784 Self::TableDml => "TABLE_DML",
1785 Self::Sink => "SINK",
1786 Self::Fragment => "FRAGMENT",
1787 }
1788 }
1789 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1791 match value {
1792 "THROTTLE_TARGET_UNSPECIFIED" => Some(Self::Unspecified),
1793 "SOURCE" => Some(Self::Source),
1794 "MV" => Some(Self::Mv),
1795 "TABLE_WITH_SOURCE" => Some(Self::TableWithSource),
1796 "CDC_TABLE" => Some(Self::CdcTable),
1797 "TABLE_DML" => Some(Self::TableDml),
1798 "SINK" => Some(Self::Sink),
1799 "FRAGMENT" => Some(Self::Fragment),
1800 _ => None,
1801 }
1802 }
1803}
1804#[derive(prost_helpers::AnyPB)]
1805#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1806#[repr(i32)]
1807pub enum RecoveryStatus {
1808 StatusUnspecified = 0,
1809 StatusStarting = 1,
1810 StatusRecovering = 2,
1811 StatusRunning = 3,
1812}
1813impl RecoveryStatus {
1814 pub fn as_str_name(&self) -> &'static str {
1819 match self {
1820 Self::StatusUnspecified => "STATUS_UNSPECIFIED",
1821 Self::StatusStarting => "STATUS_STARTING",
1822 Self::StatusRecovering => "STATUS_RECOVERING",
1823 Self::StatusRunning => "STATUS_RUNNING",
1824 }
1825 }
1826 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1828 match value {
1829 "STATUS_UNSPECIFIED" => Some(Self::StatusUnspecified),
1830 "STATUS_STARTING" => Some(Self::StatusStarting),
1831 "STATUS_RECOVERING" => Some(Self::StatusRecovering),
1832 "STATUS_RUNNING" => Some(Self::StatusRunning),
1833 _ => None,
1834 }
1835 }
1836}
1837#[derive(prost_helpers::AnyPB)]
1838#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1839#[repr(i32)]
1840pub enum SubscribeType {
1841 Unspecified = 0,
1842 Frontend = 1,
1843 Hummock = 2,
1844 Compactor = 3,
1845 Compute = 4,
1846}
1847impl SubscribeType {
1848 pub fn as_str_name(&self) -> &'static str {
1853 match self {
1854 Self::Unspecified => "UNSPECIFIED",
1855 Self::Frontend => "FRONTEND",
1856 Self::Hummock => "HUMMOCK",
1857 Self::Compactor => "COMPACTOR",
1858 Self::Compute => "COMPUTE",
1859 }
1860 }
1861 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1863 match value {
1864 "UNSPECIFIED" => Some(Self::Unspecified),
1865 "FRONTEND" => Some(Self::Frontend),
1866 "HUMMOCK" => Some(Self::Hummock),
1867 "COMPACTOR" => Some(Self::Compactor),
1868 "COMPUTE" => Some(Self::Compute),
1869 _ => None,
1870 }
1871 }
1872}
1873pub mod telemetry_info_service_client {
1875 #![allow(
1876 unused_variables,
1877 dead_code,
1878 missing_docs,
1879 clippy::wildcard_imports,
1880 clippy::let_unit_value,
1881 )]
1882 use tonic::codegen::*;
1883 use tonic::codegen::http::Uri;
1884 #[derive(Debug, Clone)]
1885 pub struct TelemetryInfoServiceClient<T> {
1886 inner: tonic::client::Grpc<T>,
1887 }
1888 impl TelemetryInfoServiceClient<tonic::transport::Channel> {
1889 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1891 where
1892 D: TryInto<tonic::transport::Endpoint>,
1893 D::Error: Into<StdError>,
1894 {
1895 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1896 Ok(Self::new(conn))
1897 }
1898 }
1899 impl<T> TelemetryInfoServiceClient<T>
1900 where
1901 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1902 T::Error: Into<StdError>,
1903 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1904 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1905 {
1906 pub fn new(inner: T) -> Self {
1907 let inner = tonic::client::Grpc::new(inner);
1908 Self { inner }
1909 }
1910 pub fn with_origin(inner: T, origin: Uri) -> Self {
1911 let inner = tonic::client::Grpc::with_origin(inner, origin);
1912 Self { inner }
1913 }
1914 pub fn with_interceptor<F>(
1915 inner: T,
1916 interceptor: F,
1917 ) -> TelemetryInfoServiceClient<InterceptedService<T, F>>
1918 where
1919 F: tonic::service::Interceptor,
1920 T::ResponseBody: Default,
1921 T: tonic::codegen::Service<
1922 http::Request<tonic::body::BoxBody>,
1923 Response = http::Response<
1924 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1925 >,
1926 >,
1927 <T as tonic::codegen::Service<
1928 http::Request<tonic::body::BoxBody>,
1929 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1930 {
1931 TelemetryInfoServiceClient::new(InterceptedService::new(inner, interceptor))
1932 }
1933 #[must_use]
1938 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1939 self.inner = self.inner.send_compressed(encoding);
1940 self
1941 }
1942 #[must_use]
1944 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1945 self.inner = self.inner.accept_compressed(encoding);
1946 self
1947 }
1948 #[must_use]
1952 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1953 self.inner = self.inner.max_decoding_message_size(limit);
1954 self
1955 }
1956 #[must_use]
1960 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1961 self.inner = self.inner.max_encoding_message_size(limit);
1962 self
1963 }
1964 pub async fn get_telemetry_info(
1966 &mut self,
1967 request: impl tonic::IntoRequest<super::GetTelemetryInfoRequest>,
1968 ) -> std::result::Result<
1969 tonic::Response<super::TelemetryInfoResponse>,
1970 tonic::Status,
1971 > {
1972 self.inner
1973 .ready()
1974 .await
1975 .map_err(|e| {
1976 tonic::Status::unknown(
1977 format!("Service was not ready: {}", e.into()),
1978 )
1979 })?;
1980 let codec = tonic::codec::ProstCodec::default();
1981 let path = http::uri::PathAndQuery::from_static(
1982 "/meta.TelemetryInfoService/GetTelemetryInfo",
1983 );
1984 let mut req = request.into_request();
1985 req.extensions_mut()
1986 .insert(
1987 GrpcMethod::new("meta.TelemetryInfoService", "GetTelemetryInfo"),
1988 );
1989 self.inner.unary(req, path, codec).await
1990 }
1991 }
1992}
1993pub mod heartbeat_service_client {
1995 #![allow(
1996 unused_variables,
1997 dead_code,
1998 missing_docs,
1999 clippy::wildcard_imports,
2000 clippy::let_unit_value,
2001 )]
2002 use tonic::codegen::*;
2003 use tonic::codegen::http::Uri;
2004 #[derive(Debug, Clone)]
2005 pub struct HeartbeatServiceClient<T> {
2006 inner: tonic::client::Grpc<T>,
2007 }
2008 impl HeartbeatServiceClient<tonic::transport::Channel> {
2009 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2011 where
2012 D: TryInto<tonic::transport::Endpoint>,
2013 D::Error: Into<StdError>,
2014 {
2015 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2016 Ok(Self::new(conn))
2017 }
2018 }
2019 impl<T> HeartbeatServiceClient<T>
2020 where
2021 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2022 T::Error: Into<StdError>,
2023 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2024 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2025 {
2026 pub fn new(inner: T) -> Self {
2027 let inner = tonic::client::Grpc::new(inner);
2028 Self { inner }
2029 }
2030 pub fn with_origin(inner: T, origin: Uri) -> Self {
2031 let inner = tonic::client::Grpc::with_origin(inner, origin);
2032 Self { inner }
2033 }
2034 pub fn with_interceptor<F>(
2035 inner: T,
2036 interceptor: F,
2037 ) -> HeartbeatServiceClient<InterceptedService<T, F>>
2038 where
2039 F: tonic::service::Interceptor,
2040 T::ResponseBody: Default,
2041 T: tonic::codegen::Service<
2042 http::Request<tonic::body::BoxBody>,
2043 Response = http::Response<
2044 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2045 >,
2046 >,
2047 <T as tonic::codegen::Service<
2048 http::Request<tonic::body::BoxBody>,
2049 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2050 {
2051 HeartbeatServiceClient::new(InterceptedService::new(inner, interceptor))
2052 }
2053 #[must_use]
2058 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2059 self.inner = self.inner.send_compressed(encoding);
2060 self
2061 }
2062 #[must_use]
2064 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2065 self.inner = self.inner.accept_compressed(encoding);
2066 self
2067 }
2068 #[must_use]
2072 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2073 self.inner = self.inner.max_decoding_message_size(limit);
2074 self
2075 }
2076 #[must_use]
2080 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2081 self.inner = self.inner.max_encoding_message_size(limit);
2082 self
2083 }
2084 pub async fn heartbeat(
2085 &mut self,
2086 request: impl tonic::IntoRequest<super::HeartbeatRequest>,
2087 ) -> std::result::Result<
2088 tonic::Response<super::HeartbeatResponse>,
2089 tonic::Status,
2090 > {
2091 self.inner
2092 .ready()
2093 .await
2094 .map_err(|e| {
2095 tonic::Status::unknown(
2096 format!("Service was not ready: {}", e.into()),
2097 )
2098 })?;
2099 let codec = tonic::codec::ProstCodec::default();
2100 let path = http::uri::PathAndQuery::from_static(
2101 "/meta.HeartbeatService/Heartbeat",
2102 );
2103 let mut req = request.into_request();
2104 req.extensions_mut()
2105 .insert(GrpcMethod::new("meta.HeartbeatService", "Heartbeat"));
2106 self.inner.unary(req, path, codec).await
2107 }
2108 }
2109}
2110pub mod stream_manager_service_client {
2112 #![allow(
2113 unused_variables,
2114 dead_code,
2115 missing_docs,
2116 clippy::wildcard_imports,
2117 clippy::let_unit_value,
2118 )]
2119 use tonic::codegen::*;
2120 use tonic::codegen::http::Uri;
2121 #[derive(Debug, Clone)]
2122 pub struct StreamManagerServiceClient<T> {
2123 inner: tonic::client::Grpc<T>,
2124 }
2125 impl StreamManagerServiceClient<tonic::transport::Channel> {
2126 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2128 where
2129 D: TryInto<tonic::transport::Endpoint>,
2130 D::Error: Into<StdError>,
2131 {
2132 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2133 Ok(Self::new(conn))
2134 }
2135 }
2136 impl<T> StreamManagerServiceClient<T>
2137 where
2138 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2139 T::Error: Into<StdError>,
2140 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2141 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2142 {
2143 pub fn new(inner: T) -> Self {
2144 let inner = tonic::client::Grpc::new(inner);
2145 Self { inner }
2146 }
2147 pub fn with_origin(inner: T, origin: Uri) -> Self {
2148 let inner = tonic::client::Grpc::with_origin(inner, origin);
2149 Self { inner }
2150 }
2151 pub fn with_interceptor<F>(
2152 inner: T,
2153 interceptor: F,
2154 ) -> StreamManagerServiceClient<InterceptedService<T, F>>
2155 where
2156 F: tonic::service::Interceptor,
2157 T::ResponseBody: Default,
2158 T: tonic::codegen::Service<
2159 http::Request<tonic::body::BoxBody>,
2160 Response = http::Response<
2161 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2162 >,
2163 >,
2164 <T as tonic::codegen::Service<
2165 http::Request<tonic::body::BoxBody>,
2166 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2167 {
2168 StreamManagerServiceClient::new(InterceptedService::new(inner, interceptor))
2169 }
2170 #[must_use]
2175 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2176 self.inner = self.inner.send_compressed(encoding);
2177 self
2178 }
2179 #[must_use]
2181 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2182 self.inner = self.inner.accept_compressed(encoding);
2183 self
2184 }
2185 #[must_use]
2189 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2190 self.inner = self.inner.max_decoding_message_size(limit);
2191 self
2192 }
2193 #[must_use]
2197 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2198 self.inner = self.inner.max_encoding_message_size(limit);
2199 self
2200 }
2201 pub async fn flush(
2202 &mut self,
2203 request: impl tonic::IntoRequest<super::FlushRequest>,
2204 ) -> std::result::Result<tonic::Response<super::FlushResponse>, tonic::Status> {
2205 self.inner
2206 .ready()
2207 .await
2208 .map_err(|e| {
2209 tonic::Status::unknown(
2210 format!("Service was not ready: {}", e.into()),
2211 )
2212 })?;
2213 let codec = tonic::codec::ProstCodec::default();
2214 let path = http::uri::PathAndQuery::from_static(
2215 "/meta.StreamManagerService/Flush",
2216 );
2217 let mut req = request.into_request();
2218 req.extensions_mut()
2219 .insert(GrpcMethod::new("meta.StreamManagerService", "Flush"));
2220 self.inner.unary(req, path, codec).await
2221 }
2222 pub async fn pause(
2223 &mut self,
2224 request: impl tonic::IntoRequest<super::PauseRequest>,
2225 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status> {
2226 self.inner
2227 .ready()
2228 .await
2229 .map_err(|e| {
2230 tonic::Status::unknown(
2231 format!("Service was not ready: {}", e.into()),
2232 )
2233 })?;
2234 let codec = tonic::codec::ProstCodec::default();
2235 let path = http::uri::PathAndQuery::from_static(
2236 "/meta.StreamManagerService/Pause",
2237 );
2238 let mut req = request.into_request();
2239 req.extensions_mut()
2240 .insert(GrpcMethod::new("meta.StreamManagerService", "Pause"));
2241 self.inner.unary(req, path, codec).await
2242 }
2243 pub async fn resume(
2244 &mut self,
2245 request: impl tonic::IntoRequest<super::ResumeRequest>,
2246 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status> {
2247 self.inner
2248 .ready()
2249 .await
2250 .map_err(|e| {
2251 tonic::Status::unknown(
2252 format!("Service was not ready: {}", e.into()),
2253 )
2254 })?;
2255 let codec = tonic::codec::ProstCodec::default();
2256 let path = http::uri::PathAndQuery::from_static(
2257 "/meta.StreamManagerService/Resume",
2258 );
2259 let mut req = request.into_request();
2260 req.extensions_mut()
2261 .insert(GrpcMethod::new("meta.StreamManagerService", "Resume"));
2262 self.inner.unary(req, path, codec).await
2263 }
2264 pub async fn refresh(
2265 &mut self,
2266 request: impl tonic::IntoRequest<super::RefreshRequest>,
2267 ) -> std::result::Result<
2268 tonic::Response<super::RefreshResponse>,
2269 tonic::Status,
2270 > {
2271 self.inner
2272 .ready()
2273 .await
2274 .map_err(|e| {
2275 tonic::Status::unknown(
2276 format!("Service was not ready: {}", e.into()),
2277 )
2278 })?;
2279 let codec = tonic::codec::ProstCodec::default();
2280 let path = http::uri::PathAndQuery::from_static(
2281 "/meta.StreamManagerService/Refresh",
2282 );
2283 let mut req = request.into_request();
2284 req.extensions_mut()
2285 .insert(GrpcMethod::new("meta.StreamManagerService", "Refresh"));
2286 self.inner.unary(req, path, codec).await
2287 }
2288 pub async fn cancel_creating_jobs(
2289 &mut self,
2290 request: impl tonic::IntoRequest<super::CancelCreatingJobsRequest>,
2291 ) -> std::result::Result<
2292 tonic::Response<super::CancelCreatingJobsResponse>,
2293 tonic::Status,
2294 > {
2295 self.inner
2296 .ready()
2297 .await
2298 .map_err(|e| {
2299 tonic::Status::unknown(
2300 format!("Service was not ready: {}", e.into()),
2301 )
2302 })?;
2303 let codec = tonic::codec::ProstCodec::default();
2304 let path = http::uri::PathAndQuery::from_static(
2305 "/meta.StreamManagerService/CancelCreatingJobs",
2306 );
2307 let mut req = request.into_request();
2308 req.extensions_mut()
2309 .insert(
2310 GrpcMethod::new("meta.StreamManagerService", "CancelCreatingJobs"),
2311 );
2312 self.inner.unary(req, path, codec).await
2313 }
2314 pub async fn list_table_fragments(
2315 &mut self,
2316 request: impl tonic::IntoRequest<super::ListTableFragmentsRequest>,
2317 ) -> std::result::Result<
2318 tonic::Response<super::ListTableFragmentsResponse>,
2319 tonic::Status,
2320 > {
2321 self.inner
2322 .ready()
2323 .await
2324 .map_err(|e| {
2325 tonic::Status::unknown(
2326 format!("Service was not ready: {}", e.into()),
2327 )
2328 })?;
2329 let codec = tonic::codec::ProstCodec::default();
2330 let path = http::uri::PathAndQuery::from_static(
2331 "/meta.StreamManagerService/ListTableFragments",
2332 );
2333 let mut req = request.into_request();
2334 req.extensions_mut()
2335 .insert(
2336 GrpcMethod::new("meta.StreamManagerService", "ListTableFragments"),
2337 );
2338 self.inner.unary(req, path, codec).await
2339 }
2340 pub async fn list_streaming_job_states(
2341 &mut self,
2342 request: impl tonic::IntoRequest<super::ListStreamingJobStatesRequest>,
2343 ) -> std::result::Result<
2344 tonic::Response<super::ListStreamingJobStatesResponse>,
2345 tonic::Status,
2346 > {
2347 self.inner
2348 .ready()
2349 .await
2350 .map_err(|e| {
2351 tonic::Status::unknown(
2352 format!("Service was not ready: {}", e.into()),
2353 )
2354 })?;
2355 let codec = tonic::codec::ProstCodec::default();
2356 let path = http::uri::PathAndQuery::from_static(
2357 "/meta.StreamManagerService/ListStreamingJobStates",
2358 );
2359 let mut req = request.into_request();
2360 req.extensions_mut()
2361 .insert(
2362 GrpcMethod::new(
2363 "meta.StreamManagerService",
2364 "ListStreamingJobStates",
2365 ),
2366 );
2367 self.inner.unary(req, path, codec).await
2368 }
2369 pub async fn list_fragment_distribution(
2370 &mut self,
2371 request: impl tonic::IntoRequest<super::ListFragmentDistributionRequest>,
2372 ) -> std::result::Result<
2373 tonic::Response<super::ListFragmentDistributionResponse>,
2374 tonic::Status,
2375 > {
2376 self.inner
2377 .ready()
2378 .await
2379 .map_err(|e| {
2380 tonic::Status::unknown(
2381 format!("Service was not ready: {}", e.into()),
2382 )
2383 })?;
2384 let codec = tonic::codec::ProstCodec::default();
2385 let path = http::uri::PathAndQuery::from_static(
2386 "/meta.StreamManagerService/ListFragmentDistribution",
2387 );
2388 let mut req = request.into_request();
2389 req.extensions_mut()
2390 .insert(
2391 GrpcMethod::new(
2392 "meta.StreamManagerService",
2393 "ListFragmentDistribution",
2394 ),
2395 );
2396 self.inner.unary(req, path, codec).await
2397 }
2398 pub async fn list_creating_fragment_distribution(
2399 &mut self,
2400 request: impl tonic::IntoRequest<
2401 super::ListCreatingFragmentDistributionRequest,
2402 >,
2403 ) -> std::result::Result<
2404 tonic::Response<super::ListCreatingFragmentDistributionResponse>,
2405 tonic::Status,
2406 > {
2407 self.inner
2408 .ready()
2409 .await
2410 .map_err(|e| {
2411 tonic::Status::unknown(
2412 format!("Service was not ready: {}", e.into()),
2413 )
2414 })?;
2415 let codec = tonic::codec::ProstCodec::default();
2416 let path = http::uri::PathAndQuery::from_static(
2417 "/meta.StreamManagerService/ListCreatingFragmentDistribution",
2418 );
2419 let mut req = request.into_request();
2420 req.extensions_mut()
2421 .insert(
2422 GrpcMethod::new(
2423 "meta.StreamManagerService",
2424 "ListCreatingFragmentDistribution",
2425 ),
2426 );
2427 self.inner.unary(req, path, codec).await
2428 }
2429 pub async fn list_actor_states(
2430 &mut self,
2431 request: impl tonic::IntoRequest<super::ListActorStatesRequest>,
2432 ) -> std::result::Result<
2433 tonic::Response<super::ListActorStatesResponse>,
2434 tonic::Status,
2435 > {
2436 self.inner
2437 .ready()
2438 .await
2439 .map_err(|e| {
2440 tonic::Status::unknown(
2441 format!("Service was not ready: {}", e.into()),
2442 )
2443 })?;
2444 let codec = tonic::codec::ProstCodec::default();
2445 let path = http::uri::PathAndQuery::from_static(
2446 "/meta.StreamManagerService/ListActorStates",
2447 );
2448 let mut req = request.into_request();
2449 req.extensions_mut()
2450 .insert(GrpcMethod::new("meta.StreamManagerService", "ListActorStates"));
2451 self.inner.unary(req, path, codec).await
2452 }
2453 pub async fn list_actor_splits(
2454 &mut self,
2455 request: impl tonic::IntoRequest<super::ListActorSplitsRequest>,
2456 ) -> std::result::Result<
2457 tonic::Response<super::ListActorSplitsResponse>,
2458 tonic::Status,
2459 > {
2460 self.inner
2461 .ready()
2462 .await
2463 .map_err(|e| {
2464 tonic::Status::unknown(
2465 format!("Service was not ready: {}", e.into()),
2466 )
2467 })?;
2468 let codec = tonic::codec::ProstCodec::default();
2469 let path = http::uri::PathAndQuery::from_static(
2470 "/meta.StreamManagerService/ListActorSplits",
2471 );
2472 let mut req = request.into_request();
2473 req.extensions_mut()
2474 .insert(GrpcMethod::new("meta.StreamManagerService", "ListActorSplits"));
2475 self.inner.unary(req, path, codec).await
2476 }
2477 pub async fn list_object_dependencies(
2478 &mut self,
2479 request: impl tonic::IntoRequest<super::ListObjectDependenciesRequest>,
2480 ) -> std::result::Result<
2481 tonic::Response<super::ListObjectDependenciesResponse>,
2482 tonic::Status,
2483 > {
2484 self.inner
2485 .ready()
2486 .await
2487 .map_err(|e| {
2488 tonic::Status::unknown(
2489 format!("Service was not ready: {}", e.into()),
2490 )
2491 })?;
2492 let codec = tonic::codec::ProstCodec::default();
2493 let path = http::uri::PathAndQuery::from_static(
2494 "/meta.StreamManagerService/ListObjectDependencies",
2495 );
2496 let mut req = request.into_request();
2497 req.extensions_mut()
2498 .insert(
2499 GrpcMethod::new(
2500 "meta.StreamManagerService",
2501 "ListObjectDependencies",
2502 ),
2503 );
2504 self.inner.unary(req, path, codec).await
2505 }
2506 pub async fn apply_throttle(
2507 &mut self,
2508 request: impl tonic::IntoRequest<super::ApplyThrottleRequest>,
2509 ) -> std::result::Result<
2510 tonic::Response<super::ApplyThrottleResponse>,
2511 tonic::Status,
2512 > {
2513 self.inner
2514 .ready()
2515 .await
2516 .map_err(|e| {
2517 tonic::Status::unknown(
2518 format!("Service was not ready: {}", e.into()),
2519 )
2520 })?;
2521 let codec = tonic::codec::ProstCodec::default();
2522 let path = http::uri::PathAndQuery::from_static(
2523 "/meta.StreamManagerService/ApplyThrottle",
2524 );
2525 let mut req = request.into_request();
2526 req.extensions_mut()
2527 .insert(GrpcMethod::new("meta.StreamManagerService", "ApplyThrottle"));
2528 self.inner.unary(req, path, codec).await
2529 }
2530 pub async fn recover(
2531 &mut self,
2532 request: impl tonic::IntoRequest<super::RecoverRequest>,
2533 ) -> std::result::Result<
2534 tonic::Response<super::RecoverResponse>,
2535 tonic::Status,
2536 > {
2537 self.inner
2538 .ready()
2539 .await
2540 .map_err(|e| {
2541 tonic::Status::unknown(
2542 format!("Service was not ready: {}", e.into()),
2543 )
2544 })?;
2545 let codec = tonic::codec::ProstCodec::default();
2546 let path = http::uri::PathAndQuery::from_static(
2547 "/meta.StreamManagerService/Recover",
2548 );
2549 let mut req = request.into_request();
2550 req.extensions_mut()
2551 .insert(GrpcMethod::new("meta.StreamManagerService", "Recover"));
2552 self.inner.unary(req, path, codec).await
2553 }
2554 pub async fn list_rate_limits(
2555 &mut self,
2556 request: impl tonic::IntoRequest<super::ListRateLimitsRequest>,
2557 ) -> std::result::Result<
2558 tonic::Response<super::ListRateLimitsResponse>,
2559 tonic::Status,
2560 > {
2561 self.inner
2562 .ready()
2563 .await
2564 .map_err(|e| {
2565 tonic::Status::unknown(
2566 format!("Service was not ready: {}", e.into()),
2567 )
2568 })?;
2569 let codec = tonic::codec::ProstCodec::default();
2570 let path = http::uri::PathAndQuery::from_static(
2571 "/meta.StreamManagerService/ListRateLimits",
2572 );
2573 let mut req = request.into_request();
2574 req.extensions_mut()
2575 .insert(GrpcMethod::new("meta.StreamManagerService", "ListRateLimits"));
2576 self.inner.unary(req, path, codec).await
2577 }
2578 pub async fn alter_connector_props(
2579 &mut self,
2580 request: impl tonic::IntoRequest<super::AlterConnectorPropsRequest>,
2581 ) -> std::result::Result<
2582 tonic::Response<super::AlterConnectorPropsResponse>,
2583 tonic::Status,
2584 > {
2585 self.inner
2586 .ready()
2587 .await
2588 .map_err(|e| {
2589 tonic::Status::unknown(
2590 format!("Service was not ready: {}", e.into()),
2591 )
2592 })?;
2593 let codec = tonic::codec::ProstCodec::default();
2594 let path = http::uri::PathAndQuery::from_static(
2595 "/meta.StreamManagerService/AlterConnectorProps",
2596 );
2597 let mut req = request.into_request();
2598 req.extensions_mut()
2599 .insert(
2600 GrpcMethod::new("meta.StreamManagerService", "AlterConnectorProps"),
2601 );
2602 self.inner.unary(req, path, codec).await
2603 }
2604 pub async fn get_fragment_by_id(
2605 &mut self,
2606 request: impl tonic::IntoRequest<super::GetFragmentByIdRequest>,
2607 ) -> std::result::Result<
2608 tonic::Response<super::GetFragmentByIdResponse>,
2609 tonic::Status,
2610 > {
2611 self.inner
2612 .ready()
2613 .await
2614 .map_err(|e| {
2615 tonic::Status::unknown(
2616 format!("Service was not ready: {}", e.into()),
2617 )
2618 })?;
2619 let codec = tonic::codec::ProstCodec::default();
2620 let path = http::uri::PathAndQuery::from_static(
2621 "/meta.StreamManagerService/GetFragmentById",
2622 );
2623 let mut req = request.into_request();
2624 req.extensions_mut()
2625 .insert(GrpcMethod::new("meta.StreamManagerService", "GetFragmentById"));
2626 self.inner.unary(req, path, codec).await
2627 }
2628 pub async fn set_sync_log_store_aligned(
2629 &mut self,
2630 request: impl tonic::IntoRequest<super::SetSyncLogStoreAlignedRequest>,
2631 ) -> std::result::Result<
2632 tonic::Response<super::SetSyncLogStoreAlignedResponse>,
2633 tonic::Status,
2634 > {
2635 self.inner
2636 .ready()
2637 .await
2638 .map_err(|e| {
2639 tonic::Status::unknown(
2640 format!("Service was not ready: {}", e.into()),
2641 )
2642 })?;
2643 let codec = tonic::codec::ProstCodec::default();
2644 let path = http::uri::PathAndQuery::from_static(
2645 "/meta.StreamManagerService/SetSyncLogStoreAligned",
2646 );
2647 let mut req = request.into_request();
2648 req.extensions_mut()
2649 .insert(
2650 GrpcMethod::new(
2651 "meta.StreamManagerService",
2652 "SetSyncLogStoreAligned",
2653 ),
2654 );
2655 self.inner.unary(req, path, codec).await
2656 }
2657 pub async fn list_cdc_progress(
2658 &mut self,
2659 request: impl tonic::IntoRequest<super::ListCdcProgressRequest>,
2660 ) -> std::result::Result<
2661 tonic::Response<super::ListCdcProgressResponse>,
2662 tonic::Status,
2663 > {
2664 self.inner
2665 .ready()
2666 .await
2667 .map_err(|e| {
2668 tonic::Status::unknown(
2669 format!("Service was not ready: {}", e.into()),
2670 )
2671 })?;
2672 let codec = tonic::codec::ProstCodec::default();
2673 let path = http::uri::PathAndQuery::from_static(
2674 "/meta.StreamManagerService/ListCdcProgress",
2675 );
2676 let mut req = request.into_request();
2677 req.extensions_mut()
2678 .insert(GrpcMethod::new("meta.StreamManagerService", "ListCdcProgress"));
2679 self.inner.unary(req, path, codec).await
2680 }
2681 }
2682}
2683pub mod cluster_service_client {
2685 #![allow(
2686 unused_variables,
2687 dead_code,
2688 missing_docs,
2689 clippy::wildcard_imports,
2690 clippy::let_unit_value,
2691 )]
2692 use tonic::codegen::*;
2693 use tonic::codegen::http::Uri;
2694 #[derive(Debug, Clone)]
2695 pub struct ClusterServiceClient<T> {
2696 inner: tonic::client::Grpc<T>,
2697 }
2698 impl ClusterServiceClient<tonic::transport::Channel> {
2699 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2701 where
2702 D: TryInto<tonic::transport::Endpoint>,
2703 D::Error: Into<StdError>,
2704 {
2705 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2706 Ok(Self::new(conn))
2707 }
2708 }
2709 impl<T> ClusterServiceClient<T>
2710 where
2711 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2712 T::Error: Into<StdError>,
2713 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2714 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2715 {
2716 pub fn new(inner: T) -> Self {
2717 let inner = tonic::client::Grpc::new(inner);
2718 Self { inner }
2719 }
2720 pub fn with_origin(inner: T, origin: Uri) -> Self {
2721 let inner = tonic::client::Grpc::with_origin(inner, origin);
2722 Self { inner }
2723 }
2724 pub fn with_interceptor<F>(
2725 inner: T,
2726 interceptor: F,
2727 ) -> ClusterServiceClient<InterceptedService<T, F>>
2728 where
2729 F: tonic::service::Interceptor,
2730 T::ResponseBody: Default,
2731 T: tonic::codegen::Service<
2732 http::Request<tonic::body::BoxBody>,
2733 Response = http::Response<
2734 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
2735 >,
2736 >,
2737 <T as tonic::codegen::Service<
2738 http::Request<tonic::body::BoxBody>,
2739 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2740 {
2741 ClusterServiceClient::new(InterceptedService::new(inner, interceptor))
2742 }
2743 #[must_use]
2748 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2749 self.inner = self.inner.send_compressed(encoding);
2750 self
2751 }
2752 #[must_use]
2754 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2755 self.inner = self.inner.accept_compressed(encoding);
2756 self
2757 }
2758 #[must_use]
2762 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2763 self.inner = self.inner.max_decoding_message_size(limit);
2764 self
2765 }
2766 #[must_use]
2770 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2771 self.inner = self.inner.max_encoding_message_size(limit);
2772 self
2773 }
2774 pub async fn add_worker_node(
2775 &mut self,
2776 request: impl tonic::IntoRequest<super::AddWorkerNodeRequest>,
2777 ) -> std::result::Result<
2778 tonic::Response<super::AddWorkerNodeResponse>,
2779 tonic::Status,
2780 > {
2781 self.inner
2782 .ready()
2783 .await
2784 .map_err(|e| {
2785 tonic::Status::unknown(
2786 format!("Service was not ready: {}", e.into()),
2787 )
2788 })?;
2789 let codec = tonic::codec::ProstCodec::default();
2790 let path = http::uri::PathAndQuery::from_static(
2791 "/meta.ClusterService/AddWorkerNode",
2792 );
2793 let mut req = request.into_request();
2794 req.extensions_mut()
2795 .insert(GrpcMethod::new("meta.ClusterService", "AddWorkerNode"));
2796 self.inner.unary(req, path, codec).await
2797 }
2798 pub async fn activate_worker_node(
2799 &mut self,
2800 request: impl tonic::IntoRequest<super::ActivateWorkerNodeRequest>,
2801 ) -> std::result::Result<
2802 tonic::Response<super::ActivateWorkerNodeResponse>,
2803 tonic::Status,
2804 > {
2805 self.inner
2806 .ready()
2807 .await
2808 .map_err(|e| {
2809 tonic::Status::unknown(
2810 format!("Service was not ready: {}", e.into()),
2811 )
2812 })?;
2813 let codec = tonic::codec::ProstCodec::default();
2814 let path = http::uri::PathAndQuery::from_static(
2815 "/meta.ClusterService/ActivateWorkerNode",
2816 );
2817 let mut req = request.into_request();
2818 req.extensions_mut()
2819 .insert(GrpcMethod::new("meta.ClusterService", "ActivateWorkerNode"));
2820 self.inner.unary(req, path, codec).await
2821 }
2822 pub async fn delete_worker_node(
2823 &mut self,
2824 request: impl tonic::IntoRequest<super::DeleteWorkerNodeRequest>,
2825 ) -> std::result::Result<
2826 tonic::Response<super::DeleteWorkerNodeResponse>,
2827 tonic::Status,
2828 > {
2829 self.inner
2830 .ready()
2831 .await
2832 .map_err(|e| {
2833 tonic::Status::unknown(
2834 format!("Service was not ready: {}", e.into()),
2835 )
2836 })?;
2837 let codec = tonic::codec::ProstCodec::default();
2838 let path = http::uri::PathAndQuery::from_static(
2839 "/meta.ClusterService/DeleteWorkerNode",
2840 );
2841 let mut req = request.into_request();
2842 req.extensions_mut()
2843 .insert(GrpcMethod::new("meta.ClusterService", "DeleteWorkerNode"));
2844 self.inner.unary(req, path, codec).await
2845 }
2846 pub async fn update_worker_node_schedulability(
2847 &mut self,
2848 request: impl tonic::IntoRequest<
2849 super::UpdateWorkerNodeSchedulabilityRequest,
2850 >,
2851 ) -> std::result::Result<
2852 tonic::Response<super::UpdateWorkerNodeSchedulabilityResponse>,
2853 tonic::Status,
2854 > {
2855 self.inner
2856 .ready()
2857 .await
2858 .map_err(|e| {
2859 tonic::Status::unknown(
2860 format!("Service was not ready: {}", e.into()),
2861 )
2862 })?;
2863 let codec = tonic::codec::ProstCodec::default();
2864 let path = http::uri::PathAndQuery::from_static(
2865 "/meta.ClusterService/UpdateWorkerNodeSchedulability",
2866 );
2867 let mut req = request.into_request();
2868 req.extensions_mut()
2869 .insert(
2870 GrpcMethod::new(
2871 "meta.ClusterService",
2872 "UpdateWorkerNodeSchedulability",
2873 ),
2874 );
2875 self.inner.unary(req, path, codec).await
2876 }
2877 pub async fn list_all_nodes(
2878 &mut self,
2879 request: impl tonic::IntoRequest<super::ListAllNodesRequest>,
2880 ) -> std::result::Result<
2881 tonic::Response<super::ListAllNodesResponse>,
2882 tonic::Status,
2883 > {
2884 self.inner
2885 .ready()
2886 .await
2887 .map_err(|e| {
2888 tonic::Status::unknown(
2889 format!("Service was not ready: {}", e.into()),
2890 )
2891 })?;
2892 let codec = tonic::codec::ProstCodec::default();
2893 let path = http::uri::PathAndQuery::from_static(
2894 "/meta.ClusterService/ListAllNodes",
2895 );
2896 let mut req = request.into_request();
2897 req.extensions_mut()
2898 .insert(GrpcMethod::new("meta.ClusterService", "ListAllNodes"));
2899 self.inner.unary(req, path, codec).await
2900 }
2901 pub async fn get_cluster_recovery_status(
2902 &mut self,
2903 request: impl tonic::IntoRequest<super::GetClusterRecoveryStatusRequest>,
2904 ) -> std::result::Result<
2905 tonic::Response<super::GetClusterRecoveryStatusResponse>,
2906 tonic::Status,
2907 > {
2908 self.inner
2909 .ready()
2910 .await
2911 .map_err(|e| {
2912 tonic::Status::unknown(
2913 format!("Service was not ready: {}", e.into()),
2914 )
2915 })?;
2916 let codec = tonic::codec::ProstCodec::default();
2917 let path = http::uri::PathAndQuery::from_static(
2918 "/meta.ClusterService/GetClusterRecoveryStatus",
2919 );
2920 let mut req = request.into_request();
2921 req.extensions_mut()
2922 .insert(
2923 GrpcMethod::new("meta.ClusterService", "GetClusterRecoveryStatus"),
2924 );
2925 self.inner.unary(req, path, codec).await
2926 }
2927 pub async fn get_meta_store_info(
2928 &mut self,
2929 request: impl tonic::IntoRequest<super::GetMetaStoreInfoRequest>,
2930 ) -> std::result::Result<
2931 tonic::Response<super::GetMetaStoreInfoResponse>,
2932 tonic::Status,
2933 > {
2934 self.inner
2935 .ready()
2936 .await
2937 .map_err(|e| {
2938 tonic::Status::unknown(
2939 format!("Service was not ready: {}", e.into()),
2940 )
2941 })?;
2942 let codec = tonic::codec::ProstCodec::default();
2943 let path = http::uri::PathAndQuery::from_static(
2944 "/meta.ClusterService/GetMetaStoreInfo",
2945 );
2946 let mut req = request.into_request();
2947 req.extensions_mut()
2948 .insert(GrpcMethod::new("meta.ClusterService", "GetMetaStoreInfo"));
2949 self.inner.unary(req, path, codec).await
2950 }
2951 }
2952}
2953pub mod notification_service_client {
2955 #![allow(
2956 unused_variables,
2957 dead_code,
2958 missing_docs,
2959 clippy::wildcard_imports,
2960 clippy::let_unit_value,
2961 )]
2962 use tonic::codegen::*;
2963 use tonic::codegen::http::Uri;
2964 #[derive(Debug, Clone)]
2965 pub struct NotificationServiceClient<T> {
2966 inner: tonic::client::Grpc<T>,
2967 }
2968 impl NotificationServiceClient<tonic::transport::Channel> {
2969 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2971 where
2972 D: TryInto<tonic::transport::Endpoint>,
2973 D::Error: Into<StdError>,
2974 {
2975 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2976 Ok(Self::new(conn))
2977 }
2978 }
2979 impl<T> NotificationServiceClient<T>
2980 where
2981 T: tonic::client::GrpcService<tonic::body::BoxBody>,
2982 T::Error: Into<StdError>,
2983 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2984 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2985 {
2986 pub fn new(inner: T) -> Self {
2987 let inner = tonic::client::Grpc::new(inner);
2988 Self { inner }
2989 }
2990 pub fn with_origin(inner: T, origin: Uri) -> Self {
2991 let inner = tonic::client::Grpc::with_origin(inner, origin);
2992 Self { inner }
2993 }
2994 pub fn with_interceptor<F>(
2995 inner: T,
2996 interceptor: F,
2997 ) -> NotificationServiceClient<InterceptedService<T, F>>
2998 where
2999 F: tonic::service::Interceptor,
3000 T::ResponseBody: Default,
3001 T: tonic::codegen::Service<
3002 http::Request<tonic::body::BoxBody>,
3003 Response = http::Response<
3004 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3005 >,
3006 >,
3007 <T as tonic::codegen::Service<
3008 http::Request<tonic::body::BoxBody>,
3009 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3010 {
3011 NotificationServiceClient::new(InterceptedService::new(inner, interceptor))
3012 }
3013 #[must_use]
3018 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3019 self.inner = self.inner.send_compressed(encoding);
3020 self
3021 }
3022 #[must_use]
3024 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3025 self.inner = self.inner.accept_compressed(encoding);
3026 self
3027 }
3028 #[must_use]
3032 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3033 self.inner = self.inner.max_decoding_message_size(limit);
3034 self
3035 }
3036 #[must_use]
3040 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3041 self.inner = self.inner.max_encoding_message_size(limit);
3042 self
3043 }
3044 pub async fn subscribe(
3045 &mut self,
3046 request: impl tonic::IntoRequest<super::SubscribeRequest>,
3047 ) -> std::result::Result<
3048 tonic::Response<tonic::codec::Streaming<super::SubscribeResponse>>,
3049 tonic::Status,
3050 > {
3051 self.inner
3052 .ready()
3053 .await
3054 .map_err(|e| {
3055 tonic::Status::unknown(
3056 format!("Service was not ready: {}", e.into()),
3057 )
3058 })?;
3059 let codec = tonic::codec::ProstCodec::default();
3060 let path = http::uri::PathAndQuery::from_static(
3061 "/meta.NotificationService/Subscribe",
3062 );
3063 let mut req = request.into_request();
3064 req.extensions_mut()
3065 .insert(GrpcMethod::new("meta.NotificationService", "Subscribe"));
3066 self.inner.server_streaming(req, path, codec).await
3067 }
3068 }
3069}
3070pub mod scale_service_client {
3072 #![allow(
3073 unused_variables,
3074 dead_code,
3075 missing_docs,
3076 clippy::wildcard_imports,
3077 clippy::let_unit_value,
3078 )]
3079 use tonic::codegen::*;
3080 use tonic::codegen::http::Uri;
3081 #[derive(Debug, Clone)]
3083 pub struct ScaleServiceClient<T> {
3084 inner: tonic::client::Grpc<T>,
3085 }
3086 impl ScaleServiceClient<tonic::transport::Channel> {
3087 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3089 where
3090 D: TryInto<tonic::transport::Endpoint>,
3091 D::Error: Into<StdError>,
3092 {
3093 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3094 Ok(Self::new(conn))
3095 }
3096 }
3097 impl<T> ScaleServiceClient<T>
3098 where
3099 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3100 T::Error: Into<StdError>,
3101 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3102 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3103 {
3104 pub fn new(inner: T) -> Self {
3105 let inner = tonic::client::Grpc::new(inner);
3106 Self { inner }
3107 }
3108 pub fn with_origin(inner: T, origin: Uri) -> Self {
3109 let inner = tonic::client::Grpc::with_origin(inner, origin);
3110 Self { inner }
3111 }
3112 pub fn with_interceptor<F>(
3113 inner: T,
3114 interceptor: F,
3115 ) -> ScaleServiceClient<InterceptedService<T, F>>
3116 where
3117 F: tonic::service::Interceptor,
3118 T::ResponseBody: Default,
3119 T: tonic::codegen::Service<
3120 http::Request<tonic::body::BoxBody>,
3121 Response = http::Response<
3122 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3123 >,
3124 >,
3125 <T as tonic::codegen::Service<
3126 http::Request<tonic::body::BoxBody>,
3127 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3128 {
3129 ScaleServiceClient::new(InterceptedService::new(inner, interceptor))
3130 }
3131 #[must_use]
3136 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3137 self.inner = self.inner.send_compressed(encoding);
3138 self
3139 }
3140 #[must_use]
3142 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3143 self.inner = self.inner.accept_compressed(encoding);
3144 self
3145 }
3146 #[must_use]
3150 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3151 self.inner = self.inner.max_decoding_message_size(limit);
3152 self
3153 }
3154 #[must_use]
3158 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3159 self.inner = self.inner.max_encoding_message_size(limit);
3160 self
3161 }
3162 pub async fn get_cluster_info(
3163 &mut self,
3164 request: impl tonic::IntoRequest<super::GetClusterInfoRequest>,
3165 ) -> std::result::Result<
3166 tonic::Response<super::GetClusterInfoResponse>,
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.ScaleService/GetClusterInfo",
3180 );
3181 let mut req = request.into_request();
3182 req.extensions_mut()
3183 .insert(GrpcMethod::new("meta.ScaleService", "GetClusterInfo"));
3184 self.inner.unary(req, path, codec).await
3185 }
3186 pub async fn reschedule(
3187 &mut self,
3188 request: impl tonic::IntoRequest<super::RescheduleRequest>,
3189 ) -> std::result::Result<
3190 tonic::Response<super::RescheduleResponse>,
3191 tonic::Status,
3192 > {
3193 self.inner
3194 .ready()
3195 .await
3196 .map_err(|e| {
3197 tonic::Status::unknown(
3198 format!("Service was not ready: {}", e.into()),
3199 )
3200 })?;
3201 let codec = tonic::codec::ProstCodec::default();
3202 let path = http::uri::PathAndQuery::from_static(
3203 "/meta.ScaleService/Reschedule",
3204 );
3205 let mut req = request.into_request();
3206 req.extensions_mut()
3207 .insert(GrpcMethod::new("meta.ScaleService", "Reschedule"));
3208 self.inner.unary(req, path, codec).await
3209 }
3210 pub async fn update_streaming_job_node_labels(
3211 &mut self,
3212 request: impl tonic::IntoRequest<super::UpdateStreamingJobNodeLabelsRequest>,
3213 ) -> std::result::Result<
3214 tonic::Response<super::UpdateStreamingJobNodeLabelsResponse>,
3215 tonic::Status,
3216 > {
3217 self.inner
3218 .ready()
3219 .await
3220 .map_err(|e| {
3221 tonic::Status::unknown(
3222 format!("Service was not ready: {}", e.into()),
3223 )
3224 })?;
3225 let codec = tonic::codec::ProstCodec::default();
3226 let path = http::uri::PathAndQuery::from_static(
3227 "/meta.ScaleService/UpdateStreamingJobNodeLabels",
3228 );
3229 let mut req = request.into_request();
3230 req.extensions_mut()
3231 .insert(
3232 GrpcMethod::new("meta.ScaleService", "UpdateStreamingJobNodeLabels"),
3233 );
3234 self.inner.unary(req, path, codec).await
3235 }
3236 pub async fn get_serverless_streaming_jobs_status(
3237 &mut self,
3238 request: impl tonic::IntoRequest<
3239 super::GetServerlessStreamingJobsStatusRequest,
3240 >,
3241 ) -> std::result::Result<
3242 tonic::Response<super::GetServerlessStreamingJobsStatusResponse>,
3243 tonic::Status,
3244 > {
3245 self.inner
3246 .ready()
3247 .await
3248 .map_err(|e| {
3249 tonic::Status::unknown(
3250 format!("Service was not ready: {}", e.into()),
3251 )
3252 })?;
3253 let codec = tonic::codec::ProstCodec::default();
3254 let path = http::uri::PathAndQuery::from_static(
3255 "/meta.ScaleService/GetServerlessStreamingJobsStatus",
3256 );
3257 let mut req = request.into_request();
3258 req.extensions_mut()
3259 .insert(
3260 GrpcMethod::new(
3261 "meta.ScaleService",
3262 "GetServerlessStreamingJobsStatus",
3263 ),
3264 );
3265 self.inner.unary(req, path, codec).await
3266 }
3267 }
3268}
3269pub mod meta_member_service_client {
3271 #![allow(
3272 unused_variables,
3273 dead_code,
3274 missing_docs,
3275 clippy::wildcard_imports,
3276 clippy::let_unit_value,
3277 )]
3278 use tonic::codegen::*;
3279 use tonic::codegen::http::Uri;
3280 #[derive(Debug, Clone)]
3281 pub struct MetaMemberServiceClient<T> {
3282 inner: tonic::client::Grpc<T>,
3283 }
3284 impl MetaMemberServiceClient<tonic::transport::Channel> {
3285 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3287 where
3288 D: TryInto<tonic::transport::Endpoint>,
3289 D::Error: Into<StdError>,
3290 {
3291 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3292 Ok(Self::new(conn))
3293 }
3294 }
3295 impl<T> MetaMemberServiceClient<T>
3296 where
3297 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3298 T::Error: Into<StdError>,
3299 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3300 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3301 {
3302 pub fn new(inner: T) -> Self {
3303 let inner = tonic::client::Grpc::new(inner);
3304 Self { inner }
3305 }
3306 pub fn with_origin(inner: T, origin: Uri) -> Self {
3307 let inner = tonic::client::Grpc::with_origin(inner, origin);
3308 Self { inner }
3309 }
3310 pub fn with_interceptor<F>(
3311 inner: T,
3312 interceptor: F,
3313 ) -> MetaMemberServiceClient<InterceptedService<T, F>>
3314 where
3315 F: tonic::service::Interceptor,
3316 T::ResponseBody: Default,
3317 T: tonic::codegen::Service<
3318 http::Request<tonic::body::BoxBody>,
3319 Response = http::Response<
3320 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3321 >,
3322 >,
3323 <T as tonic::codegen::Service<
3324 http::Request<tonic::body::BoxBody>,
3325 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3326 {
3327 MetaMemberServiceClient::new(InterceptedService::new(inner, interceptor))
3328 }
3329 #[must_use]
3334 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3335 self.inner = self.inner.send_compressed(encoding);
3336 self
3337 }
3338 #[must_use]
3340 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3341 self.inner = self.inner.accept_compressed(encoding);
3342 self
3343 }
3344 #[must_use]
3348 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3349 self.inner = self.inner.max_decoding_message_size(limit);
3350 self
3351 }
3352 #[must_use]
3356 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3357 self.inner = self.inner.max_encoding_message_size(limit);
3358 self
3359 }
3360 pub async fn members(
3361 &mut self,
3362 request: impl tonic::IntoRequest<super::MembersRequest>,
3363 ) -> std::result::Result<
3364 tonic::Response<super::MembersResponse>,
3365 tonic::Status,
3366 > {
3367 self.inner
3368 .ready()
3369 .await
3370 .map_err(|e| {
3371 tonic::Status::unknown(
3372 format!("Service was not ready: {}", e.into()),
3373 )
3374 })?;
3375 let codec = tonic::codec::ProstCodec::default();
3376 let path = http::uri::PathAndQuery::from_static(
3377 "/meta.MetaMemberService/Members",
3378 );
3379 let mut req = request.into_request();
3380 req.extensions_mut()
3381 .insert(GrpcMethod::new("meta.MetaMemberService", "Members"));
3382 self.inner.unary(req, path, codec).await
3383 }
3384 }
3385}
3386pub mod system_params_service_client {
3388 #![allow(
3389 unused_variables,
3390 dead_code,
3391 missing_docs,
3392 clippy::wildcard_imports,
3393 clippy::let_unit_value,
3394 )]
3395 use tonic::codegen::*;
3396 use tonic::codegen::http::Uri;
3397 #[derive(Debug, Clone)]
3398 pub struct SystemParamsServiceClient<T> {
3399 inner: tonic::client::Grpc<T>,
3400 }
3401 impl SystemParamsServiceClient<tonic::transport::Channel> {
3402 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3404 where
3405 D: TryInto<tonic::transport::Endpoint>,
3406 D::Error: Into<StdError>,
3407 {
3408 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3409 Ok(Self::new(conn))
3410 }
3411 }
3412 impl<T> SystemParamsServiceClient<T>
3413 where
3414 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3415 T::Error: Into<StdError>,
3416 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3417 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3418 {
3419 pub fn new(inner: T) -> Self {
3420 let inner = tonic::client::Grpc::new(inner);
3421 Self { inner }
3422 }
3423 pub fn with_origin(inner: T, origin: Uri) -> Self {
3424 let inner = tonic::client::Grpc::with_origin(inner, origin);
3425 Self { inner }
3426 }
3427 pub fn with_interceptor<F>(
3428 inner: T,
3429 interceptor: F,
3430 ) -> SystemParamsServiceClient<InterceptedService<T, F>>
3431 where
3432 F: tonic::service::Interceptor,
3433 T::ResponseBody: Default,
3434 T: tonic::codegen::Service<
3435 http::Request<tonic::body::BoxBody>,
3436 Response = http::Response<
3437 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3438 >,
3439 >,
3440 <T as tonic::codegen::Service<
3441 http::Request<tonic::body::BoxBody>,
3442 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3443 {
3444 SystemParamsServiceClient::new(InterceptedService::new(inner, interceptor))
3445 }
3446 #[must_use]
3451 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3452 self.inner = self.inner.send_compressed(encoding);
3453 self
3454 }
3455 #[must_use]
3457 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3458 self.inner = self.inner.accept_compressed(encoding);
3459 self
3460 }
3461 #[must_use]
3465 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3466 self.inner = self.inner.max_decoding_message_size(limit);
3467 self
3468 }
3469 #[must_use]
3473 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3474 self.inner = self.inner.max_encoding_message_size(limit);
3475 self
3476 }
3477 pub async fn get_system_params(
3478 &mut self,
3479 request: impl tonic::IntoRequest<super::GetSystemParamsRequest>,
3480 ) -> std::result::Result<
3481 tonic::Response<super::GetSystemParamsResponse>,
3482 tonic::Status,
3483 > {
3484 self.inner
3485 .ready()
3486 .await
3487 .map_err(|e| {
3488 tonic::Status::unknown(
3489 format!("Service was not ready: {}", e.into()),
3490 )
3491 })?;
3492 let codec = tonic::codec::ProstCodec::default();
3493 let path = http::uri::PathAndQuery::from_static(
3494 "/meta.SystemParamsService/GetSystemParams",
3495 );
3496 let mut req = request.into_request();
3497 req.extensions_mut()
3498 .insert(GrpcMethod::new("meta.SystemParamsService", "GetSystemParams"));
3499 self.inner.unary(req, path, codec).await
3500 }
3501 pub async fn set_system_param(
3502 &mut self,
3503 request: impl tonic::IntoRequest<super::SetSystemParamRequest>,
3504 ) -> std::result::Result<
3505 tonic::Response<super::SetSystemParamResponse>,
3506 tonic::Status,
3507 > {
3508 self.inner
3509 .ready()
3510 .await
3511 .map_err(|e| {
3512 tonic::Status::unknown(
3513 format!("Service was not ready: {}", e.into()),
3514 )
3515 })?;
3516 let codec = tonic::codec::ProstCodec::default();
3517 let path = http::uri::PathAndQuery::from_static(
3518 "/meta.SystemParamsService/SetSystemParam",
3519 );
3520 let mut req = request.into_request();
3521 req.extensions_mut()
3522 .insert(GrpcMethod::new("meta.SystemParamsService", "SetSystemParam"));
3523 self.inner.unary(req, path, codec).await
3524 }
3525 }
3526}
3527pub mod session_param_service_client {
3529 #![allow(
3530 unused_variables,
3531 dead_code,
3532 missing_docs,
3533 clippy::wildcard_imports,
3534 clippy::let_unit_value,
3535 )]
3536 use tonic::codegen::*;
3537 use tonic::codegen::http::Uri;
3538 #[derive(Debug, Clone)]
3540 pub struct SessionParamServiceClient<T> {
3541 inner: tonic::client::Grpc<T>,
3542 }
3543 impl SessionParamServiceClient<tonic::transport::Channel> {
3544 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3546 where
3547 D: TryInto<tonic::transport::Endpoint>,
3548 D::Error: Into<StdError>,
3549 {
3550 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3551 Ok(Self::new(conn))
3552 }
3553 }
3554 impl<T> SessionParamServiceClient<T>
3555 where
3556 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3557 T::Error: Into<StdError>,
3558 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3559 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3560 {
3561 pub fn new(inner: T) -> Self {
3562 let inner = tonic::client::Grpc::new(inner);
3563 Self { inner }
3564 }
3565 pub fn with_origin(inner: T, origin: Uri) -> Self {
3566 let inner = tonic::client::Grpc::with_origin(inner, origin);
3567 Self { inner }
3568 }
3569 pub fn with_interceptor<F>(
3570 inner: T,
3571 interceptor: F,
3572 ) -> SessionParamServiceClient<InterceptedService<T, F>>
3573 where
3574 F: tonic::service::Interceptor,
3575 T::ResponseBody: Default,
3576 T: tonic::codegen::Service<
3577 http::Request<tonic::body::BoxBody>,
3578 Response = http::Response<
3579 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3580 >,
3581 >,
3582 <T as tonic::codegen::Service<
3583 http::Request<tonic::body::BoxBody>,
3584 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3585 {
3586 SessionParamServiceClient::new(InterceptedService::new(inner, interceptor))
3587 }
3588 #[must_use]
3593 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3594 self.inner = self.inner.send_compressed(encoding);
3595 self
3596 }
3597 #[must_use]
3599 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3600 self.inner = self.inner.accept_compressed(encoding);
3601 self
3602 }
3603 #[must_use]
3607 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3608 self.inner = self.inner.max_decoding_message_size(limit);
3609 self
3610 }
3611 #[must_use]
3615 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3616 self.inner = self.inner.max_encoding_message_size(limit);
3617 self
3618 }
3619 pub async fn get_session_params(
3620 &mut self,
3621 request: impl tonic::IntoRequest<super::GetSessionParamsRequest>,
3622 ) -> std::result::Result<
3623 tonic::Response<super::GetSessionParamsResponse>,
3624 tonic::Status,
3625 > {
3626 self.inner
3627 .ready()
3628 .await
3629 .map_err(|e| {
3630 tonic::Status::unknown(
3631 format!("Service was not ready: {}", e.into()),
3632 )
3633 })?;
3634 let codec = tonic::codec::ProstCodec::default();
3635 let path = http::uri::PathAndQuery::from_static(
3636 "/meta.SessionParamService/GetSessionParams",
3637 );
3638 let mut req = request.into_request();
3639 req.extensions_mut()
3640 .insert(GrpcMethod::new("meta.SessionParamService", "GetSessionParams"));
3641 self.inner.unary(req, path, codec).await
3642 }
3643 pub async fn set_session_param(
3644 &mut self,
3645 request: impl tonic::IntoRequest<super::SetSessionParamRequest>,
3646 ) -> std::result::Result<
3647 tonic::Response<super::SetSessionParamResponse>,
3648 tonic::Status,
3649 > {
3650 self.inner
3651 .ready()
3652 .await
3653 .map_err(|e| {
3654 tonic::Status::unknown(
3655 format!("Service was not ready: {}", e.into()),
3656 )
3657 })?;
3658 let codec = tonic::codec::ProstCodec::default();
3659 let path = http::uri::PathAndQuery::from_static(
3660 "/meta.SessionParamService/SetSessionParam",
3661 );
3662 let mut req = request.into_request();
3663 req.extensions_mut()
3664 .insert(GrpcMethod::new("meta.SessionParamService", "SetSessionParam"));
3665 self.inner.unary(req, path, codec).await
3666 }
3667 }
3668}
3669pub mod serving_service_client {
3671 #![allow(
3672 unused_variables,
3673 dead_code,
3674 missing_docs,
3675 clippy::wildcard_imports,
3676 clippy::let_unit_value,
3677 )]
3678 use tonic::codegen::*;
3679 use tonic::codegen::http::Uri;
3680 #[derive(Debug, Clone)]
3681 pub struct ServingServiceClient<T> {
3682 inner: tonic::client::Grpc<T>,
3683 }
3684 impl ServingServiceClient<tonic::transport::Channel> {
3685 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3687 where
3688 D: TryInto<tonic::transport::Endpoint>,
3689 D::Error: Into<StdError>,
3690 {
3691 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3692 Ok(Self::new(conn))
3693 }
3694 }
3695 impl<T> ServingServiceClient<T>
3696 where
3697 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3698 T::Error: Into<StdError>,
3699 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3700 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3701 {
3702 pub fn new(inner: T) -> Self {
3703 let inner = tonic::client::Grpc::new(inner);
3704 Self { inner }
3705 }
3706 pub fn with_origin(inner: T, origin: Uri) -> Self {
3707 let inner = tonic::client::Grpc::with_origin(inner, origin);
3708 Self { inner }
3709 }
3710 pub fn with_interceptor<F>(
3711 inner: T,
3712 interceptor: F,
3713 ) -> ServingServiceClient<InterceptedService<T, F>>
3714 where
3715 F: tonic::service::Interceptor,
3716 T::ResponseBody: Default,
3717 T: tonic::codegen::Service<
3718 http::Request<tonic::body::BoxBody>,
3719 Response = http::Response<
3720 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3721 >,
3722 >,
3723 <T as tonic::codegen::Service<
3724 http::Request<tonic::body::BoxBody>,
3725 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3726 {
3727 ServingServiceClient::new(InterceptedService::new(inner, interceptor))
3728 }
3729 #[must_use]
3734 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3735 self.inner = self.inner.send_compressed(encoding);
3736 self
3737 }
3738 #[must_use]
3740 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3741 self.inner = self.inner.accept_compressed(encoding);
3742 self
3743 }
3744 #[must_use]
3748 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3749 self.inner = self.inner.max_decoding_message_size(limit);
3750 self
3751 }
3752 #[must_use]
3756 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3757 self.inner = self.inner.max_encoding_message_size(limit);
3758 self
3759 }
3760 pub async fn get_serving_vnode_mappings(
3761 &mut self,
3762 request: impl tonic::IntoRequest<super::GetServingVnodeMappingsRequest>,
3763 ) -> std::result::Result<
3764 tonic::Response<super::GetServingVnodeMappingsResponse>,
3765 tonic::Status,
3766 > {
3767 self.inner
3768 .ready()
3769 .await
3770 .map_err(|e| {
3771 tonic::Status::unknown(
3772 format!("Service was not ready: {}", e.into()),
3773 )
3774 })?;
3775 let codec = tonic::codec::ProstCodec::default();
3776 let path = http::uri::PathAndQuery::from_static(
3777 "/meta.ServingService/GetServingVnodeMappings",
3778 );
3779 let mut req = request.into_request();
3780 req.extensions_mut()
3781 .insert(
3782 GrpcMethod::new("meta.ServingService", "GetServingVnodeMappings"),
3783 );
3784 self.inner.unary(req, path, codec).await
3785 }
3786 }
3787}
3788pub mod event_log_service_client {
3790 #![allow(
3791 unused_variables,
3792 dead_code,
3793 missing_docs,
3794 clippy::wildcard_imports,
3795 clippy::let_unit_value,
3796 )]
3797 use tonic::codegen::*;
3798 use tonic::codegen::http::Uri;
3799 #[derive(Debug, Clone)]
3800 pub struct EventLogServiceClient<T> {
3801 inner: tonic::client::Grpc<T>,
3802 }
3803 impl EventLogServiceClient<tonic::transport::Channel> {
3804 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3806 where
3807 D: TryInto<tonic::transport::Endpoint>,
3808 D::Error: Into<StdError>,
3809 {
3810 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3811 Ok(Self::new(conn))
3812 }
3813 }
3814 impl<T> EventLogServiceClient<T>
3815 where
3816 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3817 T::Error: Into<StdError>,
3818 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3819 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3820 {
3821 pub fn new(inner: T) -> Self {
3822 let inner = tonic::client::Grpc::new(inner);
3823 Self { inner }
3824 }
3825 pub fn with_origin(inner: T, origin: Uri) -> Self {
3826 let inner = tonic::client::Grpc::with_origin(inner, origin);
3827 Self { inner }
3828 }
3829 pub fn with_interceptor<F>(
3830 inner: T,
3831 interceptor: F,
3832 ) -> EventLogServiceClient<InterceptedService<T, F>>
3833 where
3834 F: tonic::service::Interceptor,
3835 T::ResponseBody: Default,
3836 T: tonic::codegen::Service<
3837 http::Request<tonic::body::BoxBody>,
3838 Response = http::Response<
3839 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3840 >,
3841 >,
3842 <T as tonic::codegen::Service<
3843 http::Request<tonic::body::BoxBody>,
3844 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3845 {
3846 EventLogServiceClient::new(InterceptedService::new(inner, interceptor))
3847 }
3848 #[must_use]
3853 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3854 self.inner = self.inner.send_compressed(encoding);
3855 self
3856 }
3857 #[must_use]
3859 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3860 self.inner = self.inner.accept_compressed(encoding);
3861 self
3862 }
3863 #[must_use]
3867 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3868 self.inner = self.inner.max_decoding_message_size(limit);
3869 self
3870 }
3871 #[must_use]
3875 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3876 self.inner = self.inner.max_encoding_message_size(limit);
3877 self
3878 }
3879 pub async fn list_event_log(
3880 &mut self,
3881 request: impl tonic::IntoRequest<super::ListEventLogRequest>,
3882 ) -> std::result::Result<
3883 tonic::Response<super::ListEventLogResponse>,
3884 tonic::Status,
3885 > {
3886 self.inner
3887 .ready()
3888 .await
3889 .map_err(|e| {
3890 tonic::Status::unknown(
3891 format!("Service was not ready: {}", e.into()),
3892 )
3893 })?;
3894 let codec = tonic::codec::ProstCodec::default();
3895 let path = http::uri::PathAndQuery::from_static(
3896 "/meta.EventLogService/ListEventLog",
3897 );
3898 let mut req = request.into_request();
3899 req.extensions_mut()
3900 .insert(GrpcMethod::new("meta.EventLogService", "ListEventLog"));
3901 self.inner.unary(req, path, codec).await
3902 }
3903 pub async fn add_event_log(
3904 &mut self,
3905 request: impl tonic::IntoRequest<super::AddEventLogRequest>,
3906 ) -> std::result::Result<
3907 tonic::Response<super::AddEventLogResponse>,
3908 tonic::Status,
3909 > {
3910 self.inner
3911 .ready()
3912 .await
3913 .map_err(|e| {
3914 tonic::Status::unknown(
3915 format!("Service was not ready: {}", e.into()),
3916 )
3917 })?;
3918 let codec = tonic::codec::ProstCodec::default();
3919 let path = http::uri::PathAndQuery::from_static(
3920 "/meta.EventLogService/AddEventLog",
3921 );
3922 let mut req = request.into_request();
3923 req.extensions_mut()
3924 .insert(GrpcMethod::new("meta.EventLogService", "AddEventLog"));
3925 self.inner.unary(req, path, codec).await
3926 }
3927 }
3928}
3929pub mod cluster_limit_service_client {
3931 #![allow(
3932 unused_variables,
3933 dead_code,
3934 missing_docs,
3935 clippy::wildcard_imports,
3936 clippy::let_unit_value,
3937 )]
3938 use tonic::codegen::*;
3939 use tonic::codegen::http::Uri;
3940 #[derive(Debug, Clone)]
3941 pub struct ClusterLimitServiceClient<T> {
3942 inner: tonic::client::Grpc<T>,
3943 }
3944 impl ClusterLimitServiceClient<tonic::transport::Channel> {
3945 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3947 where
3948 D: TryInto<tonic::transport::Endpoint>,
3949 D::Error: Into<StdError>,
3950 {
3951 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3952 Ok(Self::new(conn))
3953 }
3954 }
3955 impl<T> ClusterLimitServiceClient<T>
3956 where
3957 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3958 T::Error: Into<StdError>,
3959 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3960 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3961 {
3962 pub fn new(inner: T) -> Self {
3963 let inner = tonic::client::Grpc::new(inner);
3964 Self { inner }
3965 }
3966 pub fn with_origin(inner: T, origin: Uri) -> Self {
3967 let inner = tonic::client::Grpc::with_origin(inner, origin);
3968 Self { inner }
3969 }
3970 pub fn with_interceptor<F>(
3971 inner: T,
3972 interceptor: F,
3973 ) -> ClusterLimitServiceClient<InterceptedService<T, F>>
3974 where
3975 F: tonic::service::Interceptor,
3976 T::ResponseBody: Default,
3977 T: tonic::codegen::Service<
3978 http::Request<tonic::body::BoxBody>,
3979 Response = http::Response<
3980 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3981 >,
3982 >,
3983 <T as tonic::codegen::Service<
3984 http::Request<tonic::body::BoxBody>,
3985 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3986 {
3987 ClusterLimitServiceClient::new(InterceptedService::new(inner, interceptor))
3988 }
3989 #[must_use]
3994 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3995 self.inner = self.inner.send_compressed(encoding);
3996 self
3997 }
3998 #[must_use]
4000 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4001 self.inner = self.inner.accept_compressed(encoding);
4002 self
4003 }
4004 #[must_use]
4008 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4009 self.inner = self.inner.max_decoding_message_size(limit);
4010 self
4011 }
4012 #[must_use]
4016 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4017 self.inner = self.inner.max_encoding_message_size(limit);
4018 self
4019 }
4020 pub async fn get_cluster_limits(
4021 &mut self,
4022 request: impl tonic::IntoRequest<super::GetClusterLimitsRequest>,
4023 ) -> std::result::Result<
4024 tonic::Response<super::GetClusterLimitsResponse>,
4025 tonic::Status,
4026 > {
4027 self.inner
4028 .ready()
4029 .await
4030 .map_err(|e| {
4031 tonic::Status::unknown(
4032 format!("Service was not ready: {}", e.into()),
4033 )
4034 })?;
4035 let codec = tonic::codec::ProstCodec::default();
4036 let path = http::uri::PathAndQuery::from_static(
4037 "/meta.ClusterLimitService/GetClusterLimits",
4038 );
4039 let mut req = request.into_request();
4040 req.extensions_mut()
4041 .insert(GrpcMethod::new("meta.ClusterLimitService", "GetClusterLimits"));
4042 self.inner.unary(req, path, codec).await
4043 }
4044 }
4045}
4046pub mod hosted_iceberg_catalog_service_client {
4048 #![allow(
4049 unused_variables,
4050 dead_code,
4051 missing_docs,
4052 clippy::wildcard_imports,
4053 clippy::let_unit_value,
4054 )]
4055 use tonic::codegen::*;
4056 use tonic::codegen::http::Uri;
4057 #[derive(Debug, Clone)]
4058 pub struct HostedIcebergCatalogServiceClient<T> {
4059 inner: tonic::client::Grpc<T>,
4060 }
4061 impl HostedIcebergCatalogServiceClient<tonic::transport::Channel> {
4062 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
4064 where
4065 D: TryInto<tonic::transport::Endpoint>,
4066 D::Error: Into<StdError>,
4067 {
4068 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
4069 Ok(Self::new(conn))
4070 }
4071 }
4072 impl<T> HostedIcebergCatalogServiceClient<T>
4073 where
4074 T: tonic::client::GrpcService<tonic::body::BoxBody>,
4075 T::Error: Into<StdError>,
4076 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
4077 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
4078 {
4079 pub fn new(inner: T) -> Self {
4080 let inner = tonic::client::Grpc::new(inner);
4081 Self { inner }
4082 }
4083 pub fn with_origin(inner: T, origin: Uri) -> Self {
4084 let inner = tonic::client::Grpc::with_origin(inner, origin);
4085 Self { inner }
4086 }
4087 pub fn with_interceptor<F>(
4088 inner: T,
4089 interceptor: F,
4090 ) -> HostedIcebergCatalogServiceClient<InterceptedService<T, F>>
4091 where
4092 F: tonic::service::Interceptor,
4093 T::ResponseBody: Default,
4094 T: tonic::codegen::Service<
4095 http::Request<tonic::body::BoxBody>,
4096 Response = http::Response<
4097 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
4098 >,
4099 >,
4100 <T as tonic::codegen::Service<
4101 http::Request<tonic::body::BoxBody>,
4102 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
4103 {
4104 HostedIcebergCatalogServiceClient::new(
4105 InterceptedService::new(inner, interceptor),
4106 )
4107 }
4108 #[must_use]
4113 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4114 self.inner = self.inner.send_compressed(encoding);
4115 self
4116 }
4117 #[must_use]
4119 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4120 self.inner = self.inner.accept_compressed(encoding);
4121 self
4122 }
4123 #[must_use]
4127 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4128 self.inner = self.inner.max_decoding_message_size(limit);
4129 self
4130 }
4131 #[must_use]
4135 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4136 self.inner = self.inner.max_encoding_message_size(limit);
4137 self
4138 }
4139 pub async fn list_iceberg_tables(
4140 &mut self,
4141 request: impl tonic::IntoRequest<super::ListIcebergTablesRequest>,
4142 ) -> std::result::Result<
4143 tonic::Response<super::ListIcebergTablesResponse>,
4144 tonic::Status,
4145 > {
4146 self.inner
4147 .ready()
4148 .await
4149 .map_err(|e| {
4150 tonic::Status::unknown(
4151 format!("Service was not ready: {}", e.into()),
4152 )
4153 })?;
4154 let codec = tonic::codec::ProstCodec::default();
4155 let path = http::uri::PathAndQuery::from_static(
4156 "/meta.HostedIcebergCatalogService/ListIcebergTables",
4157 );
4158 let mut req = request.into_request();
4159 req.extensions_mut()
4160 .insert(
4161 GrpcMethod::new(
4162 "meta.HostedIcebergCatalogService",
4163 "ListIcebergTables",
4164 ),
4165 );
4166 self.inner.unary(req, path, codec).await
4167 }
4168 }
4169}
4170pub mod telemetry_info_service_server {
4172 #![allow(
4173 unused_variables,
4174 dead_code,
4175 missing_docs,
4176 clippy::wildcard_imports,
4177 clippy::let_unit_value,
4178 )]
4179 use tonic::codegen::*;
4180 #[async_trait]
4182 pub trait TelemetryInfoService: std::marker::Send + std::marker::Sync + 'static {
4183 async fn get_telemetry_info(
4185 &self,
4186 request: tonic::Request<super::GetTelemetryInfoRequest>,
4187 ) -> std::result::Result<
4188 tonic::Response<super::TelemetryInfoResponse>,
4189 tonic::Status,
4190 >;
4191 }
4192 #[derive(Debug)]
4193 pub struct TelemetryInfoServiceServer<T> {
4194 inner: Arc<T>,
4195 accept_compression_encodings: EnabledCompressionEncodings,
4196 send_compression_encodings: EnabledCompressionEncodings,
4197 max_decoding_message_size: Option<usize>,
4198 max_encoding_message_size: Option<usize>,
4199 }
4200 impl<T> TelemetryInfoServiceServer<T> {
4201 pub fn new(inner: T) -> Self {
4202 Self::from_arc(Arc::new(inner))
4203 }
4204 pub fn from_arc(inner: Arc<T>) -> Self {
4205 Self {
4206 inner,
4207 accept_compression_encodings: Default::default(),
4208 send_compression_encodings: Default::default(),
4209 max_decoding_message_size: None,
4210 max_encoding_message_size: None,
4211 }
4212 }
4213 pub fn with_interceptor<F>(
4214 inner: T,
4215 interceptor: F,
4216 ) -> InterceptedService<Self, F>
4217 where
4218 F: tonic::service::Interceptor,
4219 {
4220 InterceptedService::new(Self::new(inner), interceptor)
4221 }
4222 #[must_use]
4224 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4225 self.accept_compression_encodings.enable(encoding);
4226 self
4227 }
4228 #[must_use]
4230 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4231 self.send_compression_encodings.enable(encoding);
4232 self
4233 }
4234 #[must_use]
4238 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4239 self.max_decoding_message_size = Some(limit);
4240 self
4241 }
4242 #[must_use]
4246 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4247 self.max_encoding_message_size = Some(limit);
4248 self
4249 }
4250 }
4251 impl<T, B> tonic::codegen::Service<http::Request<B>>
4252 for TelemetryInfoServiceServer<T>
4253 where
4254 T: TelemetryInfoService,
4255 B: Body + std::marker::Send + 'static,
4256 B::Error: Into<StdError> + std::marker::Send + 'static,
4257 {
4258 type Response = http::Response<tonic::body::BoxBody>;
4259 type Error = std::convert::Infallible;
4260 type Future = BoxFuture<Self::Response, Self::Error>;
4261 fn poll_ready(
4262 &mut self,
4263 _cx: &mut Context<'_>,
4264 ) -> Poll<std::result::Result<(), Self::Error>> {
4265 Poll::Ready(Ok(()))
4266 }
4267 fn call(&mut self, req: http::Request<B>) -> Self::Future {
4268 match req.uri().path() {
4269 "/meta.TelemetryInfoService/GetTelemetryInfo" => {
4270 #[allow(non_camel_case_types)]
4271 struct GetTelemetryInfoSvc<T: TelemetryInfoService>(pub Arc<T>);
4272 impl<
4273 T: TelemetryInfoService,
4274 > tonic::server::UnaryService<super::GetTelemetryInfoRequest>
4275 for GetTelemetryInfoSvc<T> {
4276 type Response = super::TelemetryInfoResponse;
4277 type Future = BoxFuture<
4278 tonic::Response<Self::Response>,
4279 tonic::Status,
4280 >;
4281 fn call(
4282 &mut self,
4283 request: tonic::Request<super::GetTelemetryInfoRequest>,
4284 ) -> Self::Future {
4285 let inner = Arc::clone(&self.0);
4286 let fut = async move {
4287 <T as TelemetryInfoService>::get_telemetry_info(
4288 &inner,
4289 request,
4290 )
4291 .await
4292 };
4293 Box::pin(fut)
4294 }
4295 }
4296 let accept_compression_encodings = self.accept_compression_encodings;
4297 let send_compression_encodings = self.send_compression_encodings;
4298 let max_decoding_message_size = self.max_decoding_message_size;
4299 let max_encoding_message_size = self.max_encoding_message_size;
4300 let inner = self.inner.clone();
4301 let fut = async move {
4302 let method = GetTelemetryInfoSvc(inner);
4303 let codec = tonic::codec::ProstCodec::default();
4304 let mut grpc = tonic::server::Grpc::new(codec)
4305 .apply_compression_config(
4306 accept_compression_encodings,
4307 send_compression_encodings,
4308 )
4309 .apply_max_message_size_config(
4310 max_decoding_message_size,
4311 max_encoding_message_size,
4312 );
4313 let res = grpc.unary(method, req).await;
4314 Ok(res)
4315 };
4316 Box::pin(fut)
4317 }
4318 _ => {
4319 Box::pin(async move {
4320 let mut response = http::Response::new(empty_body());
4321 let headers = response.headers_mut();
4322 headers
4323 .insert(
4324 tonic::Status::GRPC_STATUS,
4325 (tonic::Code::Unimplemented as i32).into(),
4326 );
4327 headers
4328 .insert(
4329 http::header::CONTENT_TYPE,
4330 tonic::metadata::GRPC_CONTENT_TYPE,
4331 );
4332 Ok(response)
4333 })
4334 }
4335 }
4336 }
4337 }
4338 impl<T> Clone for TelemetryInfoServiceServer<T> {
4339 fn clone(&self) -> Self {
4340 let inner = self.inner.clone();
4341 Self {
4342 inner,
4343 accept_compression_encodings: self.accept_compression_encodings,
4344 send_compression_encodings: self.send_compression_encodings,
4345 max_decoding_message_size: self.max_decoding_message_size,
4346 max_encoding_message_size: self.max_encoding_message_size,
4347 }
4348 }
4349 }
4350 pub const SERVICE_NAME: &str = "meta.TelemetryInfoService";
4352 impl<T> tonic::server::NamedService for TelemetryInfoServiceServer<T> {
4353 const NAME: &'static str = SERVICE_NAME;
4354 }
4355}
4356pub mod heartbeat_service_server {
4358 #![allow(
4359 unused_variables,
4360 dead_code,
4361 missing_docs,
4362 clippy::wildcard_imports,
4363 clippy::let_unit_value,
4364 )]
4365 use tonic::codegen::*;
4366 #[async_trait]
4368 pub trait HeartbeatService: std::marker::Send + std::marker::Sync + 'static {
4369 async fn heartbeat(
4370 &self,
4371 request: tonic::Request<super::HeartbeatRequest>,
4372 ) -> std::result::Result<
4373 tonic::Response<super::HeartbeatResponse>,
4374 tonic::Status,
4375 >;
4376 }
4377 #[derive(Debug)]
4378 pub struct HeartbeatServiceServer<T> {
4379 inner: Arc<T>,
4380 accept_compression_encodings: EnabledCompressionEncodings,
4381 send_compression_encodings: EnabledCompressionEncodings,
4382 max_decoding_message_size: Option<usize>,
4383 max_encoding_message_size: Option<usize>,
4384 }
4385 impl<T> HeartbeatServiceServer<T> {
4386 pub fn new(inner: T) -> Self {
4387 Self::from_arc(Arc::new(inner))
4388 }
4389 pub fn from_arc(inner: Arc<T>) -> Self {
4390 Self {
4391 inner,
4392 accept_compression_encodings: Default::default(),
4393 send_compression_encodings: Default::default(),
4394 max_decoding_message_size: None,
4395 max_encoding_message_size: None,
4396 }
4397 }
4398 pub fn with_interceptor<F>(
4399 inner: T,
4400 interceptor: F,
4401 ) -> InterceptedService<Self, F>
4402 where
4403 F: tonic::service::Interceptor,
4404 {
4405 InterceptedService::new(Self::new(inner), interceptor)
4406 }
4407 #[must_use]
4409 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4410 self.accept_compression_encodings.enable(encoding);
4411 self
4412 }
4413 #[must_use]
4415 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4416 self.send_compression_encodings.enable(encoding);
4417 self
4418 }
4419 #[must_use]
4423 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4424 self.max_decoding_message_size = Some(limit);
4425 self
4426 }
4427 #[must_use]
4431 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4432 self.max_encoding_message_size = Some(limit);
4433 self
4434 }
4435 }
4436 impl<T, B> tonic::codegen::Service<http::Request<B>> for HeartbeatServiceServer<T>
4437 where
4438 T: HeartbeatService,
4439 B: Body + std::marker::Send + 'static,
4440 B::Error: Into<StdError> + std::marker::Send + 'static,
4441 {
4442 type Response = http::Response<tonic::body::BoxBody>;
4443 type Error = std::convert::Infallible;
4444 type Future = BoxFuture<Self::Response, Self::Error>;
4445 fn poll_ready(
4446 &mut self,
4447 _cx: &mut Context<'_>,
4448 ) -> Poll<std::result::Result<(), Self::Error>> {
4449 Poll::Ready(Ok(()))
4450 }
4451 fn call(&mut self, req: http::Request<B>) -> Self::Future {
4452 match req.uri().path() {
4453 "/meta.HeartbeatService/Heartbeat" => {
4454 #[allow(non_camel_case_types)]
4455 struct HeartbeatSvc<T: HeartbeatService>(pub Arc<T>);
4456 impl<
4457 T: HeartbeatService,
4458 > tonic::server::UnaryService<super::HeartbeatRequest>
4459 for HeartbeatSvc<T> {
4460 type Response = super::HeartbeatResponse;
4461 type Future = BoxFuture<
4462 tonic::Response<Self::Response>,
4463 tonic::Status,
4464 >;
4465 fn call(
4466 &mut self,
4467 request: tonic::Request<super::HeartbeatRequest>,
4468 ) -> Self::Future {
4469 let inner = Arc::clone(&self.0);
4470 let fut = async move {
4471 <T as HeartbeatService>::heartbeat(&inner, request).await
4472 };
4473 Box::pin(fut)
4474 }
4475 }
4476 let accept_compression_encodings = self.accept_compression_encodings;
4477 let send_compression_encodings = self.send_compression_encodings;
4478 let max_decoding_message_size = self.max_decoding_message_size;
4479 let max_encoding_message_size = self.max_encoding_message_size;
4480 let inner = self.inner.clone();
4481 let fut = async move {
4482 let method = HeartbeatSvc(inner);
4483 let codec = tonic::codec::ProstCodec::default();
4484 let mut grpc = tonic::server::Grpc::new(codec)
4485 .apply_compression_config(
4486 accept_compression_encodings,
4487 send_compression_encodings,
4488 )
4489 .apply_max_message_size_config(
4490 max_decoding_message_size,
4491 max_encoding_message_size,
4492 );
4493 let res = grpc.unary(method, req).await;
4494 Ok(res)
4495 };
4496 Box::pin(fut)
4497 }
4498 _ => {
4499 Box::pin(async move {
4500 let mut response = http::Response::new(empty_body());
4501 let headers = response.headers_mut();
4502 headers
4503 .insert(
4504 tonic::Status::GRPC_STATUS,
4505 (tonic::Code::Unimplemented as i32).into(),
4506 );
4507 headers
4508 .insert(
4509 http::header::CONTENT_TYPE,
4510 tonic::metadata::GRPC_CONTENT_TYPE,
4511 );
4512 Ok(response)
4513 })
4514 }
4515 }
4516 }
4517 }
4518 impl<T> Clone for HeartbeatServiceServer<T> {
4519 fn clone(&self) -> Self {
4520 let inner = self.inner.clone();
4521 Self {
4522 inner,
4523 accept_compression_encodings: self.accept_compression_encodings,
4524 send_compression_encodings: self.send_compression_encodings,
4525 max_decoding_message_size: self.max_decoding_message_size,
4526 max_encoding_message_size: self.max_encoding_message_size,
4527 }
4528 }
4529 }
4530 pub const SERVICE_NAME: &str = "meta.HeartbeatService";
4532 impl<T> tonic::server::NamedService for HeartbeatServiceServer<T> {
4533 const NAME: &'static str = SERVICE_NAME;
4534 }
4535}
4536pub mod stream_manager_service_server {
4538 #![allow(
4539 unused_variables,
4540 dead_code,
4541 missing_docs,
4542 clippy::wildcard_imports,
4543 clippy::let_unit_value,
4544 )]
4545 use tonic::codegen::*;
4546 #[async_trait]
4548 pub trait StreamManagerService: std::marker::Send + std::marker::Sync + 'static {
4549 async fn flush(
4550 &self,
4551 request: tonic::Request<super::FlushRequest>,
4552 ) -> std::result::Result<tonic::Response<super::FlushResponse>, tonic::Status>;
4553 async fn pause(
4554 &self,
4555 request: tonic::Request<super::PauseRequest>,
4556 ) -> std::result::Result<tonic::Response<super::PauseResponse>, tonic::Status>;
4557 async fn resume(
4558 &self,
4559 request: tonic::Request<super::ResumeRequest>,
4560 ) -> std::result::Result<tonic::Response<super::ResumeResponse>, tonic::Status>;
4561 async fn refresh(
4562 &self,
4563 request: tonic::Request<super::RefreshRequest>,
4564 ) -> std::result::Result<tonic::Response<super::RefreshResponse>, tonic::Status>;
4565 async fn cancel_creating_jobs(
4566 &self,
4567 request: tonic::Request<super::CancelCreatingJobsRequest>,
4568 ) -> std::result::Result<
4569 tonic::Response<super::CancelCreatingJobsResponse>,
4570 tonic::Status,
4571 >;
4572 async fn list_table_fragments(
4573 &self,
4574 request: tonic::Request<super::ListTableFragmentsRequest>,
4575 ) -> std::result::Result<
4576 tonic::Response<super::ListTableFragmentsResponse>,
4577 tonic::Status,
4578 >;
4579 async fn list_streaming_job_states(
4580 &self,
4581 request: tonic::Request<super::ListStreamingJobStatesRequest>,
4582 ) -> std::result::Result<
4583 tonic::Response<super::ListStreamingJobStatesResponse>,
4584 tonic::Status,
4585 >;
4586 async fn list_fragment_distribution(
4587 &self,
4588 request: tonic::Request<super::ListFragmentDistributionRequest>,
4589 ) -> std::result::Result<
4590 tonic::Response<super::ListFragmentDistributionResponse>,
4591 tonic::Status,
4592 >;
4593 async fn list_creating_fragment_distribution(
4594 &self,
4595 request: tonic::Request<super::ListCreatingFragmentDistributionRequest>,
4596 ) -> std::result::Result<
4597 tonic::Response<super::ListCreatingFragmentDistributionResponse>,
4598 tonic::Status,
4599 >;
4600 async fn list_actor_states(
4601 &self,
4602 request: tonic::Request<super::ListActorStatesRequest>,
4603 ) -> std::result::Result<
4604 tonic::Response<super::ListActorStatesResponse>,
4605 tonic::Status,
4606 >;
4607 async fn list_actor_splits(
4608 &self,
4609 request: tonic::Request<super::ListActorSplitsRequest>,
4610 ) -> std::result::Result<
4611 tonic::Response<super::ListActorSplitsResponse>,
4612 tonic::Status,
4613 >;
4614 async fn list_object_dependencies(
4615 &self,
4616 request: tonic::Request<super::ListObjectDependenciesRequest>,
4617 ) -> std::result::Result<
4618 tonic::Response<super::ListObjectDependenciesResponse>,
4619 tonic::Status,
4620 >;
4621 async fn apply_throttle(
4622 &self,
4623 request: tonic::Request<super::ApplyThrottleRequest>,
4624 ) -> std::result::Result<
4625 tonic::Response<super::ApplyThrottleResponse>,
4626 tonic::Status,
4627 >;
4628 async fn recover(
4629 &self,
4630 request: tonic::Request<super::RecoverRequest>,
4631 ) -> std::result::Result<tonic::Response<super::RecoverResponse>, tonic::Status>;
4632 async fn list_rate_limits(
4633 &self,
4634 request: tonic::Request<super::ListRateLimitsRequest>,
4635 ) -> std::result::Result<
4636 tonic::Response<super::ListRateLimitsResponse>,
4637 tonic::Status,
4638 >;
4639 async fn alter_connector_props(
4640 &self,
4641 request: tonic::Request<super::AlterConnectorPropsRequest>,
4642 ) -> std::result::Result<
4643 tonic::Response<super::AlterConnectorPropsResponse>,
4644 tonic::Status,
4645 >;
4646 async fn get_fragment_by_id(
4647 &self,
4648 request: tonic::Request<super::GetFragmentByIdRequest>,
4649 ) -> std::result::Result<
4650 tonic::Response<super::GetFragmentByIdResponse>,
4651 tonic::Status,
4652 >;
4653 async fn set_sync_log_store_aligned(
4654 &self,
4655 request: tonic::Request<super::SetSyncLogStoreAlignedRequest>,
4656 ) -> std::result::Result<
4657 tonic::Response<super::SetSyncLogStoreAlignedResponse>,
4658 tonic::Status,
4659 >;
4660 async fn list_cdc_progress(
4661 &self,
4662 request: tonic::Request<super::ListCdcProgressRequest>,
4663 ) -> std::result::Result<
4664 tonic::Response<super::ListCdcProgressResponse>,
4665 tonic::Status,
4666 >;
4667 }
4668 #[derive(Debug)]
4669 pub struct StreamManagerServiceServer<T> {
4670 inner: Arc<T>,
4671 accept_compression_encodings: EnabledCompressionEncodings,
4672 send_compression_encodings: EnabledCompressionEncodings,
4673 max_decoding_message_size: Option<usize>,
4674 max_encoding_message_size: Option<usize>,
4675 }
4676 impl<T> StreamManagerServiceServer<T> {
4677 pub fn new(inner: T) -> Self {
4678 Self::from_arc(Arc::new(inner))
4679 }
4680 pub fn from_arc(inner: Arc<T>) -> Self {
4681 Self {
4682 inner,
4683 accept_compression_encodings: Default::default(),
4684 send_compression_encodings: Default::default(),
4685 max_decoding_message_size: None,
4686 max_encoding_message_size: None,
4687 }
4688 }
4689 pub fn with_interceptor<F>(
4690 inner: T,
4691 interceptor: F,
4692 ) -> InterceptedService<Self, F>
4693 where
4694 F: tonic::service::Interceptor,
4695 {
4696 InterceptedService::new(Self::new(inner), interceptor)
4697 }
4698 #[must_use]
4700 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
4701 self.accept_compression_encodings.enable(encoding);
4702 self
4703 }
4704 #[must_use]
4706 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
4707 self.send_compression_encodings.enable(encoding);
4708 self
4709 }
4710 #[must_use]
4714 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
4715 self.max_decoding_message_size = Some(limit);
4716 self
4717 }
4718 #[must_use]
4722 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
4723 self.max_encoding_message_size = Some(limit);
4724 self
4725 }
4726 }
4727 impl<T, B> tonic::codegen::Service<http::Request<B>>
4728 for StreamManagerServiceServer<T>
4729 where
4730 T: StreamManagerService,
4731 B: Body + std::marker::Send + 'static,
4732 B::Error: Into<StdError> + std::marker::Send + 'static,
4733 {
4734 type Response = http::Response<tonic::body::BoxBody>;
4735 type Error = std::convert::Infallible;
4736 type Future = BoxFuture<Self::Response, Self::Error>;
4737 fn poll_ready(
4738 &mut self,
4739 _cx: &mut Context<'_>,
4740 ) -> Poll<std::result::Result<(), Self::Error>> {
4741 Poll::Ready(Ok(()))
4742 }
4743 fn call(&mut self, req: http::Request<B>) -> Self::Future {
4744 match req.uri().path() {
4745 "/meta.StreamManagerService/Flush" => {
4746 #[allow(non_camel_case_types)]
4747 struct FlushSvc<T: StreamManagerService>(pub Arc<T>);
4748 impl<
4749 T: StreamManagerService,
4750 > tonic::server::UnaryService<super::FlushRequest> for FlushSvc<T> {
4751 type Response = super::FlushResponse;
4752 type Future = BoxFuture<
4753 tonic::Response<Self::Response>,
4754 tonic::Status,
4755 >;
4756 fn call(
4757 &mut self,
4758 request: tonic::Request<super::FlushRequest>,
4759 ) -> Self::Future {
4760 let inner = Arc::clone(&self.0);
4761 let fut = async move {
4762 <T as StreamManagerService>::flush(&inner, request).await
4763 };
4764 Box::pin(fut)
4765 }
4766 }
4767 let accept_compression_encodings = self.accept_compression_encodings;
4768 let send_compression_encodings = self.send_compression_encodings;
4769 let max_decoding_message_size = self.max_decoding_message_size;
4770 let max_encoding_message_size = self.max_encoding_message_size;
4771 let inner = self.inner.clone();
4772 let fut = async move {
4773 let method = FlushSvc(inner);
4774 let codec = tonic::codec::ProstCodec::default();
4775 let mut grpc = tonic::server::Grpc::new(codec)
4776 .apply_compression_config(
4777 accept_compression_encodings,
4778 send_compression_encodings,
4779 )
4780 .apply_max_message_size_config(
4781 max_decoding_message_size,
4782 max_encoding_message_size,
4783 );
4784 let res = grpc.unary(method, req).await;
4785 Ok(res)
4786 };
4787 Box::pin(fut)
4788 }
4789 "/meta.StreamManagerService/Pause" => {
4790 #[allow(non_camel_case_types)]
4791 struct PauseSvc<T: StreamManagerService>(pub Arc<T>);
4792 impl<
4793 T: StreamManagerService,
4794 > tonic::server::UnaryService<super::PauseRequest> for PauseSvc<T> {
4795 type Response = super::PauseResponse;
4796 type Future = BoxFuture<
4797 tonic::Response<Self::Response>,
4798 tonic::Status,
4799 >;
4800 fn call(
4801 &mut self,
4802 request: tonic::Request<super::PauseRequest>,
4803 ) -> Self::Future {
4804 let inner = Arc::clone(&self.0);
4805 let fut = async move {
4806 <T as StreamManagerService>::pause(&inner, request).await
4807 };
4808 Box::pin(fut)
4809 }
4810 }
4811 let accept_compression_encodings = self.accept_compression_encodings;
4812 let send_compression_encodings = self.send_compression_encodings;
4813 let max_decoding_message_size = self.max_decoding_message_size;
4814 let max_encoding_message_size = self.max_encoding_message_size;
4815 let inner = self.inner.clone();
4816 let fut = async move {
4817 let method = PauseSvc(inner);
4818 let codec = tonic::codec::ProstCodec::default();
4819 let mut grpc = tonic::server::Grpc::new(codec)
4820 .apply_compression_config(
4821 accept_compression_encodings,
4822 send_compression_encodings,
4823 )
4824 .apply_max_message_size_config(
4825 max_decoding_message_size,
4826 max_encoding_message_size,
4827 );
4828 let res = grpc.unary(method, req).await;
4829 Ok(res)
4830 };
4831 Box::pin(fut)
4832 }
4833 "/meta.StreamManagerService/Resume" => {
4834 #[allow(non_camel_case_types)]
4835 struct ResumeSvc<T: StreamManagerService>(pub Arc<T>);
4836 impl<
4837 T: StreamManagerService,
4838 > tonic::server::UnaryService<super::ResumeRequest>
4839 for ResumeSvc<T> {
4840 type Response = super::ResumeResponse;
4841 type Future = BoxFuture<
4842 tonic::Response<Self::Response>,
4843 tonic::Status,
4844 >;
4845 fn call(
4846 &mut self,
4847 request: tonic::Request<super::ResumeRequest>,
4848 ) -> Self::Future {
4849 let inner = Arc::clone(&self.0);
4850 let fut = async move {
4851 <T as StreamManagerService>::resume(&inner, request).await
4852 };
4853 Box::pin(fut)
4854 }
4855 }
4856 let accept_compression_encodings = self.accept_compression_encodings;
4857 let send_compression_encodings = self.send_compression_encodings;
4858 let max_decoding_message_size = self.max_decoding_message_size;
4859 let max_encoding_message_size = self.max_encoding_message_size;
4860 let inner = self.inner.clone();
4861 let fut = async move {
4862 let method = ResumeSvc(inner);
4863 let codec = tonic::codec::ProstCodec::default();
4864 let mut grpc = tonic::server::Grpc::new(codec)
4865 .apply_compression_config(
4866 accept_compression_encodings,
4867 send_compression_encodings,
4868 )
4869 .apply_max_message_size_config(
4870 max_decoding_message_size,
4871 max_encoding_message_size,
4872 );
4873 let res = grpc.unary(method, req).await;
4874 Ok(res)
4875 };
4876 Box::pin(fut)
4877 }
4878 "/meta.StreamManagerService/Refresh" => {
4879 #[allow(non_camel_case_types)]
4880 struct RefreshSvc<T: StreamManagerService>(pub Arc<T>);
4881 impl<
4882 T: StreamManagerService,
4883 > tonic::server::UnaryService<super::RefreshRequest>
4884 for RefreshSvc<T> {
4885 type Response = super::RefreshResponse;
4886 type Future = BoxFuture<
4887 tonic::Response<Self::Response>,
4888 tonic::Status,
4889 >;
4890 fn call(
4891 &mut self,
4892 request: tonic::Request<super::RefreshRequest>,
4893 ) -> Self::Future {
4894 let inner = Arc::clone(&self.0);
4895 let fut = async move {
4896 <T as StreamManagerService>::refresh(&inner, request).await
4897 };
4898 Box::pin(fut)
4899 }
4900 }
4901 let accept_compression_encodings = self.accept_compression_encodings;
4902 let send_compression_encodings = self.send_compression_encodings;
4903 let max_decoding_message_size = self.max_decoding_message_size;
4904 let max_encoding_message_size = self.max_encoding_message_size;
4905 let inner = self.inner.clone();
4906 let fut = async move {
4907 let method = RefreshSvc(inner);
4908 let codec = tonic::codec::ProstCodec::default();
4909 let mut grpc = tonic::server::Grpc::new(codec)
4910 .apply_compression_config(
4911 accept_compression_encodings,
4912 send_compression_encodings,
4913 )
4914 .apply_max_message_size_config(
4915 max_decoding_message_size,
4916 max_encoding_message_size,
4917 );
4918 let res = grpc.unary(method, req).await;
4919 Ok(res)
4920 };
4921 Box::pin(fut)
4922 }
4923 "/meta.StreamManagerService/CancelCreatingJobs" => {
4924 #[allow(non_camel_case_types)]
4925 struct CancelCreatingJobsSvc<T: StreamManagerService>(pub Arc<T>);
4926 impl<
4927 T: StreamManagerService,
4928 > tonic::server::UnaryService<super::CancelCreatingJobsRequest>
4929 for CancelCreatingJobsSvc<T> {
4930 type Response = super::CancelCreatingJobsResponse;
4931 type Future = BoxFuture<
4932 tonic::Response<Self::Response>,
4933 tonic::Status,
4934 >;
4935 fn call(
4936 &mut self,
4937 request: tonic::Request<super::CancelCreatingJobsRequest>,
4938 ) -> Self::Future {
4939 let inner = Arc::clone(&self.0);
4940 let fut = async move {
4941 <T as StreamManagerService>::cancel_creating_jobs(
4942 &inner,
4943 request,
4944 )
4945 .await
4946 };
4947 Box::pin(fut)
4948 }
4949 }
4950 let accept_compression_encodings = self.accept_compression_encodings;
4951 let send_compression_encodings = self.send_compression_encodings;
4952 let max_decoding_message_size = self.max_decoding_message_size;
4953 let max_encoding_message_size = self.max_encoding_message_size;
4954 let inner = self.inner.clone();
4955 let fut = async move {
4956 let method = CancelCreatingJobsSvc(inner);
4957 let codec = tonic::codec::ProstCodec::default();
4958 let mut grpc = tonic::server::Grpc::new(codec)
4959 .apply_compression_config(
4960 accept_compression_encodings,
4961 send_compression_encodings,
4962 )
4963 .apply_max_message_size_config(
4964 max_decoding_message_size,
4965 max_encoding_message_size,
4966 );
4967 let res = grpc.unary(method, req).await;
4968 Ok(res)
4969 };
4970 Box::pin(fut)
4971 }
4972 "/meta.StreamManagerService/ListTableFragments" => {
4973 #[allow(non_camel_case_types)]
4974 struct ListTableFragmentsSvc<T: StreamManagerService>(pub Arc<T>);
4975 impl<
4976 T: StreamManagerService,
4977 > tonic::server::UnaryService<super::ListTableFragmentsRequest>
4978 for ListTableFragmentsSvc<T> {
4979 type Response = super::ListTableFragmentsResponse;
4980 type Future = BoxFuture<
4981 tonic::Response<Self::Response>,
4982 tonic::Status,
4983 >;
4984 fn call(
4985 &mut self,
4986 request: tonic::Request<super::ListTableFragmentsRequest>,
4987 ) -> Self::Future {
4988 let inner = Arc::clone(&self.0);
4989 let fut = async move {
4990 <T as StreamManagerService>::list_table_fragments(
4991 &inner,
4992 request,
4993 )
4994 .await
4995 };
4996 Box::pin(fut)
4997 }
4998 }
4999 let accept_compression_encodings = self.accept_compression_encodings;
5000 let send_compression_encodings = self.send_compression_encodings;
5001 let max_decoding_message_size = self.max_decoding_message_size;
5002 let max_encoding_message_size = self.max_encoding_message_size;
5003 let inner = self.inner.clone();
5004 let fut = async move {
5005 let method = ListTableFragmentsSvc(inner);
5006 let codec = tonic::codec::ProstCodec::default();
5007 let mut grpc = tonic::server::Grpc::new(codec)
5008 .apply_compression_config(
5009 accept_compression_encodings,
5010 send_compression_encodings,
5011 )
5012 .apply_max_message_size_config(
5013 max_decoding_message_size,
5014 max_encoding_message_size,
5015 );
5016 let res = grpc.unary(method, req).await;
5017 Ok(res)
5018 };
5019 Box::pin(fut)
5020 }
5021 "/meta.StreamManagerService/ListStreamingJobStates" => {
5022 #[allow(non_camel_case_types)]
5023 struct ListStreamingJobStatesSvc<T: StreamManagerService>(
5024 pub Arc<T>,
5025 );
5026 impl<
5027 T: StreamManagerService,
5028 > tonic::server::UnaryService<super::ListStreamingJobStatesRequest>
5029 for ListStreamingJobStatesSvc<T> {
5030 type Response = super::ListStreamingJobStatesResponse;
5031 type Future = BoxFuture<
5032 tonic::Response<Self::Response>,
5033 tonic::Status,
5034 >;
5035 fn call(
5036 &mut self,
5037 request: tonic::Request<super::ListStreamingJobStatesRequest>,
5038 ) -> Self::Future {
5039 let inner = Arc::clone(&self.0);
5040 let fut = async move {
5041 <T as StreamManagerService>::list_streaming_job_states(
5042 &inner,
5043 request,
5044 )
5045 .await
5046 };
5047 Box::pin(fut)
5048 }
5049 }
5050 let accept_compression_encodings = self.accept_compression_encodings;
5051 let send_compression_encodings = self.send_compression_encodings;
5052 let max_decoding_message_size = self.max_decoding_message_size;
5053 let max_encoding_message_size = self.max_encoding_message_size;
5054 let inner = self.inner.clone();
5055 let fut = async move {
5056 let method = ListStreamingJobStatesSvc(inner);
5057 let codec = tonic::codec::ProstCodec::default();
5058 let mut grpc = tonic::server::Grpc::new(codec)
5059 .apply_compression_config(
5060 accept_compression_encodings,
5061 send_compression_encodings,
5062 )
5063 .apply_max_message_size_config(
5064 max_decoding_message_size,
5065 max_encoding_message_size,
5066 );
5067 let res = grpc.unary(method, req).await;
5068 Ok(res)
5069 };
5070 Box::pin(fut)
5071 }
5072 "/meta.StreamManagerService/ListFragmentDistribution" => {
5073 #[allow(non_camel_case_types)]
5074 struct ListFragmentDistributionSvc<T: StreamManagerService>(
5075 pub Arc<T>,
5076 );
5077 impl<
5078 T: StreamManagerService,
5079 > tonic::server::UnaryService<super::ListFragmentDistributionRequest>
5080 for ListFragmentDistributionSvc<T> {
5081 type Response = super::ListFragmentDistributionResponse;
5082 type Future = BoxFuture<
5083 tonic::Response<Self::Response>,
5084 tonic::Status,
5085 >;
5086 fn call(
5087 &mut self,
5088 request: tonic::Request<
5089 super::ListFragmentDistributionRequest,
5090 >,
5091 ) -> Self::Future {
5092 let inner = Arc::clone(&self.0);
5093 let fut = async move {
5094 <T as StreamManagerService>::list_fragment_distribution(
5095 &inner,
5096 request,
5097 )
5098 .await
5099 };
5100 Box::pin(fut)
5101 }
5102 }
5103 let accept_compression_encodings = self.accept_compression_encodings;
5104 let send_compression_encodings = self.send_compression_encodings;
5105 let max_decoding_message_size = self.max_decoding_message_size;
5106 let max_encoding_message_size = self.max_encoding_message_size;
5107 let inner = self.inner.clone();
5108 let fut = async move {
5109 let method = ListFragmentDistributionSvc(inner);
5110 let codec = tonic::codec::ProstCodec::default();
5111 let mut grpc = tonic::server::Grpc::new(codec)
5112 .apply_compression_config(
5113 accept_compression_encodings,
5114 send_compression_encodings,
5115 )
5116 .apply_max_message_size_config(
5117 max_decoding_message_size,
5118 max_encoding_message_size,
5119 );
5120 let res = grpc.unary(method, req).await;
5121 Ok(res)
5122 };
5123 Box::pin(fut)
5124 }
5125 "/meta.StreamManagerService/ListCreatingFragmentDistribution" => {
5126 #[allow(non_camel_case_types)]
5127 struct ListCreatingFragmentDistributionSvc<T: StreamManagerService>(
5128 pub Arc<T>,
5129 );
5130 impl<
5131 T: StreamManagerService,
5132 > tonic::server::UnaryService<
5133 super::ListCreatingFragmentDistributionRequest,
5134 > for ListCreatingFragmentDistributionSvc<T> {
5135 type Response = super::ListCreatingFragmentDistributionResponse;
5136 type Future = BoxFuture<
5137 tonic::Response<Self::Response>,
5138 tonic::Status,
5139 >;
5140 fn call(
5141 &mut self,
5142 request: tonic::Request<
5143 super::ListCreatingFragmentDistributionRequest,
5144 >,
5145 ) -> Self::Future {
5146 let inner = Arc::clone(&self.0);
5147 let fut = async move {
5148 <T as StreamManagerService>::list_creating_fragment_distribution(
5149 &inner,
5150 request,
5151 )
5152 .await
5153 };
5154 Box::pin(fut)
5155 }
5156 }
5157 let accept_compression_encodings = self.accept_compression_encodings;
5158 let send_compression_encodings = self.send_compression_encodings;
5159 let max_decoding_message_size = self.max_decoding_message_size;
5160 let max_encoding_message_size = self.max_encoding_message_size;
5161 let inner = self.inner.clone();
5162 let fut = async move {
5163 let method = ListCreatingFragmentDistributionSvc(inner);
5164 let codec = tonic::codec::ProstCodec::default();
5165 let mut grpc = tonic::server::Grpc::new(codec)
5166 .apply_compression_config(
5167 accept_compression_encodings,
5168 send_compression_encodings,
5169 )
5170 .apply_max_message_size_config(
5171 max_decoding_message_size,
5172 max_encoding_message_size,
5173 );
5174 let res = grpc.unary(method, req).await;
5175 Ok(res)
5176 };
5177 Box::pin(fut)
5178 }
5179 "/meta.StreamManagerService/ListActorStates" => {
5180 #[allow(non_camel_case_types)]
5181 struct ListActorStatesSvc<T: StreamManagerService>(pub Arc<T>);
5182 impl<
5183 T: StreamManagerService,
5184 > tonic::server::UnaryService<super::ListActorStatesRequest>
5185 for ListActorStatesSvc<T> {
5186 type Response = super::ListActorStatesResponse;
5187 type Future = BoxFuture<
5188 tonic::Response<Self::Response>,
5189 tonic::Status,
5190 >;
5191 fn call(
5192 &mut self,
5193 request: tonic::Request<super::ListActorStatesRequest>,
5194 ) -> Self::Future {
5195 let inner = Arc::clone(&self.0);
5196 let fut = async move {
5197 <T as StreamManagerService>::list_actor_states(
5198 &inner,
5199 request,
5200 )
5201 .await
5202 };
5203 Box::pin(fut)
5204 }
5205 }
5206 let accept_compression_encodings = self.accept_compression_encodings;
5207 let send_compression_encodings = self.send_compression_encodings;
5208 let max_decoding_message_size = self.max_decoding_message_size;
5209 let max_encoding_message_size = self.max_encoding_message_size;
5210 let inner = self.inner.clone();
5211 let fut = async move {
5212 let method = ListActorStatesSvc(inner);
5213 let codec = tonic::codec::ProstCodec::default();
5214 let mut grpc = tonic::server::Grpc::new(codec)
5215 .apply_compression_config(
5216 accept_compression_encodings,
5217 send_compression_encodings,
5218 )
5219 .apply_max_message_size_config(
5220 max_decoding_message_size,
5221 max_encoding_message_size,
5222 );
5223 let res = grpc.unary(method, req).await;
5224 Ok(res)
5225 };
5226 Box::pin(fut)
5227 }
5228 "/meta.StreamManagerService/ListActorSplits" => {
5229 #[allow(non_camel_case_types)]
5230 struct ListActorSplitsSvc<T: StreamManagerService>(pub Arc<T>);
5231 impl<
5232 T: StreamManagerService,
5233 > tonic::server::UnaryService<super::ListActorSplitsRequest>
5234 for ListActorSplitsSvc<T> {
5235 type Response = super::ListActorSplitsResponse;
5236 type Future = BoxFuture<
5237 tonic::Response<Self::Response>,
5238 tonic::Status,
5239 >;
5240 fn call(
5241 &mut self,
5242 request: tonic::Request<super::ListActorSplitsRequest>,
5243 ) -> Self::Future {
5244 let inner = Arc::clone(&self.0);
5245 let fut = async move {
5246 <T as StreamManagerService>::list_actor_splits(
5247 &inner,
5248 request,
5249 )
5250 .await
5251 };
5252 Box::pin(fut)
5253 }
5254 }
5255 let accept_compression_encodings = self.accept_compression_encodings;
5256 let send_compression_encodings = self.send_compression_encodings;
5257 let max_decoding_message_size = self.max_decoding_message_size;
5258 let max_encoding_message_size = self.max_encoding_message_size;
5259 let inner = self.inner.clone();
5260 let fut = async move {
5261 let method = ListActorSplitsSvc(inner);
5262 let codec = tonic::codec::ProstCodec::default();
5263 let mut grpc = tonic::server::Grpc::new(codec)
5264 .apply_compression_config(
5265 accept_compression_encodings,
5266 send_compression_encodings,
5267 )
5268 .apply_max_message_size_config(
5269 max_decoding_message_size,
5270 max_encoding_message_size,
5271 );
5272 let res = grpc.unary(method, req).await;
5273 Ok(res)
5274 };
5275 Box::pin(fut)
5276 }
5277 "/meta.StreamManagerService/ListObjectDependencies" => {
5278 #[allow(non_camel_case_types)]
5279 struct ListObjectDependenciesSvc<T: StreamManagerService>(
5280 pub Arc<T>,
5281 );
5282 impl<
5283 T: StreamManagerService,
5284 > tonic::server::UnaryService<super::ListObjectDependenciesRequest>
5285 for ListObjectDependenciesSvc<T> {
5286 type Response = super::ListObjectDependenciesResponse;
5287 type Future = BoxFuture<
5288 tonic::Response<Self::Response>,
5289 tonic::Status,
5290 >;
5291 fn call(
5292 &mut self,
5293 request: tonic::Request<super::ListObjectDependenciesRequest>,
5294 ) -> Self::Future {
5295 let inner = Arc::clone(&self.0);
5296 let fut = async move {
5297 <T as StreamManagerService>::list_object_dependencies(
5298 &inner,
5299 request,
5300 )
5301 .await
5302 };
5303 Box::pin(fut)
5304 }
5305 }
5306 let accept_compression_encodings = self.accept_compression_encodings;
5307 let send_compression_encodings = self.send_compression_encodings;
5308 let max_decoding_message_size = self.max_decoding_message_size;
5309 let max_encoding_message_size = self.max_encoding_message_size;
5310 let inner = self.inner.clone();
5311 let fut = async move {
5312 let method = ListObjectDependenciesSvc(inner);
5313 let codec = tonic::codec::ProstCodec::default();
5314 let mut grpc = tonic::server::Grpc::new(codec)
5315 .apply_compression_config(
5316 accept_compression_encodings,
5317 send_compression_encodings,
5318 )
5319 .apply_max_message_size_config(
5320 max_decoding_message_size,
5321 max_encoding_message_size,
5322 );
5323 let res = grpc.unary(method, req).await;
5324 Ok(res)
5325 };
5326 Box::pin(fut)
5327 }
5328 "/meta.StreamManagerService/ApplyThrottle" => {
5329 #[allow(non_camel_case_types)]
5330 struct ApplyThrottleSvc<T: StreamManagerService>(pub Arc<T>);
5331 impl<
5332 T: StreamManagerService,
5333 > tonic::server::UnaryService<super::ApplyThrottleRequest>
5334 for ApplyThrottleSvc<T> {
5335 type Response = super::ApplyThrottleResponse;
5336 type Future = BoxFuture<
5337 tonic::Response<Self::Response>,
5338 tonic::Status,
5339 >;
5340 fn call(
5341 &mut self,
5342 request: tonic::Request<super::ApplyThrottleRequest>,
5343 ) -> Self::Future {
5344 let inner = Arc::clone(&self.0);
5345 let fut = async move {
5346 <T as StreamManagerService>::apply_throttle(&inner, request)
5347 .await
5348 };
5349 Box::pin(fut)
5350 }
5351 }
5352 let accept_compression_encodings = self.accept_compression_encodings;
5353 let send_compression_encodings = self.send_compression_encodings;
5354 let max_decoding_message_size = self.max_decoding_message_size;
5355 let max_encoding_message_size = self.max_encoding_message_size;
5356 let inner = self.inner.clone();
5357 let fut = async move {
5358 let method = ApplyThrottleSvc(inner);
5359 let codec = tonic::codec::ProstCodec::default();
5360 let mut grpc = tonic::server::Grpc::new(codec)
5361 .apply_compression_config(
5362 accept_compression_encodings,
5363 send_compression_encodings,
5364 )
5365 .apply_max_message_size_config(
5366 max_decoding_message_size,
5367 max_encoding_message_size,
5368 );
5369 let res = grpc.unary(method, req).await;
5370 Ok(res)
5371 };
5372 Box::pin(fut)
5373 }
5374 "/meta.StreamManagerService/Recover" => {
5375 #[allow(non_camel_case_types)]
5376 struct RecoverSvc<T: StreamManagerService>(pub Arc<T>);
5377 impl<
5378 T: StreamManagerService,
5379 > tonic::server::UnaryService<super::RecoverRequest>
5380 for RecoverSvc<T> {
5381 type Response = super::RecoverResponse;
5382 type Future = BoxFuture<
5383 tonic::Response<Self::Response>,
5384 tonic::Status,
5385 >;
5386 fn call(
5387 &mut self,
5388 request: tonic::Request<super::RecoverRequest>,
5389 ) -> Self::Future {
5390 let inner = Arc::clone(&self.0);
5391 let fut = async move {
5392 <T as StreamManagerService>::recover(&inner, request).await
5393 };
5394 Box::pin(fut)
5395 }
5396 }
5397 let accept_compression_encodings = self.accept_compression_encodings;
5398 let send_compression_encodings = self.send_compression_encodings;
5399 let max_decoding_message_size = self.max_decoding_message_size;
5400 let max_encoding_message_size = self.max_encoding_message_size;
5401 let inner = self.inner.clone();
5402 let fut = async move {
5403 let method = RecoverSvc(inner);
5404 let codec = tonic::codec::ProstCodec::default();
5405 let mut grpc = tonic::server::Grpc::new(codec)
5406 .apply_compression_config(
5407 accept_compression_encodings,
5408 send_compression_encodings,
5409 )
5410 .apply_max_message_size_config(
5411 max_decoding_message_size,
5412 max_encoding_message_size,
5413 );
5414 let res = grpc.unary(method, req).await;
5415 Ok(res)
5416 };
5417 Box::pin(fut)
5418 }
5419 "/meta.StreamManagerService/ListRateLimits" => {
5420 #[allow(non_camel_case_types)]
5421 struct ListRateLimitsSvc<T: StreamManagerService>(pub Arc<T>);
5422 impl<
5423 T: StreamManagerService,
5424 > tonic::server::UnaryService<super::ListRateLimitsRequest>
5425 for ListRateLimitsSvc<T> {
5426 type Response = super::ListRateLimitsResponse;
5427 type Future = BoxFuture<
5428 tonic::Response<Self::Response>,
5429 tonic::Status,
5430 >;
5431 fn call(
5432 &mut self,
5433 request: tonic::Request<super::ListRateLimitsRequest>,
5434 ) -> Self::Future {
5435 let inner = Arc::clone(&self.0);
5436 let fut = async move {
5437 <T as StreamManagerService>::list_rate_limits(
5438 &inner,
5439 request,
5440 )
5441 .await
5442 };
5443 Box::pin(fut)
5444 }
5445 }
5446 let accept_compression_encodings = self.accept_compression_encodings;
5447 let send_compression_encodings = self.send_compression_encodings;
5448 let max_decoding_message_size = self.max_decoding_message_size;
5449 let max_encoding_message_size = self.max_encoding_message_size;
5450 let inner = self.inner.clone();
5451 let fut = async move {
5452 let method = ListRateLimitsSvc(inner);
5453 let codec = tonic::codec::ProstCodec::default();
5454 let mut grpc = tonic::server::Grpc::new(codec)
5455 .apply_compression_config(
5456 accept_compression_encodings,
5457 send_compression_encodings,
5458 )
5459 .apply_max_message_size_config(
5460 max_decoding_message_size,
5461 max_encoding_message_size,
5462 );
5463 let res = grpc.unary(method, req).await;
5464 Ok(res)
5465 };
5466 Box::pin(fut)
5467 }
5468 "/meta.StreamManagerService/AlterConnectorProps" => {
5469 #[allow(non_camel_case_types)]
5470 struct AlterConnectorPropsSvc<T: StreamManagerService>(pub Arc<T>);
5471 impl<
5472 T: StreamManagerService,
5473 > tonic::server::UnaryService<super::AlterConnectorPropsRequest>
5474 for AlterConnectorPropsSvc<T> {
5475 type Response = super::AlterConnectorPropsResponse;
5476 type Future = BoxFuture<
5477 tonic::Response<Self::Response>,
5478 tonic::Status,
5479 >;
5480 fn call(
5481 &mut self,
5482 request: tonic::Request<super::AlterConnectorPropsRequest>,
5483 ) -> Self::Future {
5484 let inner = Arc::clone(&self.0);
5485 let fut = async move {
5486 <T as StreamManagerService>::alter_connector_props(
5487 &inner,
5488 request,
5489 )
5490 .await
5491 };
5492 Box::pin(fut)
5493 }
5494 }
5495 let accept_compression_encodings = self.accept_compression_encodings;
5496 let send_compression_encodings = self.send_compression_encodings;
5497 let max_decoding_message_size = self.max_decoding_message_size;
5498 let max_encoding_message_size = self.max_encoding_message_size;
5499 let inner = self.inner.clone();
5500 let fut = async move {
5501 let method = AlterConnectorPropsSvc(inner);
5502 let codec = tonic::codec::ProstCodec::default();
5503 let mut grpc = tonic::server::Grpc::new(codec)
5504 .apply_compression_config(
5505 accept_compression_encodings,
5506 send_compression_encodings,
5507 )
5508 .apply_max_message_size_config(
5509 max_decoding_message_size,
5510 max_encoding_message_size,
5511 );
5512 let res = grpc.unary(method, req).await;
5513 Ok(res)
5514 };
5515 Box::pin(fut)
5516 }
5517 "/meta.StreamManagerService/GetFragmentById" => {
5518 #[allow(non_camel_case_types)]
5519 struct GetFragmentByIdSvc<T: StreamManagerService>(pub Arc<T>);
5520 impl<
5521 T: StreamManagerService,
5522 > tonic::server::UnaryService<super::GetFragmentByIdRequest>
5523 for GetFragmentByIdSvc<T> {
5524 type Response = super::GetFragmentByIdResponse;
5525 type Future = BoxFuture<
5526 tonic::Response<Self::Response>,
5527 tonic::Status,
5528 >;
5529 fn call(
5530 &mut self,
5531 request: tonic::Request<super::GetFragmentByIdRequest>,
5532 ) -> Self::Future {
5533 let inner = Arc::clone(&self.0);
5534 let fut = async move {
5535 <T as StreamManagerService>::get_fragment_by_id(
5536 &inner,
5537 request,
5538 )
5539 .await
5540 };
5541 Box::pin(fut)
5542 }
5543 }
5544 let accept_compression_encodings = self.accept_compression_encodings;
5545 let send_compression_encodings = self.send_compression_encodings;
5546 let max_decoding_message_size = self.max_decoding_message_size;
5547 let max_encoding_message_size = self.max_encoding_message_size;
5548 let inner = self.inner.clone();
5549 let fut = async move {
5550 let method = GetFragmentByIdSvc(inner);
5551 let codec = tonic::codec::ProstCodec::default();
5552 let mut grpc = tonic::server::Grpc::new(codec)
5553 .apply_compression_config(
5554 accept_compression_encodings,
5555 send_compression_encodings,
5556 )
5557 .apply_max_message_size_config(
5558 max_decoding_message_size,
5559 max_encoding_message_size,
5560 );
5561 let res = grpc.unary(method, req).await;
5562 Ok(res)
5563 };
5564 Box::pin(fut)
5565 }
5566 "/meta.StreamManagerService/SetSyncLogStoreAligned" => {
5567 #[allow(non_camel_case_types)]
5568 struct SetSyncLogStoreAlignedSvc<T: StreamManagerService>(
5569 pub Arc<T>,
5570 );
5571 impl<
5572 T: StreamManagerService,
5573 > tonic::server::UnaryService<super::SetSyncLogStoreAlignedRequest>
5574 for SetSyncLogStoreAlignedSvc<T> {
5575 type Response = super::SetSyncLogStoreAlignedResponse;
5576 type Future = BoxFuture<
5577 tonic::Response<Self::Response>,
5578 tonic::Status,
5579 >;
5580 fn call(
5581 &mut self,
5582 request: tonic::Request<super::SetSyncLogStoreAlignedRequest>,
5583 ) -> Self::Future {
5584 let inner = Arc::clone(&self.0);
5585 let fut = async move {
5586 <T as StreamManagerService>::set_sync_log_store_aligned(
5587 &inner,
5588 request,
5589 )
5590 .await
5591 };
5592 Box::pin(fut)
5593 }
5594 }
5595 let accept_compression_encodings = self.accept_compression_encodings;
5596 let send_compression_encodings = self.send_compression_encodings;
5597 let max_decoding_message_size = self.max_decoding_message_size;
5598 let max_encoding_message_size = self.max_encoding_message_size;
5599 let inner = self.inner.clone();
5600 let fut = async move {
5601 let method = SetSyncLogStoreAlignedSvc(inner);
5602 let codec = tonic::codec::ProstCodec::default();
5603 let mut grpc = tonic::server::Grpc::new(codec)
5604 .apply_compression_config(
5605 accept_compression_encodings,
5606 send_compression_encodings,
5607 )
5608 .apply_max_message_size_config(
5609 max_decoding_message_size,
5610 max_encoding_message_size,
5611 );
5612 let res = grpc.unary(method, req).await;
5613 Ok(res)
5614 };
5615 Box::pin(fut)
5616 }
5617 "/meta.StreamManagerService/ListCdcProgress" => {
5618 #[allow(non_camel_case_types)]
5619 struct ListCdcProgressSvc<T: StreamManagerService>(pub Arc<T>);
5620 impl<
5621 T: StreamManagerService,
5622 > tonic::server::UnaryService<super::ListCdcProgressRequest>
5623 for ListCdcProgressSvc<T> {
5624 type Response = super::ListCdcProgressResponse;
5625 type Future = BoxFuture<
5626 tonic::Response<Self::Response>,
5627 tonic::Status,
5628 >;
5629 fn call(
5630 &mut self,
5631 request: tonic::Request<super::ListCdcProgressRequest>,
5632 ) -> Self::Future {
5633 let inner = Arc::clone(&self.0);
5634 let fut = async move {
5635 <T as StreamManagerService>::list_cdc_progress(
5636 &inner,
5637 request,
5638 )
5639 .await
5640 };
5641 Box::pin(fut)
5642 }
5643 }
5644 let accept_compression_encodings = self.accept_compression_encodings;
5645 let send_compression_encodings = self.send_compression_encodings;
5646 let max_decoding_message_size = self.max_decoding_message_size;
5647 let max_encoding_message_size = self.max_encoding_message_size;
5648 let inner = self.inner.clone();
5649 let fut = async move {
5650 let method = ListCdcProgressSvc(inner);
5651 let codec = tonic::codec::ProstCodec::default();
5652 let mut grpc = tonic::server::Grpc::new(codec)
5653 .apply_compression_config(
5654 accept_compression_encodings,
5655 send_compression_encodings,
5656 )
5657 .apply_max_message_size_config(
5658 max_decoding_message_size,
5659 max_encoding_message_size,
5660 );
5661 let res = grpc.unary(method, req).await;
5662 Ok(res)
5663 };
5664 Box::pin(fut)
5665 }
5666 _ => {
5667 Box::pin(async move {
5668 let mut response = http::Response::new(empty_body());
5669 let headers = response.headers_mut();
5670 headers
5671 .insert(
5672 tonic::Status::GRPC_STATUS,
5673 (tonic::Code::Unimplemented as i32).into(),
5674 );
5675 headers
5676 .insert(
5677 http::header::CONTENT_TYPE,
5678 tonic::metadata::GRPC_CONTENT_TYPE,
5679 );
5680 Ok(response)
5681 })
5682 }
5683 }
5684 }
5685 }
5686 impl<T> Clone for StreamManagerServiceServer<T> {
5687 fn clone(&self) -> Self {
5688 let inner = self.inner.clone();
5689 Self {
5690 inner,
5691 accept_compression_encodings: self.accept_compression_encodings,
5692 send_compression_encodings: self.send_compression_encodings,
5693 max_decoding_message_size: self.max_decoding_message_size,
5694 max_encoding_message_size: self.max_encoding_message_size,
5695 }
5696 }
5697 }
5698 pub const SERVICE_NAME: &str = "meta.StreamManagerService";
5700 impl<T> tonic::server::NamedService for StreamManagerServiceServer<T> {
5701 const NAME: &'static str = SERVICE_NAME;
5702 }
5703}
5704pub mod cluster_service_server {
5706 #![allow(
5707 unused_variables,
5708 dead_code,
5709 missing_docs,
5710 clippy::wildcard_imports,
5711 clippy::let_unit_value,
5712 )]
5713 use tonic::codegen::*;
5714 #[async_trait]
5716 pub trait ClusterService: std::marker::Send + std::marker::Sync + 'static {
5717 async fn add_worker_node(
5718 &self,
5719 request: tonic::Request<super::AddWorkerNodeRequest>,
5720 ) -> std::result::Result<
5721 tonic::Response<super::AddWorkerNodeResponse>,
5722 tonic::Status,
5723 >;
5724 async fn activate_worker_node(
5725 &self,
5726 request: tonic::Request<super::ActivateWorkerNodeRequest>,
5727 ) -> std::result::Result<
5728 tonic::Response<super::ActivateWorkerNodeResponse>,
5729 tonic::Status,
5730 >;
5731 async fn delete_worker_node(
5732 &self,
5733 request: tonic::Request<super::DeleteWorkerNodeRequest>,
5734 ) -> std::result::Result<
5735 tonic::Response<super::DeleteWorkerNodeResponse>,
5736 tonic::Status,
5737 >;
5738 async fn update_worker_node_schedulability(
5739 &self,
5740 request: tonic::Request<super::UpdateWorkerNodeSchedulabilityRequest>,
5741 ) -> std::result::Result<
5742 tonic::Response<super::UpdateWorkerNodeSchedulabilityResponse>,
5743 tonic::Status,
5744 >;
5745 async fn list_all_nodes(
5746 &self,
5747 request: tonic::Request<super::ListAllNodesRequest>,
5748 ) -> std::result::Result<
5749 tonic::Response<super::ListAllNodesResponse>,
5750 tonic::Status,
5751 >;
5752 async fn get_cluster_recovery_status(
5753 &self,
5754 request: tonic::Request<super::GetClusterRecoveryStatusRequest>,
5755 ) -> std::result::Result<
5756 tonic::Response<super::GetClusterRecoveryStatusResponse>,
5757 tonic::Status,
5758 >;
5759 async fn get_meta_store_info(
5760 &self,
5761 request: tonic::Request<super::GetMetaStoreInfoRequest>,
5762 ) -> std::result::Result<
5763 tonic::Response<super::GetMetaStoreInfoResponse>,
5764 tonic::Status,
5765 >;
5766 }
5767 #[derive(Debug)]
5768 pub struct ClusterServiceServer<T> {
5769 inner: Arc<T>,
5770 accept_compression_encodings: EnabledCompressionEncodings,
5771 send_compression_encodings: EnabledCompressionEncodings,
5772 max_decoding_message_size: Option<usize>,
5773 max_encoding_message_size: Option<usize>,
5774 }
5775 impl<T> ClusterServiceServer<T> {
5776 pub fn new(inner: T) -> Self {
5777 Self::from_arc(Arc::new(inner))
5778 }
5779 pub fn from_arc(inner: Arc<T>) -> Self {
5780 Self {
5781 inner,
5782 accept_compression_encodings: Default::default(),
5783 send_compression_encodings: Default::default(),
5784 max_decoding_message_size: None,
5785 max_encoding_message_size: None,
5786 }
5787 }
5788 pub fn with_interceptor<F>(
5789 inner: T,
5790 interceptor: F,
5791 ) -> InterceptedService<Self, F>
5792 where
5793 F: tonic::service::Interceptor,
5794 {
5795 InterceptedService::new(Self::new(inner), interceptor)
5796 }
5797 #[must_use]
5799 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
5800 self.accept_compression_encodings.enable(encoding);
5801 self
5802 }
5803 #[must_use]
5805 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
5806 self.send_compression_encodings.enable(encoding);
5807 self
5808 }
5809 #[must_use]
5813 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
5814 self.max_decoding_message_size = Some(limit);
5815 self
5816 }
5817 #[must_use]
5821 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
5822 self.max_encoding_message_size = Some(limit);
5823 self
5824 }
5825 }
5826 impl<T, B> tonic::codegen::Service<http::Request<B>> for ClusterServiceServer<T>
5827 where
5828 T: ClusterService,
5829 B: Body + std::marker::Send + 'static,
5830 B::Error: Into<StdError> + std::marker::Send + 'static,
5831 {
5832 type Response = http::Response<tonic::body::BoxBody>;
5833 type Error = std::convert::Infallible;
5834 type Future = BoxFuture<Self::Response, Self::Error>;
5835 fn poll_ready(
5836 &mut self,
5837 _cx: &mut Context<'_>,
5838 ) -> Poll<std::result::Result<(), Self::Error>> {
5839 Poll::Ready(Ok(()))
5840 }
5841 fn call(&mut self, req: http::Request<B>) -> Self::Future {
5842 match req.uri().path() {
5843 "/meta.ClusterService/AddWorkerNode" => {
5844 #[allow(non_camel_case_types)]
5845 struct AddWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
5846 impl<
5847 T: ClusterService,
5848 > tonic::server::UnaryService<super::AddWorkerNodeRequest>
5849 for AddWorkerNodeSvc<T> {
5850 type Response = super::AddWorkerNodeResponse;
5851 type Future = BoxFuture<
5852 tonic::Response<Self::Response>,
5853 tonic::Status,
5854 >;
5855 fn call(
5856 &mut self,
5857 request: tonic::Request<super::AddWorkerNodeRequest>,
5858 ) -> Self::Future {
5859 let inner = Arc::clone(&self.0);
5860 let fut = async move {
5861 <T as ClusterService>::add_worker_node(&inner, request)
5862 .await
5863 };
5864 Box::pin(fut)
5865 }
5866 }
5867 let accept_compression_encodings = self.accept_compression_encodings;
5868 let send_compression_encodings = self.send_compression_encodings;
5869 let max_decoding_message_size = self.max_decoding_message_size;
5870 let max_encoding_message_size = self.max_encoding_message_size;
5871 let inner = self.inner.clone();
5872 let fut = async move {
5873 let method = AddWorkerNodeSvc(inner);
5874 let codec = tonic::codec::ProstCodec::default();
5875 let mut grpc = tonic::server::Grpc::new(codec)
5876 .apply_compression_config(
5877 accept_compression_encodings,
5878 send_compression_encodings,
5879 )
5880 .apply_max_message_size_config(
5881 max_decoding_message_size,
5882 max_encoding_message_size,
5883 );
5884 let res = grpc.unary(method, req).await;
5885 Ok(res)
5886 };
5887 Box::pin(fut)
5888 }
5889 "/meta.ClusterService/ActivateWorkerNode" => {
5890 #[allow(non_camel_case_types)]
5891 struct ActivateWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
5892 impl<
5893 T: ClusterService,
5894 > tonic::server::UnaryService<super::ActivateWorkerNodeRequest>
5895 for ActivateWorkerNodeSvc<T> {
5896 type Response = super::ActivateWorkerNodeResponse;
5897 type Future = BoxFuture<
5898 tonic::Response<Self::Response>,
5899 tonic::Status,
5900 >;
5901 fn call(
5902 &mut self,
5903 request: tonic::Request<super::ActivateWorkerNodeRequest>,
5904 ) -> Self::Future {
5905 let inner = Arc::clone(&self.0);
5906 let fut = async move {
5907 <T as ClusterService>::activate_worker_node(&inner, request)
5908 .await
5909 };
5910 Box::pin(fut)
5911 }
5912 }
5913 let accept_compression_encodings = self.accept_compression_encodings;
5914 let send_compression_encodings = self.send_compression_encodings;
5915 let max_decoding_message_size = self.max_decoding_message_size;
5916 let max_encoding_message_size = self.max_encoding_message_size;
5917 let inner = self.inner.clone();
5918 let fut = async move {
5919 let method = ActivateWorkerNodeSvc(inner);
5920 let codec = tonic::codec::ProstCodec::default();
5921 let mut grpc = tonic::server::Grpc::new(codec)
5922 .apply_compression_config(
5923 accept_compression_encodings,
5924 send_compression_encodings,
5925 )
5926 .apply_max_message_size_config(
5927 max_decoding_message_size,
5928 max_encoding_message_size,
5929 );
5930 let res = grpc.unary(method, req).await;
5931 Ok(res)
5932 };
5933 Box::pin(fut)
5934 }
5935 "/meta.ClusterService/DeleteWorkerNode" => {
5936 #[allow(non_camel_case_types)]
5937 struct DeleteWorkerNodeSvc<T: ClusterService>(pub Arc<T>);
5938 impl<
5939 T: ClusterService,
5940 > tonic::server::UnaryService<super::DeleteWorkerNodeRequest>
5941 for DeleteWorkerNodeSvc<T> {
5942 type Response = super::DeleteWorkerNodeResponse;
5943 type Future = BoxFuture<
5944 tonic::Response<Self::Response>,
5945 tonic::Status,
5946 >;
5947 fn call(
5948 &mut self,
5949 request: tonic::Request<super::DeleteWorkerNodeRequest>,
5950 ) -> Self::Future {
5951 let inner = Arc::clone(&self.0);
5952 let fut = async move {
5953 <T as ClusterService>::delete_worker_node(&inner, request)
5954 .await
5955 };
5956 Box::pin(fut)
5957 }
5958 }
5959 let accept_compression_encodings = self.accept_compression_encodings;
5960 let send_compression_encodings = self.send_compression_encodings;
5961 let max_decoding_message_size = self.max_decoding_message_size;
5962 let max_encoding_message_size = self.max_encoding_message_size;
5963 let inner = self.inner.clone();
5964 let fut = async move {
5965 let method = DeleteWorkerNodeSvc(inner);
5966 let codec = tonic::codec::ProstCodec::default();
5967 let mut grpc = tonic::server::Grpc::new(codec)
5968 .apply_compression_config(
5969 accept_compression_encodings,
5970 send_compression_encodings,
5971 )
5972 .apply_max_message_size_config(
5973 max_decoding_message_size,
5974 max_encoding_message_size,
5975 );
5976 let res = grpc.unary(method, req).await;
5977 Ok(res)
5978 };
5979 Box::pin(fut)
5980 }
5981 "/meta.ClusterService/UpdateWorkerNodeSchedulability" => {
5982 #[allow(non_camel_case_types)]
5983 struct UpdateWorkerNodeSchedulabilitySvc<T: ClusterService>(
5984 pub Arc<T>,
5985 );
5986 impl<
5987 T: ClusterService,
5988 > tonic::server::UnaryService<
5989 super::UpdateWorkerNodeSchedulabilityRequest,
5990 > for UpdateWorkerNodeSchedulabilitySvc<T> {
5991 type Response = super::UpdateWorkerNodeSchedulabilityResponse;
5992 type Future = BoxFuture<
5993 tonic::Response<Self::Response>,
5994 tonic::Status,
5995 >;
5996 fn call(
5997 &mut self,
5998 request: tonic::Request<
5999 super::UpdateWorkerNodeSchedulabilityRequest,
6000 >,
6001 ) -> Self::Future {
6002 let inner = Arc::clone(&self.0);
6003 let fut = async move {
6004 <T as ClusterService>::update_worker_node_schedulability(
6005 &inner,
6006 request,
6007 )
6008 .await
6009 };
6010 Box::pin(fut)
6011 }
6012 }
6013 let accept_compression_encodings = self.accept_compression_encodings;
6014 let send_compression_encodings = self.send_compression_encodings;
6015 let max_decoding_message_size = self.max_decoding_message_size;
6016 let max_encoding_message_size = self.max_encoding_message_size;
6017 let inner = self.inner.clone();
6018 let fut = async move {
6019 let method = UpdateWorkerNodeSchedulabilitySvc(inner);
6020 let codec = tonic::codec::ProstCodec::default();
6021 let mut grpc = tonic::server::Grpc::new(codec)
6022 .apply_compression_config(
6023 accept_compression_encodings,
6024 send_compression_encodings,
6025 )
6026 .apply_max_message_size_config(
6027 max_decoding_message_size,
6028 max_encoding_message_size,
6029 );
6030 let res = grpc.unary(method, req).await;
6031 Ok(res)
6032 };
6033 Box::pin(fut)
6034 }
6035 "/meta.ClusterService/ListAllNodes" => {
6036 #[allow(non_camel_case_types)]
6037 struct ListAllNodesSvc<T: ClusterService>(pub Arc<T>);
6038 impl<
6039 T: ClusterService,
6040 > tonic::server::UnaryService<super::ListAllNodesRequest>
6041 for ListAllNodesSvc<T> {
6042 type Response = super::ListAllNodesResponse;
6043 type Future = BoxFuture<
6044 tonic::Response<Self::Response>,
6045 tonic::Status,
6046 >;
6047 fn call(
6048 &mut self,
6049 request: tonic::Request<super::ListAllNodesRequest>,
6050 ) -> Self::Future {
6051 let inner = Arc::clone(&self.0);
6052 let fut = async move {
6053 <T as ClusterService>::list_all_nodes(&inner, request).await
6054 };
6055 Box::pin(fut)
6056 }
6057 }
6058 let accept_compression_encodings = self.accept_compression_encodings;
6059 let send_compression_encodings = self.send_compression_encodings;
6060 let max_decoding_message_size = self.max_decoding_message_size;
6061 let max_encoding_message_size = self.max_encoding_message_size;
6062 let inner = self.inner.clone();
6063 let fut = async move {
6064 let method = ListAllNodesSvc(inner);
6065 let codec = tonic::codec::ProstCodec::default();
6066 let mut grpc = tonic::server::Grpc::new(codec)
6067 .apply_compression_config(
6068 accept_compression_encodings,
6069 send_compression_encodings,
6070 )
6071 .apply_max_message_size_config(
6072 max_decoding_message_size,
6073 max_encoding_message_size,
6074 );
6075 let res = grpc.unary(method, req).await;
6076 Ok(res)
6077 };
6078 Box::pin(fut)
6079 }
6080 "/meta.ClusterService/GetClusterRecoveryStatus" => {
6081 #[allow(non_camel_case_types)]
6082 struct GetClusterRecoveryStatusSvc<T: ClusterService>(pub Arc<T>);
6083 impl<
6084 T: ClusterService,
6085 > tonic::server::UnaryService<super::GetClusterRecoveryStatusRequest>
6086 for GetClusterRecoveryStatusSvc<T> {
6087 type Response = super::GetClusterRecoveryStatusResponse;
6088 type Future = BoxFuture<
6089 tonic::Response<Self::Response>,
6090 tonic::Status,
6091 >;
6092 fn call(
6093 &mut self,
6094 request: tonic::Request<
6095 super::GetClusterRecoveryStatusRequest,
6096 >,
6097 ) -> Self::Future {
6098 let inner = Arc::clone(&self.0);
6099 let fut = async move {
6100 <T as ClusterService>::get_cluster_recovery_status(
6101 &inner,
6102 request,
6103 )
6104 .await
6105 };
6106 Box::pin(fut)
6107 }
6108 }
6109 let accept_compression_encodings = self.accept_compression_encodings;
6110 let send_compression_encodings = self.send_compression_encodings;
6111 let max_decoding_message_size = self.max_decoding_message_size;
6112 let max_encoding_message_size = self.max_encoding_message_size;
6113 let inner = self.inner.clone();
6114 let fut = async move {
6115 let method = GetClusterRecoveryStatusSvc(inner);
6116 let codec = tonic::codec::ProstCodec::default();
6117 let mut grpc = tonic::server::Grpc::new(codec)
6118 .apply_compression_config(
6119 accept_compression_encodings,
6120 send_compression_encodings,
6121 )
6122 .apply_max_message_size_config(
6123 max_decoding_message_size,
6124 max_encoding_message_size,
6125 );
6126 let res = grpc.unary(method, req).await;
6127 Ok(res)
6128 };
6129 Box::pin(fut)
6130 }
6131 "/meta.ClusterService/GetMetaStoreInfo" => {
6132 #[allow(non_camel_case_types)]
6133 struct GetMetaStoreInfoSvc<T: ClusterService>(pub Arc<T>);
6134 impl<
6135 T: ClusterService,
6136 > tonic::server::UnaryService<super::GetMetaStoreInfoRequest>
6137 for GetMetaStoreInfoSvc<T> {
6138 type Response = super::GetMetaStoreInfoResponse;
6139 type Future = BoxFuture<
6140 tonic::Response<Self::Response>,
6141 tonic::Status,
6142 >;
6143 fn call(
6144 &mut self,
6145 request: tonic::Request<super::GetMetaStoreInfoRequest>,
6146 ) -> Self::Future {
6147 let inner = Arc::clone(&self.0);
6148 let fut = async move {
6149 <T as ClusterService>::get_meta_store_info(&inner, request)
6150 .await
6151 };
6152 Box::pin(fut)
6153 }
6154 }
6155 let accept_compression_encodings = self.accept_compression_encodings;
6156 let send_compression_encodings = self.send_compression_encodings;
6157 let max_decoding_message_size = self.max_decoding_message_size;
6158 let max_encoding_message_size = self.max_encoding_message_size;
6159 let inner = self.inner.clone();
6160 let fut = async move {
6161 let method = GetMetaStoreInfoSvc(inner);
6162 let codec = tonic::codec::ProstCodec::default();
6163 let mut grpc = tonic::server::Grpc::new(codec)
6164 .apply_compression_config(
6165 accept_compression_encodings,
6166 send_compression_encodings,
6167 )
6168 .apply_max_message_size_config(
6169 max_decoding_message_size,
6170 max_encoding_message_size,
6171 );
6172 let res = grpc.unary(method, req).await;
6173 Ok(res)
6174 };
6175 Box::pin(fut)
6176 }
6177 _ => {
6178 Box::pin(async move {
6179 let mut response = http::Response::new(empty_body());
6180 let headers = response.headers_mut();
6181 headers
6182 .insert(
6183 tonic::Status::GRPC_STATUS,
6184 (tonic::Code::Unimplemented as i32).into(),
6185 );
6186 headers
6187 .insert(
6188 http::header::CONTENT_TYPE,
6189 tonic::metadata::GRPC_CONTENT_TYPE,
6190 );
6191 Ok(response)
6192 })
6193 }
6194 }
6195 }
6196 }
6197 impl<T> Clone for ClusterServiceServer<T> {
6198 fn clone(&self) -> Self {
6199 let inner = self.inner.clone();
6200 Self {
6201 inner,
6202 accept_compression_encodings: self.accept_compression_encodings,
6203 send_compression_encodings: self.send_compression_encodings,
6204 max_decoding_message_size: self.max_decoding_message_size,
6205 max_encoding_message_size: self.max_encoding_message_size,
6206 }
6207 }
6208 }
6209 pub const SERVICE_NAME: &str = "meta.ClusterService";
6211 impl<T> tonic::server::NamedService for ClusterServiceServer<T> {
6212 const NAME: &'static str = SERVICE_NAME;
6213 }
6214}
6215pub mod notification_service_server {
6217 #![allow(
6218 unused_variables,
6219 dead_code,
6220 missing_docs,
6221 clippy::wildcard_imports,
6222 clippy::let_unit_value,
6223 )]
6224 use tonic::codegen::*;
6225 #[async_trait]
6227 pub trait NotificationService: std::marker::Send + std::marker::Sync + 'static {
6228 type SubscribeStream: tonic::codegen::tokio_stream::Stream<
6230 Item = std::result::Result<super::SubscribeResponse, tonic::Status>,
6231 >
6232 + std::marker::Send
6233 + 'static;
6234 async fn subscribe(
6235 &self,
6236 request: tonic::Request<super::SubscribeRequest>,
6237 ) -> std::result::Result<tonic::Response<Self::SubscribeStream>, tonic::Status>;
6238 }
6239 #[derive(Debug)]
6240 pub struct NotificationServiceServer<T> {
6241 inner: Arc<T>,
6242 accept_compression_encodings: EnabledCompressionEncodings,
6243 send_compression_encodings: EnabledCompressionEncodings,
6244 max_decoding_message_size: Option<usize>,
6245 max_encoding_message_size: Option<usize>,
6246 }
6247 impl<T> NotificationServiceServer<T> {
6248 pub fn new(inner: T) -> Self {
6249 Self::from_arc(Arc::new(inner))
6250 }
6251 pub fn from_arc(inner: Arc<T>) -> Self {
6252 Self {
6253 inner,
6254 accept_compression_encodings: Default::default(),
6255 send_compression_encodings: Default::default(),
6256 max_decoding_message_size: None,
6257 max_encoding_message_size: None,
6258 }
6259 }
6260 pub fn with_interceptor<F>(
6261 inner: T,
6262 interceptor: F,
6263 ) -> InterceptedService<Self, F>
6264 where
6265 F: tonic::service::Interceptor,
6266 {
6267 InterceptedService::new(Self::new(inner), interceptor)
6268 }
6269 #[must_use]
6271 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6272 self.accept_compression_encodings.enable(encoding);
6273 self
6274 }
6275 #[must_use]
6277 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6278 self.send_compression_encodings.enable(encoding);
6279 self
6280 }
6281 #[must_use]
6285 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6286 self.max_decoding_message_size = Some(limit);
6287 self
6288 }
6289 #[must_use]
6293 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6294 self.max_encoding_message_size = Some(limit);
6295 self
6296 }
6297 }
6298 impl<T, B> tonic::codegen::Service<http::Request<B>> for NotificationServiceServer<T>
6299 where
6300 T: NotificationService,
6301 B: Body + std::marker::Send + 'static,
6302 B::Error: Into<StdError> + std::marker::Send + 'static,
6303 {
6304 type Response = http::Response<tonic::body::BoxBody>;
6305 type Error = std::convert::Infallible;
6306 type Future = BoxFuture<Self::Response, Self::Error>;
6307 fn poll_ready(
6308 &mut self,
6309 _cx: &mut Context<'_>,
6310 ) -> Poll<std::result::Result<(), Self::Error>> {
6311 Poll::Ready(Ok(()))
6312 }
6313 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6314 match req.uri().path() {
6315 "/meta.NotificationService/Subscribe" => {
6316 #[allow(non_camel_case_types)]
6317 struct SubscribeSvc<T: NotificationService>(pub Arc<T>);
6318 impl<
6319 T: NotificationService,
6320 > tonic::server::ServerStreamingService<super::SubscribeRequest>
6321 for SubscribeSvc<T> {
6322 type Response = super::SubscribeResponse;
6323 type ResponseStream = T::SubscribeStream;
6324 type Future = BoxFuture<
6325 tonic::Response<Self::ResponseStream>,
6326 tonic::Status,
6327 >;
6328 fn call(
6329 &mut self,
6330 request: tonic::Request<super::SubscribeRequest>,
6331 ) -> Self::Future {
6332 let inner = Arc::clone(&self.0);
6333 let fut = async move {
6334 <T as NotificationService>::subscribe(&inner, request).await
6335 };
6336 Box::pin(fut)
6337 }
6338 }
6339 let accept_compression_encodings = self.accept_compression_encodings;
6340 let send_compression_encodings = self.send_compression_encodings;
6341 let max_decoding_message_size = self.max_decoding_message_size;
6342 let max_encoding_message_size = self.max_encoding_message_size;
6343 let inner = self.inner.clone();
6344 let fut = async move {
6345 let method = SubscribeSvc(inner);
6346 let codec = tonic::codec::ProstCodec::default();
6347 let mut grpc = tonic::server::Grpc::new(codec)
6348 .apply_compression_config(
6349 accept_compression_encodings,
6350 send_compression_encodings,
6351 )
6352 .apply_max_message_size_config(
6353 max_decoding_message_size,
6354 max_encoding_message_size,
6355 );
6356 let res = grpc.server_streaming(method, req).await;
6357 Ok(res)
6358 };
6359 Box::pin(fut)
6360 }
6361 _ => {
6362 Box::pin(async move {
6363 let mut response = http::Response::new(empty_body());
6364 let headers = response.headers_mut();
6365 headers
6366 .insert(
6367 tonic::Status::GRPC_STATUS,
6368 (tonic::Code::Unimplemented as i32).into(),
6369 );
6370 headers
6371 .insert(
6372 http::header::CONTENT_TYPE,
6373 tonic::metadata::GRPC_CONTENT_TYPE,
6374 );
6375 Ok(response)
6376 })
6377 }
6378 }
6379 }
6380 }
6381 impl<T> Clone for NotificationServiceServer<T> {
6382 fn clone(&self) -> Self {
6383 let inner = self.inner.clone();
6384 Self {
6385 inner,
6386 accept_compression_encodings: self.accept_compression_encodings,
6387 send_compression_encodings: self.send_compression_encodings,
6388 max_decoding_message_size: self.max_decoding_message_size,
6389 max_encoding_message_size: self.max_encoding_message_size,
6390 }
6391 }
6392 }
6393 pub const SERVICE_NAME: &str = "meta.NotificationService";
6395 impl<T> tonic::server::NamedService for NotificationServiceServer<T> {
6396 const NAME: &'static str = SERVICE_NAME;
6397 }
6398}
6399pub mod scale_service_server {
6401 #![allow(
6402 unused_variables,
6403 dead_code,
6404 missing_docs,
6405 clippy::wildcard_imports,
6406 clippy::let_unit_value,
6407 )]
6408 use tonic::codegen::*;
6409 #[async_trait]
6411 pub trait ScaleService: std::marker::Send + std::marker::Sync + 'static {
6412 async fn get_cluster_info(
6413 &self,
6414 request: tonic::Request<super::GetClusterInfoRequest>,
6415 ) -> std::result::Result<
6416 tonic::Response<super::GetClusterInfoResponse>,
6417 tonic::Status,
6418 >;
6419 async fn reschedule(
6420 &self,
6421 request: tonic::Request<super::RescheduleRequest>,
6422 ) -> std::result::Result<
6423 tonic::Response<super::RescheduleResponse>,
6424 tonic::Status,
6425 >;
6426 async fn update_streaming_job_node_labels(
6427 &self,
6428 request: tonic::Request<super::UpdateStreamingJobNodeLabelsRequest>,
6429 ) -> std::result::Result<
6430 tonic::Response<super::UpdateStreamingJobNodeLabelsResponse>,
6431 tonic::Status,
6432 >;
6433 async fn get_serverless_streaming_jobs_status(
6434 &self,
6435 request: tonic::Request<super::GetServerlessStreamingJobsStatusRequest>,
6436 ) -> std::result::Result<
6437 tonic::Response<super::GetServerlessStreamingJobsStatusResponse>,
6438 tonic::Status,
6439 >;
6440 }
6441 #[derive(Debug)]
6443 pub struct ScaleServiceServer<T> {
6444 inner: Arc<T>,
6445 accept_compression_encodings: EnabledCompressionEncodings,
6446 send_compression_encodings: EnabledCompressionEncodings,
6447 max_decoding_message_size: Option<usize>,
6448 max_encoding_message_size: Option<usize>,
6449 }
6450 impl<T> ScaleServiceServer<T> {
6451 pub fn new(inner: T) -> Self {
6452 Self::from_arc(Arc::new(inner))
6453 }
6454 pub fn from_arc(inner: Arc<T>) -> Self {
6455 Self {
6456 inner,
6457 accept_compression_encodings: Default::default(),
6458 send_compression_encodings: Default::default(),
6459 max_decoding_message_size: None,
6460 max_encoding_message_size: None,
6461 }
6462 }
6463 pub fn with_interceptor<F>(
6464 inner: T,
6465 interceptor: F,
6466 ) -> InterceptedService<Self, F>
6467 where
6468 F: tonic::service::Interceptor,
6469 {
6470 InterceptedService::new(Self::new(inner), interceptor)
6471 }
6472 #[must_use]
6474 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6475 self.accept_compression_encodings.enable(encoding);
6476 self
6477 }
6478 #[must_use]
6480 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6481 self.send_compression_encodings.enable(encoding);
6482 self
6483 }
6484 #[must_use]
6488 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6489 self.max_decoding_message_size = Some(limit);
6490 self
6491 }
6492 #[must_use]
6496 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6497 self.max_encoding_message_size = Some(limit);
6498 self
6499 }
6500 }
6501 impl<T, B> tonic::codegen::Service<http::Request<B>> for ScaleServiceServer<T>
6502 where
6503 T: ScaleService,
6504 B: Body + std::marker::Send + 'static,
6505 B::Error: Into<StdError> + std::marker::Send + 'static,
6506 {
6507 type Response = http::Response<tonic::body::BoxBody>;
6508 type Error = std::convert::Infallible;
6509 type Future = BoxFuture<Self::Response, Self::Error>;
6510 fn poll_ready(
6511 &mut self,
6512 _cx: &mut Context<'_>,
6513 ) -> Poll<std::result::Result<(), Self::Error>> {
6514 Poll::Ready(Ok(()))
6515 }
6516 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6517 match req.uri().path() {
6518 "/meta.ScaleService/GetClusterInfo" => {
6519 #[allow(non_camel_case_types)]
6520 struct GetClusterInfoSvc<T: ScaleService>(pub Arc<T>);
6521 impl<
6522 T: ScaleService,
6523 > tonic::server::UnaryService<super::GetClusterInfoRequest>
6524 for GetClusterInfoSvc<T> {
6525 type Response = super::GetClusterInfoResponse;
6526 type Future = BoxFuture<
6527 tonic::Response<Self::Response>,
6528 tonic::Status,
6529 >;
6530 fn call(
6531 &mut self,
6532 request: tonic::Request<super::GetClusterInfoRequest>,
6533 ) -> Self::Future {
6534 let inner = Arc::clone(&self.0);
6535 let fut = async move {
6536 <T as ScaleService>::get_cluster_info(&inner, request).await
6537 };
6538 Box::pin(fut)
6539 }
6540 }
6541 let accept_compression_encodings = self.accept_compression_encodings;
6542 let send_compression_encodings = self.send_compression_encodings;
6543 let max_decoding_message_size = self.max_decoding_message_size;
6544 let max_encoding_message_size = self.max_encoding_message_size;
6545 let inner = self.inner.clone();
6546 let fut = async move {
6547 let method = GetClusterInfoSvc(inner);
6548 let codec = tonic::codec::ProstCodec::default();
6549 let mut grpc = tonic::server::Grpc::new(codec)
6550 .apply_compression_config(
6551 accept_compression_encodings,
6552 send_compression_encodings,
6553 )
6554 .apply_max_message_size_config(
6555 max_decoding_message_size,
6556 max_encoding_message_size,
6557 );
6558 let res = grpc.unary(method, req).await;
6559 Ok(res)
6560 };
6561 Box::pin(fut)
6562 }
6563 "/meta.ScaleService/Reschedule" => {
6564 #[allow(non_camel_case_types)]
6565 struct RescheduleSvc<T: ScaleService>(pub Arc<T>);
6566 impl<
6567 T: ScaleService,
6568 > tonic::server::UnaryService<super::RescheduleRequest>
6569 for RescheduleSvc<T> {
6570 type Response = super::RescheduleResponse;
6571 type Future = BoxFuture<
6572 tonic::Response<Self::Response>,
6573 tonic::Status,
6574 >;
6575 fn call(
6576 &mut self,
6577 request: tonic::Request<super::RescheduleRequest>,
6578 ) -> Self::Future {
6579 let inner = Arc::clone(&self.0);
6580 let fut = async move {
6581 <T as ScaleService>::reschedule(&inner, request).await
6582 };
6583 Box::pin(fut)
6584 }
6585 }
6586 let accept_compression_encodings = self.accept_compression_encodings;
6587 let send_compression_encodings = self.send_compression_encodings;
6588 let max_decoding_message_size = self.max_decoding_message_size;
6589 let max_encoding_message_size = self.max_encoding_message_size;
6590 let inner = self.inner.clone();
6591 let fut = async move {
6592 let method = RescheduleSvc(inner);
6593 let codec = tonic::codec::ProstCodec::default();
6594 let mut grpc = tonic::server::Grpc::new(codec)
6595 .apply_compression_config(
6596 accept_compression_encodings,
6597 send_compression_encodings,
6598 )
6599 .apply_max_message_size_config(
6600 max_decoding_message_size,
6601 max_encoding_message_size,
6602 );
6603 let res = grpc.unary(method, req).await;
6604 Ok(res)
6605 };
6606 Box::pin(fut)
6607 }
6608 "/meta.ScaleService/UpdateStreamingJobNodeLabels" => {
6609 #[allow(non_camel_case_types)]
6610 struct UpdateStreamingJobNodeLabelsSvc<T: ScaleService>(pub Arc<T>);
6611 impl<
6612 T: ScaleService,
6613 > tonic::server::UnaryService<
6614 super::UpdateStreamingJobNodeLabelsRequest,
6615 > for UpdateStreamingJobNodeLabelsSvc<T> {
6616 type Response = super::UpdateStreamingJobNodeLabelsResponse;
6617 type Future = BoxFuture<
6618 tonic::Response<Self::Response>,
6619 tonic::Status,
6620 >;
6621 fn call(
6622 &mut self,
6623 request: tonic::Request<
6624 super::UpdateStreamingJobNodeLabelsRequest,
6625 >,
6626 ) -> Self::Future {
6627 let inner = Arc::clone(&self.0);
6628 let fut = async move {
6629 <T as ScaleService>::update_streaming_job_node_labels(
6630 &inner,
6631 request,
6632 )
6633 .await
6634 };
6635 Box::pin(fut)
6636 }
6637 }
6638 let accept_compression_encodings = self.accept_compression_encodings;
6639 let send_compression_encodings = self.send_compression_encodings;
6640 let max_decoding_message_size = self.max_decoding_message_size;
6641 let max_encoding_message_size = self.max_encoding_message_size;
6642 let inner = self.inner.clone();
6643 let fut = async move {
6644 let method = UpdateStreamingJobNodeLabelsSvc(inner);
6645 let codec = tonic::codec::ProstCodec::default();
6646 let mut grpc = tonic::server::Grpc::new(codec)
6647 .apply_compression_config(
6648 accept_compression_encodings,
6649 send_compression_encodings,
6650 )
6651 .apply_max_message_size_config(
6652 max_decoding_message_size,
6653 max_encoding_message_size,
6654 );
6655 let res = grpc.unary(method, req).await;
6656 Ok(res)
6657 };
6658 Box::pin(fut)
6659 }
6660 "/meta.ScaleService/GetServerlessStreamingJobsStatus" => {
6661 #[allow(non_camel_case_types)]
6662 struct GetServerlessStreamingJobsStatusSvc<T: ScaleService>(
6663 pub Arc<T>,
6664 );
6665 impl<
6666 T: ScaleService,
6667 > tonic::server::UnaryService<
6668 super::GetServerlessStreamingJobsStatusRequest,
6669 > for GetServerlessStreamingJobsStatusSvc<T> {
6670 type Response = super::GetServerlessStreamingJobsStatusResponse;
6671 type Future = BoxFuture<
6672 tonic::Response<Self::Response>,
6673 tonic::Status,
6674 >;
6675 fn call(
6676 &mut self,
6677 request: tonic::Request<
6678 super::GetServerlessStreamingJobsStatusRequest,
6679 >,
6680 ) -> Self::Future {
6681 let inner = Arc::clone(&self.0);
6682 let fut = async move {
6683 <T as ScaleService>::get_serverless_streaming_jobs_status(
6684 &inner,
6685 request,
6686 )
6687 .await
6688 };
6689 Box::pin(fut)
6690 }
6691 }
6692 let accept_compression_encodings = self.accept_compression_encodings;
6693 let send_compression_encodings = self.send_compression_encodings;
6694 let max_decoding_message_size = self.max_decoding_message_size;
6695 let max_encoding_message_size = self.max_encoding_message_size;
6696 let inner = self.inner.clone();
6697 let fut = async move {
6698 let method = GetServerlessStreamingJobsStatusSvc(inner);
6699 let codec = tonic::codec::ProstCodec::default();
6700 let mut grpc = tonic::server::Grpc::new(codec)
6701 .apply_compression_config(
6702 accept_compression_encodings,
6703 send_compression_encodings,
6704 )
6705 .apply_max_message_size_config(
6706 max_decoding_message_size,
6707 max_encoding_message_size,
6708 );
6709 let res = grpc.unary(method, req).await;
6710 Ok(res)
6711 };
6712 Box::pin(fut)
6713 }
6714 _ => {
6715 Box::pin(async move {
6716 let mut response = http::Response::new(empty_body());
6717 let headers = response.headers_mut();
6718 headers
6719 .insert(
6720 tonic::Status::GRPC_STATUS,
6721 (tonic::Code::Unimplemented as i32).into(),
6722 );
6723 headers
6724 .insert(
6725 http::header::CONTENT_TYPE,
6726 tonic::metadata::GRPC_CONTENT_TYPE,
6727 );
6728 Ok(response)
6729 })
6730 }
6731 }
6732 }
6733 }
6734 impl<T> Clone for ScaleServiceServer<T> {
6735 fn clone(&self) -> Self {
6736 let inner = self.inner.clone();
6737 Self {
6738 inner,
6739 accept_compression_encodings: self.accept_compression_encodings,
6740 send_compression_encodings: self.send_compression_encodings,
6741 max_decoding_message_size: self.max_decoding_message_size,
6742 max_encoding_message_size: self.max_encoding_message_size,
6743 }
6744 }
6745 }
6746 pub const SERVICE_NAME: &str = "meta.ScaleService";
6748 impl<T> tonic::server::NamedService for ScaleServiceServer<T> {
6749 const NAME: &'static str = SERVICE_NAME;
6750 }
6751}
6752pub mod meta_member_service_server {
6754 #![allow(
6755 unused_variables,
6756 dead_code,
6757 missing_docs,
6758 clippy::wildcard_imports,
6759 clippy::let_unit_value,
6760 )]
6761 use tonic::codegen::*;
6762 #[async_trait]
6764 pub trait MetaMemberService: std::marker::Send + std::marker::Sync + 'static {
6765 async fn members(
6766 &self,
6767 request: tonic::Request<super::MembersRequest>,
6768 ) -> std::result::Result<tonic::Response<super::MembersResponse>, tonic::Status>;
6769 }
6770 #[derive(Debug)]
6771 pub struct MetaMemberServiceServer<T> {
6772 inner: Arc<T>,
6773 accept_compression_encodings: EnabledCompressionEncodings,
6774 send_compression_encodings: EnabledCompressionEncodings,
6775 max_decoding_message_size: Option<usize>,
6776 max_encoding_message_size: Option<usize>,
6777 }
6778 impl<T> MetaMemberServiceServer<T> {
6779 pub fn new(inner: T) -> Self {
6780 Self::from_arc(Arc::new(inner))
6781 }
6782 pub fn from_arc(inner: Arc<T>) -> Self {
6783 Self {
6784 inner,
6785 accept_compression_encodings: Default::default(),
6786 send_compression_encodings: Default::default(),
6787 max_decoding_message_size: None,
6788 max_encoding_message_size: None,
6789 }
6790 }
6791 pub fn with_interceptor<F>(
6792 inner: T,
6793 interceptor: F,
6794 ) -> InterceptedService<Self, F>
6795 where
6796 F: tonic::service::Interceptor,
6797 {
6798 InterceptedService::new(Self::new(inner), interceptor)
6799 }
6800 #[must_use]
6802 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6803 self.accept_compression_encodings.enable(encoding);
6804 self
6805 }
6806 #[must_use]
6808 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6809 self.send_compression_encodings.enable(encoding);
6810 self
6811 }
6812 #[must_use]
6816 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
6817 self.max_decoding_message_size = Some(limit);
6818 self
6819 }
6820 #[must_use]
6824 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
6825 self.max_encoding_message_size = Some(limit);
6826 self
6827 }
6828 }
6829 impl<T, B> tonic::codegen::Service<http::Request<B>> for MetaMemberServiceServer<T>
6830 where
6831 T: MetaMemberService,
6832 B: Body + std::marker::Send + 'static,
6833 B::Error: Into<StdError> + std::marker::Send + 'static,
6834 {
6835 type Response = http::Response<tonic::body::BoxBody>;
6836 type Error = std::convert::Infallible;
6837 type Future = BoxFuture<Self::Response, Self::Error>;
6838 fn poll_ready(
6839 &mut self,
6840 _cx: &mut Context<'_>,
6841 ) -> Poll<std::result::Result<(), Self::Error>> {
6842 Poll::Ready(Ok(()))
6843 }
6844 fn call(&mut self, req: http::Request<B>) -> Self::Future {
6845 match req.uri().path() {
6846 "/meta.MetaMemberService/Members" => {
6847 #[allow(non_camel_case_types)]
6848 struct MembersSvc<T: MetaMemberService>(pub Arc<T>);
6849 impl<
6850 T: MetaMemberService,
6851 > tonic::server::UnaryService<super::MembersRequest>
6852 for MembersSvc<T> {
6853 type Response = super::MembersResponse;
6854 type Future = BoxFuture<
6855 tonic::Response<Self::Response>,
6856 tonic::Status,
6857 >;
6858 fn call(
6859 &mut self,
6860 request: tonic::Request<super::MembersRequest>,
6861 ) -> Self::Future {
6862 let inner = Arc::clone(&self.0);
6863 let fut = async move {
6864 <T as MetaMemberService>::members(&inner, request).await
6865 };
6866 Box::pin(fut)
6867 }
6868 }
6869 let accept_compression_encodings = self.accept_compression_encodings;
6870 let send_compression_encodings = self.send_compression_encodings;
6871 let max_decoding_message_size = self.max_decoding_message_size;
6872 let max_encoding_message_size = self.max_encoding_message_size;
6873 let inner = self.inner.clone();
6874 let fut = async move {
6875 let method = MembersSvc(inner);
6876 let codec = tonic::codec::ProstCodec::default();
6877 let mut grpc = tonic::server::Grpc::new(codec)
6878 .apply_compression_config(
6879 accept_compression_encodings,
6880 send_compression_encodings,
6881 )
6882 .apply_max_message_size_config(
6883 max_decoding_message_size,
6884 max_encoding_message_size,
6885 );
6886 let res = grpc.unary(method, req).await;
6887 Ok(res)
6888 };
6889 Box::pin(fut)
6890 }
6891 _ => {
6892 Box::pin(async move {
6893 let mut response = http::Response::new(empty_body());
6894 let headers = response.headers_mut();
6895 headers
6896 .insert(
6897 tonic::Status::GRPC_STATUS,
6898 (tonic::Code::Unimplemented as i32).into(),
6899 );
6900 headers
6901 .insert(
6902 http::header::CONTENT_TYPE,
6903 tonic::metadata::GRPC_CONTENT_TYPE,
6904 );
6905 Ok(response)
6906 })
6907 }
6908 }
6909 }
6910 }
6911 impl<T> Clone for MetaMemberServiceServer<T> {
6912 fn clone(&self) -> Self {
6913 let inner = self.inner.clone();
6914 Self {
6915 inner,
6916 accept_compression_encodings: self.accept_compression_encodings,
6917 send_compression_encodings: self.send_compression_encodings,
6918 max_decoding_message_size: self.max_decoding_message_size,
6919 max_encoding_message_size: self.max_encoding_message_size,
6920 }
6921 }
6922 }
6923 pub const SERVICE_NAME: &str = "meta.MetaMemberService";
6925 impl<T> tonic::server::NamedService for MetaMemberServiceServer<T> {
6926 const NAME: &'static str = SERVICE_NAME;
6927 }
6928}
6929pub mod system_params_service_server {
6931 #![allow(
6932 unused_variables,
6933 dead_code,
6934 missing_docs,
6935 clippy::wildcard_imports,
6936 clippy::let_unit_value,
6937 )]
6938 use tonic::codegen::*;
6939 #[async_trait]
6941 pub trait SystemParamsService: std::marker::Send + std::marker::Sync + 'static {
6942 async fn get_system_params(
6943 &self,
6944 request: tonic::Request<super::GetSystemParamsRequest>,
6945 ) -> std::result::Result<
6946 tonic::Response<super::GetSystemParamsResponse>,
6947 tonic::Status,
6948 >;
6949 async fn set_system_param(
6950 &self,
6951 request: tonic::Request<super::SetSystemParamRequest>,
6952 ) -> std::result::Result<
6953 tonic::Response<super::SetSystemParamResponse>,
6954 tonic::Status,
6955 >;
6956 }
6957 #[derive(Debug)]
6958 pub struct SystemParamsServiceServer<T> {
6959 inner: Arc<T>,
6960 accept_compression_encodings: EnabledCompressionEncodings,
6961 send_compression_encodings: EnabledCompressionEncodings,
6962 max_decoding_message_size: Option<usize>,
6963 max_encoding_message_size: Option<usize>,
6964 }
6965 impl<T> SystemParamsServiceServer<T> {
6966 pub fn new(inner: T) -> Self {
6967 Self::from_arc(Arc::new(inner))
6968 }
6969 pub fn from_arc(inner: Arc<T>) -> Self {
6970 Self {
6971 inner,
6972 accept_compression_encodings: Default::default(),
6973 send_compression_encodings: Default::default(),
6974 max_decoding_message_size: None,
6975 max_encoding_message_size: None,
6976 }
6977 }
6978 pub fn with_interceptor<F>(
6979 inner: T,
6980 interceptor: F,
6981 ) -> InterceptedService<Self, F>
6982 where
6983 F: tonic::service::Interceptor,
6984 {
6985 InterceptedService::new(Self::new(inner), interceptor)
6986 }
6987 #[must_use]
6989 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
6990 self.accept_compression_encodings.enable(encoding);
6991 self
6992 }
6993 #[must_use]
6995 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
6996 self.send_compression_encodings.enable(encoding);
6997 self
6998 }
6999 #[must_use]
7003 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7004 self.max_decoding_message_size = Some(limit);
7005 self
7006 }
7007 #[must_use]
7011 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7012 self.max_encoding_message_size = Some(limit);
7013 self
7014 }
7015 }
7016 impl<T, B> tonic::codegen::Service<http::Request<B>> for SystemParamsServiceServer<T>
7017 where
7018 T: SystemParamsService,
7019 B: Body + std::marker::Send + 'static,
7020 B::Error: Into<StdError> + std::marker::Send + 'static,
7021 {
7022 type Response = http::Response<tonic::body::BoxBody>;
7023 type Error = std::convert::Infallible;
7024 type Future = BoxFuture<Self::Response, Self::Error>;
7025 fn poll_ready(
7026 &mut self,
7027 _cx: &mut Context<'_>,
7028 ) -> Poll<std::result::Result<(), Self::Error>> {
7029 Poll::Ready(Ok(()))
7030 }
7031 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7032 match req.uri().path() {
7033 "/meta.SystemParamsService/GetSystemParams" => {
7034 #[allow(non_camel_case_types)]
7035 struct GetSystemParamsSvc<T: SystemParamsService>(pub Arc<T>);
7036 impl<
7037 T: SystemParamsService,
7038 > tonic::server::UnaryService<super::GetSystemParamsRequest>
7039 for GetSystemParamsSvc<T> {
7040 type Response = super::GetSystemParamsResponse;
7041 type Future = BoxFuture<
7042 tonic::Response<Self::Response>,
7043 tonic::Status,
7044 >;
7045 fn call(
7046 &mut self,
7047 request: tonic::Request<super::GetSystemParamsRequest>,
7048 ) -> Self::Future {
7049 let inner = Arc::clone(&self.0);
7050 let fut = async move {
7051 <T as SystemParamsService>::get_system_params(
7052 &inner,
7053 request,
7054 )
7055 .await
7056 };
7057 Box::pin(fut)
7058 }
7059 }
7060 let accept_compression_encodings = self.accept_compression_encodings;
7061 let send_compression_encodings = self.send_compression_encodings;
7062 let max_decoding_message_size = self.max_decoding_message_size;
7063 let max_encoding_message_size = self.max_encoding_message_size;
7064 let inner = self.inner.clone();
7065 let fut = async move {
7066 let method = GetSystemParamsSvc(inner);
7067 let codec = tonic::codec::ProstCodec::default();
7068 let mut grpc = tonic::server::Grpc::new(codec)
7069 .apply_compression_config(
7070 accept_compression_encodings,
7071 send_compression_encodings,
7072 )
7073 .apply_max_message_size_config(
7074 max_decoding_message_size,
7075 max_encoding_message_size,
7076 );
7077 let res = grpc.unary(method, req).await;
7078 Ok(res)
7079 };
7080 Box::pin(fut)
7081 }
7082 "/meta.SystemParamsService/SetSystemParam" => {
7083 #[allow(non_camel_case_types)]
7084 struct SetSystemParamSvc<T: SystemParamsService>(pub Arc<T>);
7085 impl<
7086 T: SystemParamsService,
7087 > tonic::server::UnaryService<super::SetSystemParamRequest>
7088 for SetSystemParamSvc<T> {
7089 type Response = super::SetSystemParamResponse;
7090 type Future = BoxFuture<
7091 tonic::Response<Self::Response>,
7092 tonic::Status,
7093 >;
7094 fn call(
7095 &mut self,
7096 request: tonic::Request<super::SetSystemParamRequest>,
7097 ) -> Self::Future {
7098 let inner = Arc::clone(&self.0);
7099 let fut = async move {
7100 <T as SystemParamsService>::set_system_param(
7101 &inner,
7102 request,
7103 )
7104 .await
7105 };
7106 Box::pin(fut)
7107 }
7108 }
7109 let accept_compression_encodings = self.accept_compression_encodings;
7110 let send_compression_encodings = self.send_compression_encodings;
7111 let max_decoding_message_size = self.max_decoding_message_size;
7112 let max_encoding_message_size = self.max_encoding_message_size;
7113 let inner = self.inner.clone();
7114 let fut = async move {
7115 let method = SetSystemParamSvc(inner);
7116 let codec = tonic::codec::ProstCodec::default();
7117 let mut grpc = tonic::server::Grpc::new(codec)
7118 .apply_compression_config(
7119 accept_compression_encodings,
7120 send_compression_encodings,
7121 )
7122 .apply_max_message_size_config(
7123 max_decoding_message_size,
7124 max_encoding_message_size,
7125 );
7126 let res = grpc.unary(method, req).await;
7127 Ok(res)
7128 };
7129 Box::pin(fut)
7130 }
7131 _ => {
7132 Box::pin(async move {
7133 let mut response = http::Response::new(empty_body());
7134 let headers = response.headers_mut();
7135 headers
7136 .insert(
7137 tonic::Status::GRPC_STATUS,
7138 (tonic::Code::Unimplemented as i32).into(),
7139 );
7140 headers
7141 .insert(
7142 http::header::CONTENT_TYPE,
7143 tonic::metadata::GRPC_CONTENT_TYPE,
7144 );
7145 Ok(response)
7146 })
7147 }
7148 }
7149 }
7150 }
7151 impl<T> Clone for SystemParamsServiceServer<T> {
7152 fn clone(&self) -> Self {
7153 let inner = self.inner.clone();
7154 Self {
7155 inner,
7156 accept_compression_encodings: self.accept_compression_encodings,
7157 send_compression_encodings: self.send_compression_encodings,
7158 max_decoding_message_size: self.max_decoding_message_size,
7159 max_encoding_message_size: self.max_encoding_message_size,
7160 }
7161 }
7162 }
7163 pub const SERVICE_NAME: &str = "meta.SystemParamsService";
7165 impl<T> tonic::server::NamedService for SystemParamsServiceServer<T> {
7166 const NAME: &'static str = SERVICE_NAME;
7167 }
7168}
7169pub mod session_param_service_server {
7171 #![allow(
7172 unused_variables,
7173 dead_code,
7174 missing_docs,
7175 clippy::wildcard_imports,
7176 clippy::let_unit_value,
7177 )]
7178 use tonic::codegen::*;
7179 #[async_trait]
7181 pub trait SessionParamService: std::marker::Send + std::marker::Sync + 'static {
7182 async fn get_session_params(
7183 &self,
7184 request: tonic::Request<super::GetSessionParamsRequest>,
7185 ) -> std::result::Result<
7186 tonic::Response<super::GetSessionParamsResponse>,
7187 tonic::Status,
7188 >;
7189 async fn set_session_param(
7190 &self,
7191 request: tonic::Request<super::SetSessionParamRequest>,
7192 ) -> std::result::Result<
7193 tonic::Response<super::SetSessionParamResponse>,
7194 tonic::Status,
7195 >;
7196 }
7197 #[derive(Debug)]
7199 pub struct SessionParamServiceServer<T> {
7200 inner: Arc<T>,
7201 accept_compression_encodings: EnabledCompressionEncodings,
7202 send_compression_encodings: EnabledCompressionEncodings,
7203 max_decoding_message_size: Option<usize>,
7204 max_encoding_message_size: Option<usize>,
7205 }
7206 impl<T> SessionParamServiceServer<T> {
7207 pub fn new(inner: T) -> Self {
7208 Self::from_arc(Arc::new(inner))
7209 }
7210 pub fn from_arc(inner: Arc<T>) -> Self {
7211 Self {
7212 inner,
7213 accept_compression_encodings: Default::default(),
7214 send_compression_encodings: Default::default(),
7215 max_decoding_message_size: None,
7216 max_encoding_message_size: None,
7217 }
7218 }
7219 pub fn with_interceptor<F>(
7220 inner: T,
7221 interceptor: F,
7222 ) -> InterceptedService<Self, F>
7223 where
7224 F: tonic::service::Interceptor,
7225 {
7226 InterceptedService::new(Self::new(inner), interceptor)
7227 }
7228 #[must_use]
7230 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7231 self.accept_compression_encodings.enable(encoding);
7232 self
7233 }
7234 #[must_use]
7236 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7237 self.send_compression_encodings.enable(encoding);
7238 self
7239 }
7240 #[must_use]
7244 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7245 self.max_decoding_message_size = Some(limit);
7246 self
7247 }
7248 #[must_use]
7252 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7253 self.max_encoding_message_size = Some(limit);
7254 self
7255 }
7256 }
7257 impl<T, B> tonic::codegen::Service<http::Request<B>> for SessionParamServiceServer<T>
7258 where
7259 T: SessionParamService,
7260 B: Body + std::marker::Send + 'static,
7261 B::Error: Into<StdError> + std::marker::Send + 'static,
7262 {
7263 type Response = http::Response<tonic::body::BoxBody>;
7264 type Error = std::convert::Infallible;
7265 type Future = BoxFuture<Self::Response, Self::Error>;
7266 fn poll_ready(
7267 &mut self,
7268 _cx: &mut Context<'_>,
7269 ) -> Poll<std::result::Result<(), Self::Error>> {
7270 Poll::Ready(Ok(()))
7271 }
7272 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7273 match req.uri().path() {
7274 "/meta.SessionParamService/GetSessionParams" => {
7275 #[allow(non_camel_case_types)]
7276 struct GetSessionParamsSvc<T: SessionParamService>(pub Arc<T>);
7277 impl<
7278 T: SessionParamService,
7279 > tonic::server::UnaryService<super::GetSessionParamsRequest>
7280 for GetSessionParamsSvc<T> {
7281 type Response = super::GetSessionParamsResponse;
7282 type Future = BoxFuture<
7283 tonic::Response<Self::Response>,
7284 tonic::Status,
7285 >;
7286 fn call(
7287 &mut self,
7288 request: tonic::Request<super::GetSessionParamsRequest>,
7289 ) -> Self::Future {
7290 let inner = Arc::clone(&self.0);
7291 let fut = async move {
7292 <T as SessionParamService>::get_session_params(
7293 &inner,
7294 request,
7295 )
7296 .await
7297 };
7298 Box::pin(fut)
7299 }
7300 }
7301 let accept_compression_encodings = self.accept_compression_encodings;
7302 let send_compression_encodings = self.send_compression_encodings;
7303 let max_decoding_message_size = self.max_decoding_message_size;
7304 let max_encoding_message_size = self.max_encoding_message_size;
7305 let inner = self.inner.clone();
7306 let fut = async move {
7307 let method = GetSessionParamsSvc(inner);
7308 let codec = tonic::codec::ProstCodec::default();
7309 let mut grpc = tonic::server::Grpc::new(codec)
7310 .apply_compression_config(
7311 accept_compression_encodings,
7312 send_compression_encodings,
7313 )
7314 .apply_max_message_size_config(
7315 max_decoding_message_size,
7316 max_encoding_message_size,
7317 );
7318 let res = grpc.unary(method, req).await;
7319 Ok(res)
7320 };
7321 Box::pin(fut)
7322 }
7323 "/meta.SessionParamService/SetSessionParam" => {
7324 #[allow(non_camel_case_types)]
7325 struct SetSessionParamSvc<T: SessionParamService>(pub Arc<T>);
7326 impl<
7327 T: SessionParamService,
7328 > tonic::server::UnaryService<super::SetSessionParamRequest>
7329 for SetSessionParamSvc<T> {
7330 type Response = super::SetSessionParamResponse;
7331 type Future = BoxFuture<
7332 tonic::Response<Self::Response>,
7333 tonic::Status,
7334 >;
7335 fn call(
7336 &mut self,
7337 request: tonic::Request<super::SetSessionParamRequest>,
7338 ) -> Self::Future {
7339 let inner = Arc::clone(&self.0);
7340 let fut = async move {
7341 <T as SessionParamService>::set_session_param(
7342 &inner,
7343 request,
7344 )
7345 .await
7346 };
7347 Box::pin(fut)
7348 }
7349 }
7350 let accept_compression_encodings = self.accept_compression_encodings;
7351 let send_compression_encodings = self.send_compression_encodings;
7352 let max_decoding_message_size = self.max_decoding_message_size;
7353 let max_encoding_message_size = self.max_encoding_message_size;
7354 let inner = self.inner.clone();
7355 let fut = async move {
7356 let method = SetSessionParamSvc(inner);
7357 let codec = tonic::codec::ProstCodec::default();
7358 let mut grpc = tonic::server::Grpc::new(codec)
7359 .apply_compression_config(
7360 accept_compression_encodings,
7361 send_compression_encodings,
7362 )
7363 .apply_max_message_size_config(
7364 max_decoding_message_size,
7365 max_encoding_message_size,
7366 );
7367 let res = grpc.unary(method, req).await;
7368 Ok(res)
7369 };
7370 Box::pin(fut)
7371 }
7372 _ => {
7373 Box::pin(async move {
7374 let mut response = http::Response::new(empty_body());
7375 let headers = response.headers_mut();
7376 headers
7377 .insert(
7378 tonic::Status::GRPC_STATUS,
7379 (tonic::Code::Unimplemented as i32).into(),
7380 );
7381 headers
7382 .insert(
7383 http::header::CONTENT_TYPE,
7384 tonic::metadata::GRPC_CONTENT_TYPE,
7385 );
7386 Ok(response)
7387 })
7388 }
7389 }
7390 }
7391 }
7392 impl<T> Clone for SessionParamServiceServer<T> {
7393 fn clone(&self) -> Self {
7394 let inner = self.inner.clone();
7395 Self {
7396 inner,
7397 accept_compression_encodings: self.accept_compression_encodings,
7398 send_compression_encodings: self.send_compression_encodings,
7399 max_decoding_message_size: self.max_decoding_message_size,
7400 max_encoding_message_size: self.max_encoding_message_size,
7401 }
7402 }
7403 }
7404 pub const SERVICE_NAME: &str = "meta.SessionParamService";
7406 impl<T> tonic::server::NamedService for SessionParamServiceServer<T> {
7407 const NAME: &'static str = SERVICE_NAME;
7408 }
7409}
7410pub mod serving_service_server {
7412 #![allow(
7413 unused_variables,
7414 dead_code,
7415 missing_docs,
7416 clippy::wildcard_imports,
7417 clippy::let_unit_value,
7418 )]
7419 use tonic::codegen::*;
7420 #[async_trait]
7422 pub trait ServingService: std::marker::Send + std::marker::Sync + 'static {
7423 async fn get_serving_vnode_mappings(
7424 &self,
7425 request: tonic::Request<super::GetServingVnodeMappingsRequest>,
7426 ) -> std::result::Result<
7427 tonic::Response<super::GetServingVnodeMappingsResponse>,
7428 tonic::Status,
7429 >;
7430 }
7431 #[derive(Debug)]
7432 pub struct ServingServiceServer<T> {
7433 inner: Arc<T>,
7434 accept_compression_encodings: EnabledCompressionEncodings,
7435 send_compression_encodings: EnabledCompressionEncodings,
7436 max_decoding_message_size: Option<usize>,
7437 max_encoding_message_size: Option<usize>,
7438 }
7439 impl<T> ServingServiceServer<T> {
7440 pub fn new(inner: T) -> Self {
7441 Self::from_arc(Arc::new(inner))
7442 }
7443 pub fn from_arc(inner: Arc<T>) -> Self {
7444 Self {
7445 inner,
7446 accept_compression_encodings: Default::default(),
7447 send_compression_encodings: Default::default(),
7448 max_decoding_message_size: None,
7449 max_encoding_message_size: None,
7450 }
7451 }
7452 pub fn with_interceptor<F>(
7453 inner: T,
7454 interceptor: F,
7455 ) -> InterceptedService<Self, F>
7456 where
7457 F: tonic::service::Interceptor,
7458 {
7459 InterceptedService::new(Self::new(inner), interceptor)
7460 }
7461 #[must_use]
7463 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7464 self.accept_compression_encodings.enable(encoding);
7465 self
7466 }
7467 #[must_use]
7469 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7470 self.send_compression_encodings.enable(encoding);
7471 self
7472 }
7473 #[must_use]
7477 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7478 self.max_decoding_message_size = Some(limit);
7479 self
7480 }
7481 #[must_use]
7485 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7486 self.max_encoding_message_size = Some(limit);
7487 self
7488 }
7489 }
7490 impl<T, B> tonic::codegen::Service<http::Request<B>> for ServingServiceServer<T>
7491 where
7492 T: ServingService,
7493 B: Body + std::marker::Send + 'static,
7494 B::Error: Into<StdError> + std::marker::Send + 'static,
7495 {
7496 type Response = http::Response<tonic::body::BoxBody>;
7497 type Error = std::convert::Infallible;
7498 type Future = BoxFuture<Self::Response, Self::Error>;
7499 fn poll_ready(
7500 &mut self,
7501 _cx: &mut Context<'_>,
7502 ) -> Poll<std::result::Result<(), Self::Error>> {
7503 Poll::Ready(Ok(()))
7504 }
7505 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7506 match req.uri().path() {
7507 "/meta.ServingService/GetServingVnodeMappings" => {
7508 #[allow(non_camel_case_types)]
7509 struct GetServingVnodeMappingsSvc<T: ServingService>(pub Arc<T>);
7510 impl<
7511 T: ServingService,
7512 > tonic::server::UnaryService<super::GetServingVnodeMappingsRequest>
7513 for GetServingVnodeMappingsSvc<T> {
7514 type Response = super::GetServingVnodeMappingsResponse;
7515 type Future = BoxFuture<
7516 tonic::Response<Self::Response>,
7517 tonic::Status,
7518 >;
7519 fn call(
7520 &mut self,
7521 request: tonic::Request<
7522 super::GetServingVnodeMappingsRequest,
7523 >,
7524 ) -> Self::Future {
7525 let inner = Arc::clone(&self.0);
7526 let fut = async move {
7527 <T as ServingService>::get_serving_vnode_mappings(
7528 &inner,
7529 request,
7530 )
7531 .await
7532 };
7533 Box::pin(fut)
7534 }
7535 }
7536 let accept_compression_encodings = self.accept_compression_encodings;
7537 let send_compression_encodings = self.send_compression_encodings;
7538 let max_decoding_message_size = self.max_decoding_message_size;
7539 let max_encoding_message_size = self.max_encoding_message_size;
7540 let inner = self.inner.clone();
7541 let fut = async move {
7542 let method = GetServingVnodeMappingsSvc(inner);
7543 let codec = tonic::codec::ProstCodec::default();
7544 let mut grpc = tonic::server::Grpc::new(codec)
7545 .apply_compression_config(
7546 accept_compression_encodings,
7547 send_compression_encodings,
7548 )
7549 .apply_max_message_size_config(
7550 max_decoding_message_size,
7551 max_encoding_message_size,
7552 );
7553 let res = grpc.unary(method, req).await;
7554 Ok(res)
7555 };
7556 Box::pin(fut)
7557 }
7558 _ => {
7559 Box::pin(async move {
7560 let mut response = http::Response::new(empty_body());
7561 let headers = response.headers_mut();
7562 headers
7563 .insert(
7564 tonic::Status::GRPC_STATUS,
7565 (tonic::Code::Unimplemented as i32).into(),
7566 );
7567 headers
7568 .insert(
7569 http::header::CONTENT_TYPE,
7570 tonic::metadata::GRPC_CONTENT_TYPE,
7571 );
7572 Ok(response)
7573 })
7574 }
7575 }
7576 }
7577 }
7578 impl<T> Clone for ServingServiceServer<T> {
7579 fn clone(&self) -> Self {
7580 let inner = self.inner.clone();
7581 Self {
7582 inner,
7583 accept_compression_encodings: self.accept_compression_encodings,
7584 send_compression_encodings: self.send_compression_encodings,
7585 max_decoding_message_size: self.max_decoding_message_size,
7586 max_encoding_message_size: self.max_encoding_message_size,
7587 }
7588 }
7589 }
7590 pub const SERVICE_NAME: &str = "meta.ServingService";
7592 impl<T> tonic::server::NamedService for ServingServiceServer<T> {
7593 const NAME: &'static str = SERVICE_NAME;
7594 }
7595}
7596pub mod event_log_service_server {
7598 #![allow(
7599 unused_variables,
7600 dead_code,
7601 missing_docs,
7602 clippy::wildcard_imports,
7603 clippy::let_unit_value,
7604 )]
7605 use tonic::codegen::*;
7606 #[async_trait]
7608 pub trait EventLogService: std::marker::Send + std::marker::Sync + 'static {
7609 async fn list_event_log(
7610 &self,
7611 request: tonic::Request<super::ListEventLogRequest>,
7612 ) -> std::result::Result<
7613 tonic::Response<super::ListEventLogResponse>,
7614 tonic::Status,
7615 >;
7616 async fn add_event_log(
7617 &self,
7618 request: tonic::Request<super::AddEventLogRequest>,
7619 ) -> std::result::Result<
7620 tonic::Response<super::AddEventLogResponse>,
7621 tonic::Status,
7622 >;
7623 }
7624 #[derive(Debug)]
7625 pub struct EventLogServiceServer<T> {
7626 inner: Arc<T>,
7627 accept_compression_encodings: EnabledCompressionEncodings,
7628 send_compression_encodings: EnabledCompressionEncodings,
7629 max_decoding_message_size: Option<usize>,
7630 max_encoding_message_size: Option<usize>,
7631 }
7632 impl<T> EventLogServiceServer<T> {
7633 pub fn new(inner: T) -> Self {
7634 Self::from_arc(Arc::new(inner))
7635 }
7636 pub fn from_arc(inner: Arc<T>) -> Self {
7637 Self {
7638 inner,
7639 accept_compression_encodings: Default::default(),
7640 send_compression_encodings: Default::default(),
7641 max_decoding_message_size: None,
7642 max_encoding_message_size: None,
7643 }
7644 }
7645 pub fn with_interceptor<F>(
7646 inner: T,
7647 interceptor: F,
7648 ) -> InterceptedService<Self, F>
7649 where
7650 F: tonic::service::Interceptor,
7651 {
7652 InterceptedService::new(Self::new(inner), interceptor)
7653 }
7654 #[must_use]
7656 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7657 self.accept_compression_encodings.enable(encoding);
7658 self
7659 }
7660 #[must_use]
7662 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7663 self.send_compression_encodings.enable(encoding);
7664 self
7665 }
7666 #[must_use]
7670 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7671 self.max_decoding_message_size = Some(limit);
7672 self
7673 }
7674 #[must_use]
7678 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7679 self.max_encoding_message_size = Some(limit);
7680 self
7681 }
7682 }
7683 impl<T, B> tonic::codegen::Service<http::Request<B>> for EventLogServiceServer<T>
7684 where
7685 T: EventLogService,
7686 B: Body + std::marker::Send + 'static,
7687 B::Error: Into<StdError> + std::marker::Send + 'static,
7688 {
7689 type Response = http::Response<tonic::body::BoxBody>;
7690 type Error = std::convert::Infallible;
7691 type Future = BoxFuture<Self::Response, Self::Error>;
7692 fn poll_ready(
7693 &mut self,
7694 _cx: &mut Context<'_>,
7695 ) -> Poll<std::result::Result<(), Self::Error>> {
7696 Poll::Ready(Ok(()))
7697 }
7698 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7699 match req.uri().path() {
7700 "/meta.EventLogService/ListEventLog" => {
7701 #[allow(non_camel_case_types)]
7702 struct ListEventLogSvc<T: EventLogService>(pub Arc<T>);
7703 impl<
7704 T: EventLogService,
7705 > tonic::server::UnaryService<super::ListEventLogRequest>
7706 for ListEventLogSvc<T> {
7707 type Response = super::ListEventLogResponse;
7708 type Future = BoxFuture<
7709 tonic::Response<Self::Response>,
7710 tonic::Status,
7711 >;
7712 fn call(
7713 &mut self,
7714 request: tonic::Request<super::ListEventLogRequest>,
7715 ) -> Self::Future {
7716 let inner = Arc::clone(&self.0);
7717 let fut = async move {
7718 <T as EventLogService>::list_event_log(&inner, request)
7719 .await
7720 };
7721 Box::pin(fut)
7722 }
7723 }
7724 let accept_compression_encodings = self.accept_compression_encodings;
7725 let send_compression_encodings = self.send_compression_encodings;
7726 let max_decoding_message_size = self.max_decoding_message_size;
7727 let max_encoding_message_size = self.max_encoding_message_size;
7728 let inner = self.inner.clone();
7729 let fut = async move {
7730 let method = ListEventLogSvc(inner);
7731 let codec = tonic::codec::ProstCodec::default();
7732 let mut grpc = tonic::server::Grpc::new(codec)
7733 .apply_compression_config(
7734 accept_compression_encodings,
7735 send_compression_encodings,
7736 )
7737 .apply_max_message_size_config(
7738 max_decoding_message_size,
7739 max_encoding_message_size,
7740 );
7741 let res = grpc.unary(method, req).await;
7742 Ok(res)
7743 };
7744 Box::pin(fut)
7745 }
7746 "/meta.EventLogService/AddEventLog" => {
7747 #[allow(non_camel_case_types)]
7748 struct AddEventLogSvc<T: EventLogService>(pub Arc<T>);
7749 impl<
7750 T: EventLogService,
7751 > tonic::server::UnaryService<super::AddEventLogRequest>
7752 for AddEventLogSvc<T> {
7753 type Response = super::AddEventLogResponse;
7754 type Future = BoxFuture<
7755 tonic::Response<Self::Response>,
7756 tonic::Status,
7757 >;
7758 fn call(
7759 &mut self,
7760 request: tonic::Request<super::AddEventLogRequest>,
7761 ) -> Self::Future {
7762 let inner = Arc::clone(&self.0);
7763 let fut = async move {
7764 <T as EventLogService>::add_event_log(&inner, request).await
7765 };
7766 Box::pin(fut)
7767 }
7768 }
7769 let accept_compression_encodings = self.accept_compression_encodings;
7770 let send_compression_encodings = self.send_compression_encodings;
7771 let max_decoding_message_size = self.max_decoding_message_size;
7772 let max_encoding_message_size = self.max_encoding_message_size;
7773 let inner = self.inner.clone();
7774 let fut = async move {
7775 let method = AddEventLogSvc(inner);
7776 let codec = tonic::codec::ProstCodec::default();
7777 let mut grpc = tonic::server::Grpc::new(codec)
7778 .apply_compression_config(
7779 accept_compression_encodings,
7780 send_compression_encodings,
7781 )
7782 .apply_max_message_size_config(
7783 max_decoding_message_size,
7784 max_encoding_message_size,
7785 );
7786 let res = grpc.unary(method, req).await;
7787 Ok(res)
7788 };
7789 Box::pin(fut)
7790 }
7791 _ => {
7792 Box::pin(async move {
7793 let mut response = http::Response::new(empty_body());
7794 let headers = response.headers_mut();
7795 headers
7796 .insert(
7797 tonic::Status::GRPC_STATUS,
7798 (tonic::Code::Unimplemented as i32).into(),
7799 );
7800 headers
7801 .insert(
7802 http::header::CONTENT_TYPE,
7803 tonic::metadata::GRPC_CONTENT_TYPE,
7804 );
7805 Ok(response)
7806 })
7807 }
7808 }
7809 }
7810 }
7811 impl<T> Clone for EventLogServiceServer<T> {
7812 fn clone(&self) -> Self {
7813 let inner = self.inner.clone();
7814 Self {
7815 inner,
7816 accept_compression_encodings: self.accept_compression_encodings,
7817 send_compression_encodings: self.send_compression_encodings,
7818 max_decoding_message_size: self.max_decoding_message_size,
7819 max_encoding_message_size: self.max_encoding_message_size,
7820 }
7821 }
7822 }
7823 pub const SERVICE_NAME: &str = "meta.EventLogService";
7825 impl<T> tonic::server::NamedService for EventLogServiceServer<T> {
7826 const NAME: &'static str = SERVICE_NAME;
7827 }
7828}
7829pub mod cluster_limit_service_server {
7831 #![allow(
7832 unused_variables,
7833 dead_code,
7834 missing_docs,
7835 clippy::wildcard_imports,
7836 clippy::let_unit_value,
7837 )]
7838 use tonic::codegen::*;
7839 #[async_trait]
7841 pub trait ClusterLimitService: std::marker::Send + std::marker::Sync + 'static {
7842 async fn get_cluster_limits(
7843 &self,
7844 request: tonic::Request<super::GetClusterLimitsRequest>,
7845 ) -> std::result::Result<
7846 tonic::Response<super::GetClusterLimitsResponse>,
7847 tonic::Status,
7848 >;
7849 }
7850 #[derive(Debug)]
7851 pub struct ClusterLimitServiceServer<T> {
7852 inner: Arc<T>,
7853 accept_compression_encodings: EnabledCompressionEncodings,
7854 send_compression_encodings: EnabledCompressionEncodings,
7855 max_decoding_message_size: Option<usize>,
7856 max_encoding_message_size: Option<usize>,
7857 }
7858 impl<T> ClusterLimitServiceServer<T> {
7859 pub fn new(inner: T) -> Self {
7860 Self::from_arc(Arc::new(inner))
7861 }
7862 pub fn from_arc(inner: Arc<T>) -> Self {
7863 Self {
7864 inner,
7865 accept_compression_encodings: Default::default(),
7866 send_compression_encodings: Default::default(),
7867 max_decoding_message_size: None,
7868 max_encoding_message_size: None,
7869 }
7870 }
7871 pub fn with_interceptor<F>(
7872 inner: T,
7873 interceptor: F,
7874 ) -> InterceptedService<Self, F>
7875 where
7876 F: tonic::service::Interceptor,
7877 {
7878 InterceptedService::new(Self::new(inner), interceptor)
7879 }
7880 #[must_use]
7882 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
7883 self.accept_compression_encodings.enable(encoding);
7884 self
7885 }
7886 #[must_use]
7888 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
7889 self.send_compression_encodings.enable(encoding);
7890 self
7891 }
7892 #[must_use]
7896 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
7897 self.max_decoding_message_size = Some(limit);
7898 self
7899 }
7900 #[must_use]
7904 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
7905 self.max_encoding_message_size = Some(limit);
7906 self
7907 }
7908 }
7909 impl<T, B> tonic::codegen::Service<http::Request<B>> for ClusterLimitServiceServer<T>
7910 where
7911 T: ClusterLimitService,
7912 B: Body + std::marker::Send + 'static,
7913 B::Error: Into<StdError> + std::marker::Send + 'static,
7914 {
7915 type Response = http::Response<tonic::body::BoxBody>;
7916 type Error = std::convert::Infallible;
7917 type Future = BoxFuture<Self::Response, Self::Error>;
7918 fn poll_ready(
7919 &mut self,
7920 _cx: &mut Context<'_>,
7921 ) -> Poll<std::result::Result<(), Self::Error>> {
7922 Poll::Ready(Ok(()))
7923 }
7924 fn call(&mut self, req: http::Request<B>) -> Self::Future {
7925 match req.uri().path() {
7926 "/meta.ClusterLimitService/GetClusterLimits" => {
7927 #[allow(non_camel_case_types)]
7928 struct GetClusterLimitsSvc<T: ClusterLimitService>(pub Arc<T>);
7929 impl<
7930 T: ClusterLimitService,
7931 > tonic::server::UnaryService<super::GetClusterLimitsRequest>
7932 for GetClusterLimitsSvc<T> {
7933 type Response = super::GetClusterLimitsResponse;
7934 type Future = BoxFuture<
7935 tonic::Response<Self::Response>,
7936 tonic::Status,
7937 >;
7938 fn call(
7939 &mut self,
7940 request: tonic::Request<super::GetClusterLimitsRequest>,
7941 ) -> Self::Future {
7942 let inner = Arc::clone(&self.0);
7943 let fut = async move {
7944 <T as ClusterLimitService>::get_cluster_limits(
7945 &inner,
7946 request,
7947 )
7948 .await
7949 };
7950 Box::pin(fut)
7951 }
7952 }
7953 let accept_compression_encodings = self.accept_compression_encodings;
7954 let send_compression_encodings = self.send_compression_encodings;
7955 let max_decoding_message_size = self.max_decoding_message_size;
7956 let max_encoding_message_size = self.max_encoding_message_size;
7957 let inner = self.inner.clone();
7958 let fut = async move {
7959 let method = GetClusterLimitsSvc(inner);
7960 let codec = tonic::codec::ProstCodec::default();
7961 let mut grpc = tonic::server::Grpc::new(codec)
7962 .apply_compression_config(
7963 accept_compression_encodings,
7964 send_compression_encodings,
7965 )
7966 .apply_max_message_size_config(
7967 max_decoding_message_size,
7968 max_encoding_message_size,
7969 );
7970 let res = grpc.unary(method, req).await;
7971 Ok(res)
7972 };
7973 Box::pin(fut)
7974 }
7975 _ => {
7976 Box::pin(async move {
7977 let mut response = http::Response::new(empty_body());
7978 let headers = response.headers_mut();
7979 headers
7980 .insert(
7981 tonic::Status::GRPC_STATUS,
7982 (tonic::Code::Unimplemented as i32).into(),
7983 );
7984 headers
7985 .insert(
7986 http::header::CONTENT_TYPE,
7987 tonic::metadata::GRPC_CONTENT_TYPE,
7988 );
7989 Ok(response)
7990 })
7991 }
7992 }
7993 }
7994 }
7995 impl<T> Clone for ClusterLimitServiceServer<T> {
7996 fn clone(&self) -> Self {
7997 let inner = self.inner.clone();
7998 Self {
7999 inner,
8000 accept_compression_encodings: self.accept_compression_encodings,
8001 send_compression_encodings: self.send_compression_encodings,
8002 max_decoding_message_size: self.max_decoding_message_size,
8003 max_encoding_message_size: self.max_encoding_message_size,
8004 }
8005 }
8006 }
8007 pub const SERVICE_NAME: &str = "meta.ClusterLimitService";
8009 impl<T> tonic::server::NamedService for ClusterLimitServiceServer<T> {
8010 const NAME: &'static str = SERVICE_NAME;
8011 }
8012}
8013pub mod hosted_iceberg_catalog_service_server {
8015 #![allow(
8016 unused_variables,
8017 dead_code,
8018 missing_docs,
8019 clippy::wildcard_imports,
8020 clippy::let_unit_value,
8021 )]
8022 use tonic::codegen::*;
8023 #[async_trait]
8025 pub trait HostedIcebergCatalogService: std::marker::Send + std::marker::Sync + 'static {
8026 async fn list_iceberg_tables(
8027 &self,
8028 request: tonic::Request<super::ListIcebergTablesRequest>,
8029 ) -> std::result::Result<
8030 tonic::Response<super::ListIcebergTablesResponse>,
8031 tonic::Status,
8032 >;
8033 }
8034 #[derive(Debug)]
8035 pub struct HostedIcebergCatalogServiceServer<T> {
8036 inner: Arc<T>,
8037 accept_compression_encodings: EnabledCompressionEncodings,
8038 send_compression_encodings: EnabledCompressionEncodings,
8039 max_decoding_message_size: Option<usize>,
8040 max_encoding_message_size: Option<usize>,
8041 }
8042 impl<T> HostedIcebergCatalogServiceServer<T> {
8043 pub fn new(inner: T) -> Self {
8044 Self::from_arc(Arc::new(inner))
8045 }
8046 pub fn from_arc(inner: Arc<T>) -> Self {
8047 Self {
8048 inner,
8049 accept_compression_encodings: Default::default(),
8050 send_compression_encodings: Default::default(),
8051 max_decoding_message_size: None,
8052 max_encoding_message_size: None,
8053 }
8054 }
8055 pub fn with_interceptor<F>(
8056 inner: T,
8057 interceptor: F,
8058 ) -> InterceptedService<Self, F>
8059 where
8060 F: tonic::service::Interceptor,
8061 {
8062 InterceptedService::new(Self::new(inner), interceptor)
8063 }
8064 #[must_use]
8066 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
8067 self.accept_compression_encodings.enable(encoding);
8068 self
8069 }
8070 #[must_use]
8072 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
8073 self.send_compression_encodings.enable(encoding);
8074 self
8075 }
8076 #[must_use]
8080 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
8081 self.max_decoding_message_size = Some(limit);
8082 self
8083 }
8084 #[must_use]
8088 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
8089 self.max_encoding_message_size = Some(limit);
8090 self
8091 }
8092 }
8093 impl<T, B> tonic::codegen::Service<http::Request<B>>
8094 for HostedIcebergCatalogServiceServer<T>
8095 where
8096 T: HostedIcebergCatalogService,
8097 B: Body + std::marker::Send + 'static,
8098 B::Error: Into<StdError> + std::marker::Send + 'static,
8099 {
8100 type Response = http::Response<tonic::body::BoxBody>;
8101 type Error = std::convert::Infallible;
8102 type Future = BoxFuture<Self::Response, Self::Error>;
8103 fn poll_ready(
8104 &mut self,
8105 _cx: &mut Context<'_>,
8106 ) -> Poll<std::result::Result<(), Self::Error>> {
8107 Poll::Ready(Ok(()))
8108 }
8109 fn call(&mut self, req: http::Request<B>) -> Self::Future {
8110 match req.uri().path() {
8111 "/meta.HostedIcebergCatalogService/ListIcebergTables" => {
8112 #[allow(non_camel_case_types)]
8113 struct ListIcebergTablesSvc<T: HostedIcebergCatalogService>(
8114 pub Arc<T>,
8115 );
8116 impl<
8117 T: HostedIcebergCatalogService,
8118 > tonic::server::UnaryService<super::ListIcebergTablesRequest>
8119 for ListIcebergTablesSvc<T> {
8120 type Response = super::ListIcebergTablesResponse;
8121 type Future = BoxFuture<
8122 tonic::Response<Self::Response>,
8123 tonic::Status,
8124 >;
8125 fn call(
8126 &mut self,
8127 request: tonic::Request<super::ListIcebergTablesRequest>,
8128 ) -> Self::Future {
8129 let inner = Arc::clone(&self.0);
8130 let fut = async move {
8131 <T as HostedIcebergCatalogService>::list_iceberg_tables(
8132 &inner,
8133 request,
8134 )
8135 .await
8136 };
8137 Box::pin(fut)
8138 }
8139 }
8140 let accept_compression_encodings = self.accept_compression_encodings;
8141 let send_compression_encodings = self.send_compression_encodings;
8142 let max_decoding_message_size = self.max_decoding_message_size;
8143 let max_encoding_message_size = self.max_encoding_message_size;
8144 let inner = self.inner.clone();
8145 let fut = async move {
8146 let method = ListIcebergTablesSvc(inner);
8147 let codec = tonic::codec::ProstCodec::default();
8148 let mut grpc = tonic::server::Grpc::new(codec)
8149 .apply_compression_config(
8150 accept_compression_encodings,
8151 send_compression_encodings,
8152 )
8153 .apply_max_message_size_config(
8154 max_decoding_message_size,
8155 max_encoding_message_size,
8156 );
8157 let res = grpc.unary(method, req).await;
8158 Ok(res)
8159 };
8160 Box::pin(fut)
8161 }
8162 _ => {
8163 Box::pin(async move {
8164 let mut response = http::Response::new(empty_body());
8165 let headers = response.headers_mut();
8166 headers
8167 .insert(
8168 tonic::Status::GRPC_STATUS,
8169 (tonic::Code::Unimplemented as i32).into(),
8170 );
8171 headers
8172 .insert(
8173 http::header::CONTENT_TYPE,
8174 tonic::metadata::GRPC_CONTENT_TYPE,
8175 );
8176 Ok(response)
8177 })
8178 }
8179 }
8180 }
8181 }
8182 impl<T> Clone for HostedIcebergCatalogServiceServer<T> {
8183 fn clone(&self) -> Self {
8184 let inner = self.inner.clone();
8185 Self {
8186 inner,
8187 accept_compression_encodings: self.accept_compression_encodings,
8188 send_compression_encodings: self.send_compression_encodings,
8189 max_decoding_message_size: self.max_decoding_message_size,
8190 max_encoding_message_size: self.max_encoding_message_size,
8191 }
8192 }
8193 }
8194 pub const SERVICE_NAME: &str = "meta.HostedIcebergCatalogService";
8196 impl<T> tonic::server::NamedService for HostedIcebergCatalogServiceServer<T> {
8197 const NAME: &'static str = SERVICE_NAME;
8198 }
8199}