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