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