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