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