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