1#[allow(clippy::derive_partial_eq_without_eq)]
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct RequestHeader {
4 #[prost(uint64, tag = "1")]
6 pub cluster_id: u64,
7 #[prost(uint64, tag = "2")]
9 pub sender_id: u64,
10}
11#[allow(clippy::derive_partial_eq_without_eq)]
12#[derive(Clone, PartialEq, ::prost::Message)]
13pub struct ResponseHeader {
14 #[prost(uint64, tag = "1")]
16 pub cluster_id: u64,
17 #[prost(message, optional, tag = "2")]
18 pub error: ::core::option::Option<Error>,
19}
20#[allow(clippy::derive_partial_eq_without_eq)]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct Error {
23 #[prost(enumeration = "ErrorType", tag = "1")]
24 pub r#type: i32,
25 #[prost(string, tag = "2")]
26 pub message: ::prost::alloc::string::String,
27}
28#[allow(clippy::derive_partial_eq_without_eq)]
29#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct TsoRequest {
31 #[prost(message, optional, tag = "1")]
32 pub header: ::core::option::Option<RequestHeader>,
33 #[prost(uint32, tag = "2")]
34 pub count: u32,
35 #[prost(string, tag = "3")]
36 pub dc_location: ::prost::alloc::string::String,
37}
38#[allow(clippy::derive_partial_eq_without_eq)]
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct Timestamp {
41 #[prost(int64, tag = "1")]
42 pub physical: i64,
43 #[prost(int64, tag = "2")]
44 pub logical: i64,
45 #[prost(uint32, tag = "3")]
48 pub suffix_bits: u32,
49}
50#[allow(clippy::derive_partial_eq_without_eq)]
51#[derive(Clone, PartialEq, ::prost::Message)]
52pub struct TsoResponse {
53 #[prost(message, optional, tag = "1")]
54 pub header: ::core::option::Option<ResponseHeader>,
55 #[prost(uint32, tag = "2")]
56 pub count: u32,
57 #[prost(message, optional, tag = "3")]
58 pub timestamp: ::core::option::Option<Timestamp>,
59}
60#[allow(clippy::derive_partial_eq_without_eq)]
61#[derive(Clone, PartialEq, ::prost::Message)]
62pub struct BootstrapRequest {
63 #[prost(message, optional, tag = "1")]
64 pub header: ::core::option::Option<RequestHeader>,
65 #[prost(message, optional, tag = "2")]
66 pub store: ::core::option::Option<super::metapb::Store>,
67 #[prost(message, optional, tag = "3")]
68 pub region: ::core::option::Option<super::metapb::Region>,
69}
70#[allow(clippy::derive_partial_eq_without_eq)]
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct BootstrapResponse {
73 #[prost(message, optional, tag = "1")]
74 pub header: ::core::option::Option<ResponseHeader>,
75 #[prost(message, optional, tag = "2")]
76 pub replication_status: ::core::option::Option<
77 super::replication_modepb::ReplicationStatus,
78 >,
79}
80#[allow(clippy::derive_partial_eq_without_eq)]
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct IsBootstrappedRequest {
83 #[prost(message, optional, tag = "1")]
84 pub header: ::core::option::Option<RequestHeader>,
85}
86#[allow(clippy::derive_partial_eq_without_eq)]
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct IsBootstrappedResponse {
89 #[prost(message, optional, tag = "1")]
90 pub header: ::core::option::Option<ResponseHeader>,
91 #[prost(bool, tag = "2")]
92 pub bootstrapped: bool,
93}
94#[allow(clippy::derive_partial_eq_without_eq)]
95#[derive(Clone, PartialEq, ::prost::Message)]
96pub struct AllocIdRequest {
97 #[prost(message, optional, tag = "1")]
98 pub header: ::core::option::Option<RequestHeader>,
99}
100#[allow(clippy::derive_partial_eq_without_eq)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct AllocIdResponse {
103 #[prost(message, optional, tag = "1")]
104 pub header: ::core::option::Option<ResponseHeader>,
105 #[prost(uint64, tag = "2")]
106 pub id: u64,
107}
108#[allow(clippy::derive_partial_eq_without_eq)]
109#[derive(Clone, PartialEq, ::prost::Message)]
110pub struct GetStoreRequest {
111 #[prost(message, optional, tag = "1")]
112 pub header: ::core::option::Option<RequestHeader>,
113 #[prost(uint64, tag = "2")]
114 pub store_id: u64,
115}
116#[allow(clippy::derive_partial_eq_without_eq)]
117#[derive(Clone, PartialEq, ::prost::Message)]
118pub struct GetStoreResponse {
119 #[prost(message, optional, tag = "1")]
120 pub header: ::core::option::Option<ResponseHeader>,
121 #[prost(message, optional, tag = "2")]
122 pub store: ::core::option::Option<super::metapb::Store>,
123 #[prost(message, optional, tag = "3")]
124 pub stats: ::core::option::Option<StoreStats>,
125}
126#[allow(clippy::derive_partial_eq_without_eq)]
127#[derive(Clone, PartialEq, ::prost::Message)]
128pub struct PutStoreRequest {
129 #[prost(message, optional, tag = "1")]
130 pub header: ::core::option::Option<RequestHeader>,
131 #[prost(message, optional, tag = "2")]
132 pub store: ::core::option::Option<super::metapb::Store>,
133}
134#[allow(clippy::derive_partial_eq_without_eq)]
135#[derive(Clone, PartialEq, ::prost::Message)]
136pub struct PutStoreResponse {
137 #[prost(message, optional, tag = "1")]
138 pub header: ::core::option::Option<ResponseHeader>,
139 #[prost(message, optional, tag = "2")]
140 pub replication_status: ::core::option::Option<
141 super::replication_modepb::ReplicationStatus,
142 >,
143}
144#[allow(clippy::derive_partial_eq_without_eq)]
145#[derive(Clone, PartialEq, ::prost::Message)]
146pub struct GetAllStoresRequest {
147 #[prost(message, optional, tag = "1")]
148 pub header: ::core::option::Option<RequestHeader>,
149 #[prost(bool, tag = "2")]
151 pub exclude_tombstone_stores: bool,
152}
153#[allow(clippy::derive_partial_eq_without_eq)]
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct GetAllStoresResponse {
156 #[prost(message, optional, tag = "1")]
157 pub header: ::core::option::Option<ResponseHeader>,
158 #[prost(message, repeated, tag = "2")]
159 pub stores: ::prost::alloc::vec::Vec<super::metapb::Store>,
160}
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct GetRegionRequest {
164 #[prost(message, optional, tag = "1")]
165 pub header: ::core::option::Option<RequestHeader>,
166 #[prost(bytes = "vec", tag = "2")]
167 pub region_key: ::prost::alloc::vec::Vec<u8>,
168}
169#[allow(clippy::derive_partial_eq_without_eq)]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct GetRegionResponse {
172 #[prost(message, optional, tag = "1")]
173 pub header: ::core::option::Option<ResponseHeader>,
174 #[prost(message, optional, tag = "2")]
175 pub region: ::core::option::Option<super::metapb::Region>,
176 #[prost(message, optional, tag = "3")]
177 pub leader: ::core::option::Option<super::metapb::Peer>,
178 #[prost(message, repeated, tag = "5")]
180 pub down_peers: ::prost::alloc::vec::Vec<PeerStats>,
181 #[prost(message, repeated, tag = "6")]
184 pub pending_peers: ::prost::alloc::vec::Vec<super::metapb::Peer>,
185}
186#[allow(clippy::derive_partial_eq_without_eq)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct GetRegionByIdRequest {
189 #[prost(message, optional, tag = "1")]
190 pub header: ::core::option::Option<RequestHeader>,
191 #[prost(uint64, tag = "2")]
192 pub region_id: u64,
193}
194#[allow(clippy::derive_partial_eq_without_eq)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct ScanRegionsRequest {
197 #[prost(message, optional, tag = "1")]
198 pub header: ::core::option::Option<RequestHeader>,
199 #[prost(bytes = "vec", tag = "2")]
200 pub start_key: ::prost::alloc::vec::Vec<u8>,
201 #[prost(int32, tag = "3")]
203 pub limit: i32,
204 #[prost(bytes = "vec", tag = "4")]
206 pub end_key: ::prost::alloc::vec::Vec<u8>,
207}
208#[allow(clippy::derive_partial_eq_without_eq)]
209#[derive(Clone, PartialEq, ::prost::Message)]
210pub struct Region {
211 #[prost(message, optional, tag = "1")]
212 pub region: ::core::option::Option<super::metapb::Region>,
213 #[prost(message, optional, tag = "2")]
214 pub leader: ::core::option::Option<super::metapb::Peer>,
215 #[prost(message, repeated, tag = "3")]
217 pub down_peers: ::prost::alloc::vec::Vec<PeerStats>,
218 #[prost(message, repeated, tag = "4")]
221 pub pending_peers: ::prost::alloc::vec::Vec<super::metapb::Peer>,
222}
223#[allow(clippy::derive_partial_eq_without_eq)]
224#[derive(Clone, PartialEq, ::prost::Message)]
225pub struct ScanRegionsResponse {
226 #[prost(message, optional, tag = "1")]
227 pub header: ::core::option::Option<ResponseHeader>,
228 #[prost(message, repeated, tag = "2")]
230 pub region_metas: ::prost::alloc::vec::Vec<super::metapb::Region>,
231 #[prost(message, repeated, tag = "3")]
232 pub leaders: ::prost::alloc::vec::Vec<super::metapb::Peer>,
233 #[prost(message, repeated, tag = "4")]
235 pub regions: ::prost::alloc::vec::Vec<Region>,
236}
237#[allow(clippy::derive_partial_eq_without_eq)]
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct GetClusterConfigRequest {
240 #[prost(message, optional, tag = "1")]
241 pub header: ::core::option::Option<RequestHeader>,
242}
243#[allow(clippy::derive_partial_eq_without_eq)]
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct GetClusterConfigResponse {
246 #[prost(message, optional, tag = "1")]
247 pub header: ::core::option::Option<ResponseHeader>,
248 #[prost(message, optional, tag = "2")]
249 pub cluster: ::core::option::Option<super::metapb::Cluster>,
250}
251#[allow(clippy::derive_partial_eq_without_eq)]
252#[derive(Clone, PartialEq, ::prost::Message)]
253pub struct PutClusterConfigRequest {
254 #[prost(message, optional, tag = "1")]
255 pub header: ::core::option::Option<RequestHeader>,
256 #[prost(message, optional, tag = "2")]
257 pub cluster: ::core::option::Option<super::metapb::Cluster>,
258}
259#[allow(clippy::derive_partial_eq_without_eq)]
260#[derive(Clone, PartialEq, ::prost::Message)]
261pub struct PutClusterConfigResponse {
262 #[prost(message, optional, tag = "1")]
263 pub header: ::core::option::Option<ResponseHeader>,
264}
265#[allow(clippy::derive_partial_eq_without_eq)]
266#[derive(Clone, PartialEq, ::prost::Message)]
267pub struct Member {
268 #[prost(string, tag = "1")]
270 pub name: ::prost::alloc::string::String,
271 #[prost(uint64, tag = "2")]
273 pub member_id: u64,
274 #[prost(string, repeated, tag = "3")]
275 pub peer_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
276 #[prost(string, repeated, tag = "4")]
277 pub client_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
278 #[prost(int32, tag = "5")]
279 pub leader_priority: i32,
280 #[prost(string, tag = "6")]
281 pub deploy_path: ::prost::alloc::string::String,
282 #[prost(string, tag = "7")]
283 pub binary_version: ::prost::alloc::string::String,
284 #[prost(string, tag = "8")]
285 pub git_hash: ::prost::alloc::string::String,
286 #[prost(string, tag = "9")]
287 pub dc_location: ::prost::alloc::string::String,
288}
289#[allow(clippy::derive_partial_eq_without_eq)]
290#[derive(Clone, PartialEq, ::prost::Message)]
291pub struct GetMembersRequest {
292 #[prost(message, optional, tag = "1")]
293 pub header: ::core::option::Option<RequestHeader>,
294}
295#[allow(clippy::derive_partial_eq_without_eq)]
296#[derive(Clone, PartialEq, ::prost::Message)]
297pub struct GetMembersResponse {
298 #[prost(message, optional, tag = "1")]
299 pub header: ::core::option::Option<ResponseHeader>,
300 #[prost(message, repeated, tag = "2")]
301 pub members: ::prost::alloc::vec::Vec<Member>,
302 #[prost(message, optional, tag = "3")]
303 pub leader: ::core::option::Option<Member>,
304 #[prost(message, optional, tag = "4")]
305 pub etcd_leader: ::core::option::Option<Member>,
306 #[prost(map = "string, message", tag = "5")]
307 pub tso_allocator_leaders: ::std::collections::HashMap<
308 ::prost::alloc::string::String,
309 Member,
310 >,
311}
312#[allow(clippy::derive_partial_eq_without_eq)]
313#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct PeerStats {
315 #[prost(message, optional, tag = "1")]
316 pub peer: ::core::option::Option<super::metapb::Peer>,
317 #[prost(uint64, tag = "2")]
318 pub down_seconds: u64,
319}
320#[allow(clippy::derive_partial_eq_without_eq)]
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct RegionHeartbeatRequest {
323 #[prost(message, optional, tag = "1")]
324 pub header: ::core::option::Option<RequestHeader>,
325 #[prost(message, optional, tag = "2")]
326 pub region: ::core::option::Option<super::metapb::Region>,
327 #[prost(message, optional, tag = "3")]
329 pub leader: ::core::option::Option<super::metapb::Peer>,
330 #[prost(message, repeated, tag = "4")]
332 pub down_peers: ::prost::alloc::vec::Vec<PeerStats>,
333 #[prost(message, repeated, tag = "5")]
336 pub pending_peers: ::prost::alloc::vec::Vec<super::metapb::Peer>,
337 #[prost(uint64, tag = "6")]
339 pub bytes_written: u64,
340 #[prost(uint64, tag = "7")]
341 pub bytes_read: u64,
342 #[prost(uint64, tag = "8")]
344 pub keys_written: u64,
345 #[prost(uint64, tag = "9")]
346 pub keys_read: u64,
347 #[prost(uint64, tag = "10")]
349 pub approximate_size: u64,
350 #[prost(message, optional, tag = "12")]
352 pub interval: ::core::option::Option<TimeInterval>,
353 #[prost(uint64, tag = "13")]
355 pub approximate_keys: u64,
356 #[prost(uint64, tag = "14")]
358 pub term: u64,
359 #[prost(message, optional, tag = "15")]
360 pub replication_status: ::core::option::Option<
361 super::replication_modepb::RegionReplicationStatus,
362 >,
363 #[prost(message, optional, tag = "16")]
365 pub query_stats: ::core::option::Option<QueryStats>,
366 #[prost(uint64, tag = "17")]
369 pub cpu_usage: u64,
370}
371#[allow(clippy::derive_partial_eq_without_eq)]
372#[derive(Clone, PartialEq, ::prost::Message)]
373pub struct ChangePeer {
374 #[prost(message, optional, tag = "1")]
375 pub peer: ::core::option::Option<super::metapb::Peer>,
376 #[prost(enumeration = "super::eraftpb::ConfChangeType", tag = "2")]
377 pub change_type: i32,
378}
379#[allow(clippy::derive_partial_eq_without_eq)]
380#[derive(Clone, PartialEq, ::prost::Message)]
381pub struct ChangePeerV2 {
382 #[prost(message, repeated, tag = "1")]
384 pub changes: ::prost::alloc::vec::Vec<ChangePeer>,
385}
386#[allow(clippy::derive_partial_eq_without_eq)]
387#[derive(Clone, PartialEq, ::prost::Message)]
388pub struct TransferLeader {
389 #[prost(message, optional, tag = "1")]
390 pub peer: ::core::option::Option<super::metapb::Peer>,
391 #[prost(message, repeated, tag = "2")]
392 pub peers: ::prost::alloc::vec::Vec<super::metapb::Peer>,
393}
394#[allow(clippy::derive_partial_eq_without_eq)]
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct Merge {
397 #[prost(message, optional, tag = "1")]
398 pub target: ::core::option::Option<super::metapb::Region>,
399}
400#[allow(clippy::derive_partial_eq_without_eq)]
401#[derive(Clone, PartialEq, ::prost::Message)]
402pub struct SplitRegion {
403 #[prost(enumeration = "CheckPolicy", tag = "1")]
404 pub policy: i32,
405 #[prost(bytes = "vec", repeated, tag = "2")]
406 pub keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
407}
408#[allow(clippy::derive_partial_eq_without_eq)]
409#[derive(Clone, PartialEq, ::prost::Message)]
410pub struct RegionHeartbeatResponse {
411 #[prost(message, optional, tag = "1")]
412 pub header: ::core::option::Option<ResponseHeader>,
413 #[prost(message, optional, tag = "2")]
429 pub change_peer: ::core::option::Option<ChangePeer>,
430 #[prost(message, optional, tag = "3")]
432 pub transfer_leader: ::core::option::Option<TransferLeader>,
433 #[prost(uint64, tag = "4")]
435 pub region_id: u64,
436 #[prost(message, optional, tag = "5")]
437 pub region_epoch: ::core::option::Option<super::metapb::RegionEpoch>,
438 #[prost(message, optional, tag = "6")]
440 pub target_peer: ::core::option::Option<super::metapb::Peer>,
441 #[prost(message, optional, tag = "7")]
442 pub merge: ::core::option::Option<Merge>,
443 #[prost(message, optional, tag = "8")]
445 pub split_region: ::core::option::Option<SplitRegion>,
446 #[prost(message, optional, tag = "9")]
451 pub change_peer_v2: ::core::option::Option<ChangePeerV2>,
452}
453#[allow(clippy::derive_partial_eq_without_eq)]
454#[derive(Clone, PartialEq, ::prost::Message)]
455pub struct AskSplitRequest {
456 #[prost(message, optional, tag = "1")]
457 pub header: ::core::option::Option<RequestHeader>,
458 #[prost(message, optional, tag = "2")]
459 pub region: ::core::option::Option<super::metapb::Region>,
460}
461#[allow(clippy::derive_partial_eq_without_eq)]
462#[derive(Clone, PartialEq, ::prost::Message)]
463pub struct AskSplitResponse {
464 #[prost(message, optional, tag = "1")]
465 pub header: ::core::option::Option<ResponseHeader>,
466 #[prost(uint64, tag = "2")]
470 pub new_region_id: u64,
471 #[prost(uint64, repeated, tag = "3")]
473 pub new_peer_ids: ::prost::alloc::vec::Vec<u64>,
474}
475#[allow(clippy::derive_partial_eq_without_eq)]
476#[derive(Clone, PartialEq, ::prost::Message)]
477pub struct ReportSplitRequest {
478 #[prost(message, optional, tag = "1")]
479 pub header: ::core::option::Option<RequestHeader>,
480 #[prost(message, optional, tag = "2")]
481 pub left: ::core::option::Option<super::metapb::Region>,
482 #[prost(message, optional, tag = "3")]
483 pub right: ::core::option::Option<super::metapb::Region>,
484}
485#[allow(clippy::derive_partial_eq_without_eq)]
486#[derive(Clone, PartialEq, ::prost::Message)]
487pub struct ReportSplitResponse {
488 #[prost(message, optional, tag = "1")]
489 pub header: ::core::option::Option<ResponseHeader>,
490}
491#[allow(clippy::derive_partial_eq_without_eq)]
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct AskBatchSplitRequest {
494 #[prost(message, optional, tag = "1")]
495 pub header: ::core::option::Option<RequestHeader>,
496 #[prost(message, optional, tag = "2")]
497 pub region: ::core::option::Option<super::metapb::Region>,
498 #[prost(uint32, tag = "3")]
499 pub split_count: u32,
500}
501#[allow(clippy::derive_partial_eq_without_eq)]
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct SplitId {
504 #[prost(uint64, tag = "1")]
505 pub new_region_id: u64,
506 #[prost(uint64, repeated, tag = "2")]
507 pub new_peer_ids: ::prost::alloc::vec::Vec<u64>,
508}
509#[allow(clippy::derive_partial_eq_without_eq)]
510#[derive(Clone, PartialEq, ::prost::Message)]
511pub struct AskBatchSplitResponse {
512 #[prost(message, optional, tag = "1")]
513 pub header: ::core::option::Option<ResponseHeader>,
514 #[prost(message, repeated, tag = "2")]
515 pub ids: ::prost::alloc::vec::Vec<SplitId>,
516}
517#[allow(clippy::derive_partial_eq_without_eq)]
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct ReportBatchSplitRequest {
520 #[prost(message, optional, tag = "1")]
521 pub header: ::core::option::Option<RequestHeader>,
522 #[prost(message, repeated, tag = "2")]
523 pub regions: ::prost::alloc::vec::Vec<super::metapb::Region>,
524}
525#[allow(clippy::derive_partial_eq_without_eq)]
526#[derive(Clone, PartialEq, ::prost::Message)]
527pub struct ReportBatchSplitResponse {
528 #[prost(message, optional, tag = "1")]
529 pub header: ::core::option::Option<ResponseHeader>,
530}
531#[allow(clippy::derive_partial_eq_without_eq)]
532#[derive(Clone, PartialEq, ::prost::Message)]
533pub struct TimeInterval {
534 #[prost(uint64, tag = "1")]
536 pub start_timestamp: u64,
537 #[prost(uint64, tag = "2")]
539 pub end_timestamp: u64,
540}
541#[allow(clippy::derive_partial_eq_without_eq)]
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct RecordPair {
544 #[prost(string, tag = "1")]
545 pub key: ::prost::alloc::string::String,
546 #[prost(uint64, tag = "2")]
547 pub value: u64,
548}
549#[allow(clippy::derive_partial_eq_without_eq)]
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct PeerStat {
552 #[prost(uint64, tag = "1")]
553 pub region_id: u64,
554 #[prost(uint64, tag = "2")]
555 pub read_keys: u64,
556 #[prost(uint64, tag = "3")]
557 pub read_bytes: u64,
558 #[prost(message, optional, tag = "4")]
559 pub query_stats: ::core::option::Option<QueryStats>,
560}
561#[allow(clippy::derive_partial_eq_without_eq)]
562#[derive(Clone, PartialEq, ::prost::Message)]
563pub struct StoreStats {
564 #[prost(uint64, tag = "1")]
565 pub store_id: u64,
566 #[prost(uint64, tag = "2")]
568 pub capacity: u64,
569 #[prost(uint64, tag = "3")]
571 pub available: u64,
572 #[prost(uint32, tag = "4")]
574 pub region_count: u32,
575 #[prost(uint32, tag = "5")]
577 pub sending_snap_count: u32,
578 #[prost(uint32, tag = "6")]
580 pub receiving_snap_count: u32,
581 #[prost(uint32, tag = "7")]
583 pub start_time: u32,
584 #[prost(uint32, tag = "8")]
586 pub applying_snap_count: u32,
587 #[prost(bool, tag = "9")]
589 pub is_busy: bool,
590 #[prost(uint64, tag = "10")]
592 pub used_size: u64,
593 #[prost(uint64, tag = "11")]
595 pub bytes_written: u64,
596 #[prost(uint64, tag = "12")]
598 pub keys_written: u64,
599 #[prost(uint64, tag = "13")]
601 pub bytes_read: u64,
602 #[prost(uint64, tag = "14")]
604 pub keys_read: u64,
605 #[prost(message, optional, tag = "15")]
607 pub interval: ::core::option::Option<TimeInterval>,
608 #[prost(message, repeated, tag = "16")]
610 pub cpu_usages: ::prost::alloc::vec::Vec<RecordPair>,
611 #[prost(message, repeated, tag = "17")]
613 pub read_io_rates: ::prost::alloc::vec::Vec<RecordPair>,
614 #[prost(message, repeated, tag = "18")]
616 pub write_io_rates: ::prost::alloc::vec::Vec<RecordPair>,
617 #[prost(message, repeated, tag = "19")]
619 pub op_latencies: ::prost::alloc::vec::Vec<RecordPair>,
620 #[prost(message, repeated, tag = "20")]
622 pub peer_stats: ::prost::alloc::vec::Vec<PeerStat>,
623 #[prost(message, optional, tag = "21")]
625 pub query_stats: ::core::option::Option<QueryStats>,
626 #[prost(uint64, tag = "22")]
628 pub slow_score: u64,
629 #[prost(uint64, repeated, tag = "23")]
631 pub damaged_regions_id: ::prost::alloc::vec::Vec<u64>,
632}
633#[allow(clippy::derive_partial_eq_without_eq)]
634#[derive(Clone, PartialEq, ::prost::Message)]
635pub struct PeerReport {
636 #[prost(message, optional, tag = "1")]
637 pub raft_state: ::core::option::Option<super::raft_serverpb::RaftLocalState>,
638 #[prost(message, optional, tag = "2")]
639 pub region_state: ::core::option::Option<super::raft_serverpb::RegionLocalState>,
640}
641#[allow(clippy::derive_partial_eq_without_eq)]
642#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct StoreReport {
644 #[prost(message, repeated, tag = "1")]
645 pub peer_reports: ::prost::alloc::vec::Vec<PeerReport>,
646}
647#[allow(clippy::derive_partial_eq_without_eq)]
648#[derive(Clone, PartialEq, ::prost::Message)]
649pub struct StoreHeartbeatRequest {
650 #[prost(message, optional, tag = "1")]
651 pub header: ::core::option::Option<RequestHeader>,
652 #[prost(message, optional, tag = "2")]
653 pub stats: ::core::option::Option<StoreStats>,
654 #[prost(message, optional, tag = "3")]
656 pub store_report: ::core::option::Option<StoreReport>,
657}
658#[allow(clippy::derive_partial_eq_without_eq)]
659#[derive(Clone, PartialEq, ::prost::Message)]
660pub struct RecoveryPlan {
661 #[prost(message, repeated, tag = "1")]
662 pub creates: ::prost::alloc::vec::Vec<super::metapb::Region>,
663 #[prost(message, repeated, tag = "2")]
664 pub updates: ::prost::alloc::vec::Vec<super::metapb::Region>,
665 #[prost(uint64, repeated, tag = "3")]
666 pub deletes: ::prost::alloc::vec::Vec<u64>,
667}
668#[allow(clippy::derive_partial_eq_without_eq)]
669#[derive(Clone, PartialEq, ::prost::Message)]
670pub struct StoreHeartbeatResponse {
671 #[prost(message, optional, tag = "1")]
672 pub header: ::core::option::Option<ResponseHeader>,
673 #[prost(message, optional, tag = "2")]
674 pub replication_status: ::core::option::Option<
675 super::replication_modepb::ReplicationStatus,
676 >,
677 #[prost(string, tag = "3")]
678 pub cluster_version: ::prost::alloc::string::String,
679 #[prost(bool, tag = "4")]
680 pub require_detailed_report: bool,
681 #[prost(message, optional, tag = "5")]
682 pub plan: ::core::option::Option<RecoveryPlan>,
683}
684#[allow(clippy::derive_partial_eq_without_eq)]
685#[derive(Clone, PartialEq, ::prost::Message)]
686pub struct ScatterRegionRequest {
687 #[prost(message, optional, tag = "1")]
688 pub header: ::core::option::Option<RequestHeader>,
689 #[deprecated]
690 #[prost(uint64, tag = "2")]
691 pub region_id: u64,
692 #[prost(message, optional, tag = "3")]
695 pub region: ::core::option::Option<super::metapb::Region>,
696 #[prost(message, optional, tag = "4")]
697 pub leader: ::core::option::Option<super::metapb::Peer>,
698 #[prost(string, tag = "5")]
701 pub group: ::prost::alloc::string::String,
702 #[prost(uint64, repeated, tag = "6")]
704 pub regions_id: ::prost::alloc::vec::Vec<u64>,
705 #[prost(uint64, tag = "7")]
706 pub retry_limit: u64,
707}
708#[allow(clippy::derive_partial_eq_without_eq)]
709#[derive(Clone, PartialEq, ::prost::Message)]
710pub struct ScatterRegionResponse {
711 #[prost(message, optional, tag = "1")]
712 pub header: ::core::option::Option<ResponseHeader>,
713 #[prost(uint64, tag = "2")]
714 pub finished_percentage: u64,
715}
716#[allow(clippy::derive_partial_eq_without_eq)]
717#[derive(Clone, PartialEq, ::prost::Message)]
718pub struct GetGcSafePointRequest {
719 #[prost(message, optional, tag = "1")]
720 pub header: ::core::option::Option<RequestHeader>,
721}
722#[allow(clippy::derive_partial_eq_without_eq)]
723#[derive(Clone, PartialEq, ::prost::Message)]
724pub struct GetGcSafePointResponse {
725 #[prost(message, optional, tag = "1")]
726 pub header: ::core::option::Option<ResponseHeader>,
727 #[prost(uint64, tag = "2")]
728 pub safe_point: u64,
729}
730#[allow(clippy::derive_partial_eq_without_eq)]
731#[derive(Clone, PartialEq, ::prost::Message)]
732pub struct UpdateGcSafePointRequest {
733 #[prost(message, optional, tag = "1")]
734 pub header: ::core::option::Option<RequestHeader>,
735 #[prost(uint64, tag = "2")]
736 pub safe_point: u64,
737}
738#[allow(clippy::derive_partial_eq_without_eq)]
739#[derive(Clone, PartialEq, ::prost::Message)]
740pub struct UpdateGcSafePointResponse {
741 #[prost(message, optional, tag = "1")]
742 pub header: ::core::option::Option<ResponseHeader>,
743 #[prost(uint64, tag = "2")]
744 pub new_safe_point: u64,
745}
746#[allow(clippy::derive_partial_eq_without_eq)]
747#[derive(Clone, PartialEq, ::prost::Message)]
748pub struct UpdateServiceGcSafePointRequest {
749 #[prost(message, optional, tag = "1")]
750 pub header: ::core::option::Option<RequestHeader>,
751 #[prost(bytes = "vec", tag = "2")]
752 pub service_id: ::prost::alloc::vec::Vec<u8>,
753 #[prost(int64, tag = "3")]
754 pub ttl: i64,
755 #[prost(uint64, tag = "4")]
756 pub safe_point: u64,
757}
758#[allow(clippy::derive_partial_eq_without_eq)]
759#[derive(Clone, PartialEq, ::prost::Message)]
760pub struct UpdateServiceGcSafePointResponse {
761 #[prost(message, optional, tag = "1")]
762 pub header: ::core::option::Option<ResponseHeader>,
763 #[prost(bytes = "vec", tag = "2")]
764 pub service_id: ::prost::alloc::vec::Vec<u8>,
765 #[prost(int64, tag = "3")]
766 pub ttl: i64,
767 #[prost(uint64, tag = "4")]
768 pub min_safe_point: u64,
769}
770#[allow(clippy::derive_partial_eq_without_eq)]
771#[derive(Clone, PartialEq, ::prost::Message)]
772pub struct RegionStat {
773 #[prost(uint64, tag = "1")]
775 pub bytes_written: u64,
776 #[prost(uint64, tag = "2")]
777 pub bytes_read: u64,
778 #[prost(uint64, tag = "3")]
780 pub keys_written: u64,
781 #[prost(uint64, tag = "4")]
782 pub keys_read: u64,
783}
784#[allow(clippy::derive_partial_eq_without_eq)]
785#[derive(Clone, PartialEq, ::prost::Message)]
786pub struct SyncRegionRequest {
787 #[prost(message, optional, tag = "1")]
788 pub header: ::core::option::Option<RequestHeader>,
789 #[prost(message, optional, tag = "2")]
790 pub member: ::core::option::Option<Member>,
791 #[prost(uint64, tag = "3")]
794 pub start_index: u64,
795}
796#[allow(clippy::derive_partial_eq_without_eq)]
797#[derive(Clone, PartialEq, ::prost::Message)]
798pub struct SyncRegionResponse {
799 #[prost(message, optional, tag = "1")]
800 pub header: ::core::option::Option<ResponseHeader>,
801 #[prost(message, repeated, tag = "2")]
804 pub regions: ::prost::alloc::vec::Vec<super::metapb::Region>,
805 #[prost(uint64, tag = "3")]
806 pub start_index: u64,
807 #[prost(message, repeated, tag = "4")]
808 pub region_stats: ::prost::alloc::vec::Vec<RegionStat>,
809 #[prost(message, repeated, tag = "5")]
810 pub region_leaders: ::prost::alloc::vec::Vec<super::metapb::Peer>,
811}
812#[allow(clippy::derive_partial_eq_without_eq)]
813#[derive(Clone, PartialEq, ::prost::Message)]
814pub struct GetOperatorRequest {
815 #[prost(message, optional, tag = "1")]
816 pub header: ::core::option::Option<RequestHeader>,
817 #[prost(uint64, tag = "2")]
818 pub region_id: u64,
819}
820#[allow(clippy::derive_partial_eq_without_eq)]
821#[derive(Clone, PartialEq, ::prost::Message)]
822pub struct GetOperatorResponse {
823 #[prost(message, optional, tag = "1")]
824 pub header: ::core::option::Option<ResponseHeader>,
825 #[prost(uint64, tag = "2")]
826 pub region_id: u64,
827 #[prost(bytes = "vec", tag = "3")]
828 pub desc: ::prost::alloc::vec::Vec<u8>,
829 #[prost(enumeration = "OperatorStatus", tag = "4")]
830 pub status: i32,
831 #[prost(bytes = "vec", tag = "5")]
832 pub kind: ::prost::alloc::vec::Vec<u8>,
833}
834#[allow(clippy::derive_partial_eq_without_eq)]
835#[derive(Clone, PartialEq, ::prost::Message)]
836pub struct SyncMaxTsRequest {
837 #[prost(message, optional, tag = "1")]
838 pub header: ::core::option::Option<RequestHeader>,
839 #[prost(message, optional, tag = "2")]
840 pub max_ts: ::core::option::Option<Timestamp>,
841 #[prost(bool, tag = "3")]
843 pub skip_check: bool,
844}
845#[allow(clippy::derive_partial_eq_without_eq)]
846#[derive(Clone, PartialEq, ::prost::Message)]
847pub struct SyncMaxTsResponse {
848 #[prost(message, optional, tag = "1")]
849 pub header: ::core::option::Option<ResponseHeader>,
850 #[prost(message, optional, tag = "2")]
851 pub max_local_ts: ::core::option::Option<Timestamp>,
852 #[prost(string, repeated, tag = "3")]
853 pub synced_dcs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
854}
855#[allow(clippy::derive_partial_eq_without_eq)]
856#[derive(Clone, PartialEq, ::prost::Message)]
857pub struct SplitRegionsRequest {
858 #[prost(message, optional, tag = "1")]
859 pub header: ::core::option::Option<RequestHeader>,
860 #[prost(bytes = "vec", repeated, tag = "2")]
861 pub split_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
862 #[prost(uint64, tag = "3")]
863 pub retry_limit: u64,
864}
865#[allow(clippy::derive_partial_eq_without_eq)]
866#[derive(Clone, PartialEq, ::prost::Message)]
867pub struct SplitRegionsResponse {
868 #[prost(message, optional, tag = "1")]
869 pub header: ::core::option::Option<ResponseHeader>,
870 #[prost(uint64, tag = "2")]
871 pub finished_percentage: u64,
872 #[prost(uint64, repeated, tag = "3")]
873 pub regions_id: ::prost::alloc::vec::Vec<u64>,
874}
875#[allow(clippy::derive_partial_eq_without_eq)]
876#[derive(Clone, PartialEq, ::prost::Message)]
877pub struct SplitAndScatterRegionsRequest {
878 #[prost(message, optional, tag = "1")]
879 pub header: ::core::option::Option<RequestHeader>,
880 #[prost(bytes = "vec", repeated, tag = "2")]
881 pub split_keys: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
882 #[prost(string, tag = "3")]
883 pub group: ::prost::alloc::string::String,
884 #[prost(uint64, tag = "4")]
885 pub retry_limit: u64,
886}
887#[allow(clippy::derive_partial_eq_without_eq)]
888#[derive(Clone, PartialEq, ::prost::Message)]
889pub struct SplitAndScatterRegionsResponse {
890 #[prost(message, optional, tag = "1")]
891 pub header: ::core::option::Option<ResponseHeader>,
892 #[prost(uint64, tag = "2")]
893 pub split_finished_percentage: u64,
894 #[prost(uint64, tag = "3")]
895 pub scatter_finished_percentage: u64,
896 #[prost(uint64, repeated, tag = "4")]
897 pub regions_id: ::prost::alloc::vec::Vec<u64>,
898}
899#[allow(clippy::derive_partial_eq_without_eq)]
900#[derive(Clone, PartialEq, ::prost::Message)]
901pub struct GetDcLocationInfoRequest {
902 #[prost(message, optional, tag = "1")]
903 pub header: ::core::option::Option<RequestHeader>,
904 #[prost(string, tag = "2")]
905 pub dc_location: ::prost::alloc::string::String,
906}
907#[allow(clippy::derive_partial_eq_without_eq)]
908#[derive(Clone, PartialEq, ::prost::Message)]
909pub struct GetDcLocationInfoResponse {
910 #[prost(message, optional, tag = "1")]
911 pub header: ::core::option::Option<ResponseHeader>,
912 #[prost(int32, tag = "2")]
914 pub suffix: i32,
915 #[prost(message, optional, tag = "3")]
918 pub max_ts: ::core::option::Option<Timestamp>,
919}
920#[allow(clippy::derive_partial_eq_without_eq)]
921#[derive(Clone, PartialEq, ::prost::Message)]
922pub struct QueryStats {
923 #[prost(uint64, tag = "1")]
924 pub gc: u64,
925 #[prost(uint64, tag = "2")]
926 pub get: u64,
927 #[prost(uint64, tag = "3")]
928 pub scan: u64,
929 #[prost(uint64, tag = "4")]
930 pub coprocessor: u64,
931 #[prost(uint64, tag = "5")]
932 pub delete: u64,
933 #[prost(uint64, tag = "6")]
934 pub delete_range: u64,
935 #[prost(uint64, tag = "7")]
936 pub put: u64,
937 #[prost(uint64, tag = "8")]
938 pub prewrite: u64,
939 #[prost(uint64, tag = "9")]
940 pub acquire_pessimistic_lock: u64,
941 #[prost(uint64, tag = "10")]
942 pub commit: u64,
943 #[prost(uint64, tag = "11")]
944 pub rollback: u64,
945}
946#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
947#[repr(i32)]
948pub enum ErrorType {
949 Ok = 0,
950 Unknown = 1,
951 NotBootstrapped = 2,
952 StoreTombstone = 3,
953 AlreadyBootstrapped = 4,
954 IncompatibleVersion = 5,
955 RegionNotFound = 6,
956}
957impl ErrorType {
958 pub fn as_str_name(&self) -> &'static str {
963 match self {
964 ErrorType::Ok => "OK",
965 ErrorType::Unknown => "UNKNOWN",
966 ErrorType::NotBootstrapped => "NOT_BOOTSTRAPPED",
967 ErrorType::StoreTombstone => "STORE_TOMBSTONE",
968 ErrorType::AlreadyBootstrapped => "ALREADY_BOOTSTRAPPED",
969 ErrorType::IncompatibleVersion => "INCOMPATIBLE_VERSION",
970 ErrorType::RegionNotFound => "REGION_NOT_FOUND",
971 }
972 }
973 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
975 match value {
976 "OK" => Some(Self::Ok),
977 "UNKNOWN" => Some(Self::Unknown),
978 "NOT_BOOTSTRAPPED" => Some(Self::NotBootstrapped),
979 "STORE_TOMBSTONE" => Some(Self::StoreTombstone),
980 "ALREADY_BOOTSTRAPPED" => Some(Self::AlreadyBootstrapped),
981 "INCOMPATIBLE_VERSION" => Some(Self::IncompatibleVersion),
982 "REGION_NOT_FOUND" => Some(Self::RegionNotFound),
983 _ => None,
984 }
985 }
986}
987#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
988#[repr(i32)]
989pub enum CheckPolicy {
990 Scan = 0,
991 Approximate = 1,
992 Usekey = 2,
993}
994impl CheckPolicy {
995 pub fn as_str_name(&self) -> &'static str {
1000 match self {
1001 CheckPolicy::Scan => "SCAN",
1002 CheckPolicy::Approximate => "APPROXIMATE",
1003 CheckPolicy::Usekey => "USEKEY",
1004 }
1005 }
1006 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1008 match value {
1009 "SCAN" => Some(Self::Scan),
1010 "APPROXIMATE" => Some(Self::Approximate),
1011 "USEKEY" => Some(Self::Usekey),
1012 _ => None,
1013 }
1014 }
1015}
1016#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1017#[repr(i32)]
1018pub enum OperatorStatus {
1019 Success = 0,
1020 Timeout = 1,
1021 Cancel = 2,
1022 Replace = 3,
1023 Running = 4,
1024}
1025impl OperatorStatus {
1026 pub fn as_str_name(&self) -> &'static str {
1031 match self {
1032 OperatorStatus::Success => "SUCCESS",
1033 OperatorStatus::Timeout => "TIMEOUT",
1034 OperatorStatus::Cancel => "CANCEL",
1035 OperatorStatus::Replace => "REPLACE",
1036 OperatorStatus::Running => "RUNNING",
1037 }
1038 }
1039 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1041 match value {
1042 "SUCCESS" => Some(Self::Success),
1043 "TIMEOUT" => Some(Self::Timeout),
1044 "CANCEL" => Some(Self::Cancel),
1045 "REPLACE" => Some(Self::Replace),
1046 "RUNNING" => Some(Self::Running),
1047 _ => None,
1048 }
1049 }
1050}
1051#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1052#[repr(i32)]
1053pub enum QueryKind {
1054 Others = 0,
1055 Gc = 1,
1056 Get = 2,
1057 Scan = 3,
1058 Coprocessor = 4,
1059 Delete = 5,
1060 DeleteRange = 6,
1061 Put = 7,
1062 Prewrite = 8,
1063 AcquirePessimisticLock = 9,
1064 Commit = 10,
1065 Rollback = 11,
1066}
1067impl QueryKind {
1068 pub fn as_str_name(&self) -> &'static str {
1073 match self {
1074 QueryKind::Others => "Others",
1075 QueryKind::Gc => "GC",
1076 QueryKind::Get => "Get",
1077 QueryKind::Scan => "Scan",
1078 QueryKind::Coprocessor => "Coprocessor",
1079 QueryKind::Delete => "Delete",
1080 QueryKind::DeleteRange => "DeleteRange",
1081 QueryKind::Put => "Put",
1082 QueryKind::Prewrite => "Prewrite",
1083 QueryKind::AcquirePessimisticLock => "AcquirePessimisticLock",
1084 QueryKind::Commit => "Commit",
1085 QueryKind::Rollback => "Rollback",
1086 }
1087 }
1088 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1090 match value {
1091 "Others" => Some(Self::Others),
1092 "GC" => Some(Self::Gc),
1093 "Get" => Some(Self::Get),
1094 "Scan" => Some(Self::Scan),
1095 "Coprocessor" => Some(Self::Coprocessor),
1096 "Delete" => Some(Self::Delete),
1097 "DeleteRange" => Some(Self::DeleteRange),
1098 "Put" => Some(Self::Put),
1099 "Prewrite" => Some(Self::Prewrite),
1100 "AcquirePessimisticLock" => Some(Self::AcquirePessimisticLock),
1101 "Commit" => Some(Self::Commit),
1102 "Rollback" => Some(Self::Rollback),
1103 _ => None,
1104 }
1105 }
1106}
1107pub mod pd_client {
1109 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1110 use tonic::codegen::*;
1111 use tonic::codegen::http::Uri;
1112 #[derive(Debug, Clone)]
1113 pub struct PdClient<T> {
1114 inner: tonic::client::Grpc<T>,
1115 }
1116 impl PdClient<tonic::transport::Channel> {
1117 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1119 where
1120 D: TryInto<tonic::transport::Endpoint>,
1121 D::Error: Into<StdError>,
1122 {
1123 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1124 Ok(Self::new(conn))
1125 }
1126 }
1127 impl<T> PdClient<T>
1128 where
1129 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1130 T::Error: Into<StdError>,
1131 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1132 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1133 {
1134 pub fn new(inner: T) -> Self {
1135 let inner = tonic::client::Grpc::new(inner);
1136 Self { inner }
1137 }
1138 pub fn with_origin(inner: T, origin: Uri) -> Self {
1139 let inner = tonic::client::Grpc::with_origin(inner, origin);
1140 Self { inner }
1141 }
1142 pub fn with_interceptor<F>(
1143 inner: T,
1144 interceptor: F,
1145 ) -> PdClient<InterceptedService<T, F>>
1146 where
1147 F: tonic::service::Interceptor,
1148 T::ResponseBody: Default,
1149 T: tonic::codegen::Service<
1150 http::Request<tonic::body::BoxBody>,
1151 Response = http::Response<
1152 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1153 >,
1154 >,
1155 <T as tonic::codegen::Service<
1156 http::Request<tonic::body::BoxBody>,
1157 >>::Error: Into<StdError> + Send + Sync,
1158 {
1159 PdClient::new(InterceptedService::new(inner, interceptor))
1160 }
1161 #[must_use]
1166 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1167 self.inner = self.inner.send_compressed(encoding);
1168 self
1169 }
1170 #[must_use]
1172 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1173 self.inner = self.inner.accept_compressed(encoding);
1174 self
1175 }
1176 #[must_use]
1180 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1181 self.inner = self.inner.max_decoding_message_size(limit);
1182 self
1183 }
1184 #[must_use]
1188 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1189 self.inner = self.inner.max_encoding_message_size(limit);
1190 self
1191 }
1192 pub async fn get_members(
1195 &mut self,
1196 request: impl tonic::IntoRequest<super::GetMembersRequest>,
1197 ) -> std::result::Result<
1198 tonic::Response<super::GetMembersResponse>,
1199 tonic::Status,
1200 > {
1201 self.inner
1202 .ready()
1203 .await
1204 .map_err(|e| {
1205 tonic::Status::new(
1206 tonic::Code::Unknown,
1207 format!("Service was not ready: {}", e.into()),
1208 )
1209 })?;
1210 let codec = tonic::codec::ProstCodec::default();
1211 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetMembers");
1212 let mut req = request.into_request();
1213 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetMembers"));
1214 self.inner.unary(req, path, codec).await
1215 }
1216 pub async fn tso(
1217 &mut self,
1218 request: impl tonic::IntoStreamingRequest<Message = super::TsoRequest>,
1219 ) -> std::result::Result<
1220 tonic::Response<tonic::codec::Streaming<super::TsoResponse>>,
1221 tonic::Status,
1222 > {
1223 self.inner
1224 .ready()
1225 .await
1226 .map_err(|e| {
1227 tonic::Status::new(
1228 tonic::Code::Unknown,
1229 format!("Service was not ready: {}", e.into()),
1230 )
1231 })?;
1232 let codec = tonic::codec::ProstCodec::default();
1233 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/Tso");
1234 let mut req = request.into_streaming_request();
1235 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "Tso"));
1236 self.inner.streaming(req, path, codec).await
1237 }
1238 pub async fn bootstrap(
1239 &mut self,
1240 request: impl tonic::IntoRequest<super::BootstrapRequest>,
1241 ) -> std::result::Result<
1242 tonic::Response<super::BootstrapResponse>,
1243 tonic::Status,
1244 > {
1245 self.inner
1246 .ready()
1247 .await
1248 .map_err(|e| {
1249 tonic::Status::new(
1250 tonic::Code::Unknown,
1251 format!("Service was not ready: {}", e.into()),
1252 )
1253 })?;
1254 let codec = tonic::codec::ProstCodec::default();
1255 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/Bootstrap");
1256 let mut req = request.into_request();
1257 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "Bootstrap"));
1258 self.inner.unary(req, path, codec).await
1259 }
1260 pub async fn is_bootstrapped(
1261 &mut self,
1262 request: impl tonic::IntoRequest<super::IsBootstrappedRequest>,
1263 ) -> std::result::Result<
1264 tonic::Response<super::IsBootstrappedResponse>,
1265 tonic::Status,
1266 > {
1267 self.inner
1268 .ready()
1269 .await
1270 .map_err(|e| {
1271 tonic::Status::new(
1272 tonic::Code::Unknown,
1273 format!("Service was not ready: {}", e.into()),
1274 )
1275 })?;
1276 let codec = tonic::codec::ProstCodec::default();
1277 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/IsBootstrapped");
1278 let mut req = request.into_request();
1279 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "IsBootstrapped"));
1280 self.inner.unary(req, path, codec).await
1281 }
1282 pub async fn alloc_id(
1283 &mut self,
1284 request: impl tonic::IntoRequest<super::AllocIdRequest>,
1285 ) -> std::result::Result<
1286 tonic::Response<super::AllocIdResponse>,
1287 tonic::Status,
1288 > {
1289 self.inner
1290 .ready()
1291 .await
1292 .map_err(|e| {
1293 tonic::Status::new(
1294 tonic::Code::Unknown,
1295 format!("Service was not ready: {}", e.into()),
1296 )
1297 })?;
1298 let codec = tonic::codec::ProstCodec::default();
1299 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/AllocID");
1300 let mut req = request.into_request();
1301 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "AllocID"));
1302 self.inner.unary(req, path, codec).await
1303 }
1304 pub async fn get_store(
1305 &mut self,
1306 request: impl tonic::IntoRequest<super::GetStoreRequest>,
1307 ) -> std::result::Result<
1308 tonic::Response<super::GetStoreResponse>,
1309 tonic::Status,
1310 > {
1311 self.inner
1312 .ready()
1313 .await
1314 .map_err(|e| {
1315 tonic::Status::new(
1316 tonic::Code::Unknown,
1317 format!("Service was not ready: {}", e.into()),
1318 )
1319 })?;
1320 let codec = tonic::codec::ProstCodec::default();
1321 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetStore");
1322 let mut req = request.into_request();
1323 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetStore"));
1324 self.inner.unary(req, path, codec).await
1325 }
1326 pub async fn put_store(
1327 &mut self,
1328 request: impl tonic::IntoRequest<super::PutStoreRequest>,
1329 ) -> std::result::Result<
1330 tonic::Response<super::PutStoreResponse>,
1331 tonic::Status,
1332 > {
1333 self.inner
1334 .ready()
1335 .await
1336 .map_err(|e| {
1337 tonic::Status::new(
1338 tonic::Code::Unknown,
1339 format!("Service was not ready: {}", e.into()),
1340 )
1341 })?;
1342 let codec = tonic::codec::ProstCodec::default();
1343 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/PutStore");
1344 let mut req = request.into_request();
1345 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "PutStore"));
1346 self.inner.unary(req, path, codec).await
1347 }
1348 pub async fn get_all_stores(
1349 &mut self,
1350 request: impl tonic::IntoRequest<super::GetAllStoresRequest>,
1351 ) -> std::result::Result<
1352 tonic::Response<super::GetAllStoresResponse>,
1353 tonic::Status,
1354 > {
1355 self.inner
1356 .ready()
1357 .await
1358 .map_err(|e| {
1359 tonic::Status::new(
1360 tonic::Code::Unknown,
1361 format!("Service was not ready: {}", e.into()),
1362 )
1363 })?;
1364 let codec = tonic::codec::ProstCodec::default();
1365 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetAllStores");
1366 let mut req = request.into_request();
1367 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetAllStores"));
1368 self.inner.unary(req, path, codec).await
1369 }
1370 pub async fn store_heartbeat(
1371 &mut self,
1372 request: impl tonic::IntoRequest<super::StoreHeartbeatRequest>,
1373 ) -> std::result::Result<
1374 tonic::Response<super::StoreHeartbeatResponse>,
1375 tonic::Status,
1376 > {
1377 self.inner
1378 .ready()
1379 .await
1380 .map_err(|e| {
1381 tonic::Status::new(
1382 tonic::Code::Unknown,
1383 format!("Service was not ready: {}", e.into()),
1384 )
1385 })?;
1386 let codec = tonic::codec::ProstCodec::default();
1387 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/StoreHeartbeat");
1388 let mut req = request.into_request();
1389 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "StoreHeartbeat"));
1390 self.inner.unary(req, path, codec).await
1391 }
1392 pub async fn region_heartbeat(
1393 &mut self,
1394 request: impl tonic::IntoStreamingRequest<
1395 Message = super::RegionHeartbeatRequest,
1396 >,
1397 ) -> std::result::Result<
1398 tonic::Response<tonic::codec::Streaming<super::RegionHeartbeatResponse>>,
1399 tonic::Status,
1400 > {
1401 self.inner
1402 .ready()
1403 .await
1404 .map_err(|e| {
1405 tonic::Status::new(
1406 tonic::Code::Unknown,
1407 format!("Service was not ready: {}", e.into()),
1408 )
1409 })?;
1410 let codec = tonic::codec::ProstCodec::default();
1411 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/RegionHeartbeat");
1412 let mut req = request.into_streaming_request();
1413 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "RegionHeartbeat"));
1414 self.inner.streaming(req, path, codec).await
1415 }
1416 pub async fn get_region(
1417 &mut self,
1418 request: impl tonic::IntoRequest<super::GetRegionRequest>,
1419 ) -> std::result::Result<
1420 tonic::Response<super::GetRegionResponse>,
1421 tonic::Status,
1422 > {
1423 self.inner
1424 .ready()
1425 .await
1426 .map_err(|e| {
1427 tonic::Status::new(
1428 tonic::Code::Unknown,
1429 format!("Service was not ready: {}", e.into()),
1430 )
1431 })?;
1432 let codec = tonic::codec::ProstCodec::default();
1433 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetRegion");
1434 let mut req = request.into_request();
1435 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetRegion"));
1436 self.inner.unary(req, path, codec).await
1437 }
1438 pub async fn get_prev_region(
1439 &mut self,
1440 request: impl tonic::IntoRequest<super::GetRegionRequest>,
1441 ) -> std::result::Result<
1442 tonic::Response<super::GetRegionResponse>,
1443 tonic::Status,
1444 > {
1445 self.inner
1446 .ready()
1447 .await
1448 .map_err(|e| {
1449 tonic::Status::new(
1450 tonic::Code::Unknown,
1451 format!("Service was not ready: {}", e.into()),
1452 )
1453 })?;
1454 let codec = tonic::codec::ProstCodec::default();
1455 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetPrevRegion");
1456 let mut req = request.into_request();
1457 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetPrevRegion"));
1458 self.inner.unary(req, path, codec).await
1459 }
1460 pub async fn get_region_by_id(
1461 &mut self,
1462 request: impl tonic::IntoRequest<super::GetRegionByIdRequest>,
1463 ) -> std::result::Result<
1464 tonic::Response<super::GetRegionResponse>,
1465 tonic::Status,
1466 > {
1467 self.inner
1468 .ready()
1469 .await
1470 .map_err(|e| {
1471 tonic::Status::new(
1472 tonic::Code::Unknown,
1473 format!("Service was not ready: {}", e.into()),
1474 )
1475 })?;
1476 let codec = tonic::codec::ProstCodec::default();
1477 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetRegionByID");
1478 let mut req = request.into_request();
1479 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetRegionByID"));
1480 self.inner.unary(req, path, codec).await
1481 }
1482 pub async fn scan_regions(
1483 &mut self,
1484 request: impl tonic::IntoRequest<super::ScanRegionsRequest>,
1485 ) -> std::result::Result<
1486 tonic::Response<super::ScanRegionsResponse>,
1487 tonic::Status,
1488 > {
1489 self.inner
1490 .ready()
1491 .await
1492 .map_err(|e| {
1493 tonic::Status::new(
1494 tonic::Code::Unknown,
1495 format!("Service was not ready: {}", e.into()),
1496 )
1497 })?;
1498 let codec = tonic::codec::ProstCodec::default();
1499 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ScanRegions");
1500 let mut req = request.into_request();
1501 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ScanRegions"));
1502 self.inner.unary(req, path, codec).await
1503 }
1504 pub async fn ask_split(
1505 &mut self,
1506 request: impl tonic::IntoRequest<super::AskSplitRequest>,
1507 ) -> std::result::Result<
1508 tonic::Response<super::AskSplitResponse>,
1509 tonic::Status,
1510 > {
1511 self.inner
1512 .ready()
1513 .await
1514 .map_err(|e| {
1515 tonic::Status::new(
1516 tonic::Code::Unknown,
1517 format!("Service was not ready: {}", e.into()),
1518 )
1519 })?;
1520 let codec = tonic::codec::ProstCodec::default();
1521 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/AskSplit");
1522 let mut req = request.into_request();
1523 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "AskSplit"));
1524 self.inner.unary(req, path, codec).await
1525 }
1526 pub async fn report_split(
1527 &mut self,
1528 request: impl tonic::IntoRequest<super::ReportSplitRequest>,
1529 ) -> std::result::Result<
1530 tonic::Response<super::ReportSplitResponse>,
1531 tonic::Status,
1532 > {
1533 self.inner
1534 .ready()
1535 .await
1536 .map_err(|e| {
1537 tonic::Status::new(
1538 tonic::Code::Unknown,
1539 format!("Service was not ready: {}", e.into()),
1540 )
1541 })?;
1542 let codec = tonic::codec::ProstCodec::default();
1543 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ReportSplit");
1544 let mut req = request.into_request();
1545 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ReportSplit"));
1546 self.inner.unary(req, path, codec).await
1547 }
1548 pub async fn ask_batch_split(
1549 &mut self,
1550 request: impl tonic::IntoRequest<super::AskBatchSplitRequest>,
1551 ) -> std::result::Result<
1552 tonic::Response<super::AskBatchSplitResponse>,
1553 tonic::Status,
1554 > {
1555 self.inner
1556 .ready()
1557 .await
1558 .map_err(|e| {
1559 tonic::Status::new(
1560 tonic::Code::Unknown,
1561 format!("Service was not ready: {}", e.into()),
1562 )
1563 })?;
1564 let codec = tonic::codec::ProstCodec::default();
1565 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/AskBatchSplit");
1566 let mut req = request.into_request();
1567 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "AskBatchSplit"));
1568 self.inner.unary(req, path, codec).await
1569 }
1570 pub async fn report_batch_split(
1571 &mut self,
1572 request: impl tonic::IntoRequest<super::ReportBatchSplitRequest>,
1573 ) -> std::result::Result<
1574 tonic::Response<super::ReportBatchSplitResponse>,
1575 tonic::Status,
1576 > {
1577 self.inner
1578 .ready()
1579 .await
1580 .map_err(|e| {
1581 tonic::Status::new(
1582 tonic::Code::Unknown,
1583 format!("Service was not ready: {}", e.into()),
1584 )
1585 })?;
1586 let codec = tonic::codec::ProstCodec::default();
1587 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ReportBatchSplit");
1588 let mut req = request.into_request();
1589 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ReportBatchSplit"));
1590 self.inner.unary(req, path, codec).await
1591 }
1592 pub async fn get_cluster_config(
1593 &mut self,
1594 request: impl tonic::IntoRequest<super::GetClusterConfigRequest>,
1595 ) -> std::result::Result<
1596 tonic::Response<super::GetClusterConfigResponse>,
1597 tonic::Status,
1598 > {
1599 self.inner
1600 .ready()
1601 .await
1602 .map_err(|e| {
1603 tonic::Status::new(
1604 tonic::Code::Unknown,
1605 format!("Service was not ready: {}", e.into()),
1606 )
1607 })?;
1608 let codec = tonic::codec::ProstCodec::default();
1609 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetClusterConfig");
1610 let mut req = request.into_request();
1611 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetClusterConfig"));
1612 self.inner.unary(req, path, codec).await
1613 }
1614 pub async fn put_cluster_config(
1615 &mut self,
1616 request: impl tonic::IntoRequest<super::PutClusterConfigRequest>,
1617 ) -> std::result::Result<
1618 tonic::Response<super::PutClusterConfigResponse>,
1619 tonic::Status,
1620 > {
1621 self.inner
1622 .ready()
1623 .await
1624 .map_err(|e| {
1625 tonic::Status::new(
1626 tonic::Code::Unknown,
1627 format!("Service was not ready: {}", e.into()),
1628 )
1629 })?;
1630 let codec = tonic::codec::ProstCodec::default();
1631 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/PutClusterConfig");
1632 let mut req = request.into_request();
1633 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "PutClusterConfig"));
1634 self.inner.unary(req, path, codec).await
1635 }
1636 pub async fn scatter_region(
1637 &mut self,
1638 request: impl tonic::IntoRequest<super::ScatterRegionRequest>,
1639 ) -> std::result::Result<
1640 tonic::Response<super::ScatterRegionResponse>,
1641 tonic::Status,
1642 > {
1643 self.inner
1644 .ready()
1645 .await
1646 .map_err(|e| {
1647 tonic::Status::new(
1648 tonic::Code::Unknown,
1649 format!("Service was not ready: {}", e.into()),
1650 )
1651 })?;
1652 let codec = tonic::codec::ProstCodec::default();
1653 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/ScatterRegion");
1654 let mut req = request.into_request();
1655 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "ScatterRegion"));
1656 self.inner.unary(req, path, codec).await
1657 }
1658 pub async fn get_gc_safe_point(
1659 &mut self,
1660 request: impl tonic::IntoRequest<super::GetGcSafePointRequest>,
1661 ) -> std::result::Result<
1662 tonic::Response<super::GetGcSafePointResponse>,
1663 tonic::Status,
1664 > {
1665 self.inner
1666 .ready()
1667 .await
1668 .map_err(|e| {
1669 tonic::Status::new(
1670 tonic::Code::Unknown,
1671 format!("Service was not ready: {}", e.into()),
1672 )
1673 })?;
1674 let codec = tonic::codec::ProstCodec::default();
1675 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetGCSafePoint");
1676 let mut req = request.into_request();
1677 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetGCSafePoint"));
1678 self.inner.unary(req, path, codec).await
1679 }
1680 pub async fn update_gc_safe_point(
1681 &mut self,
1682 request: impl tonic::IntoRequest<super::UpdateGcSafePointRequest>,
1683 ) -> std::result::Result<
1684 tonic::Response<super::UpdateGcSafePointResponse>,
1685 tonic::Status,
1686 > {
1687 self.inner
1688 .ready()
1689 .await
1690 .map_err(|e| {
1691 tonic::Status::new(
1692 tonic::Code::Unknown,
1693 format!("Service was not ready: {}", e.into()),
1694 )
1695 })?;
1696 let codec = tonic::codec::ProstCodec::default();
1697 let path = http::uri::PathAndQuery::from_static(
1698 "/pdpb.PD/UpdateGCSafePoint",
1699 );
1700 let mut req = request.into_request();
1701 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "UpdateGCSafePoint"));
1702 self.inner.unary(req, path, codec).await
1703 }
1704 pub async fn update_service_gc_safe_point(
1705 &mut self,
1706 request: impl tonic::IntoRequest<super::UpdateServiceGcSafePointRequest>,
1707 ) -> std::result::Result<
1708 tonic::Response<super::UpdateServiceGcSafePointResponse>,
1709 tonic::Status,
1710 > {
1711 self.inner
1712 .ready()
1713 .await
1714 .map_err(|e| {
1715 tonic::Status::new(
1716 tonic::Code::Unknown,
1717 format!("Service was not ready: {}", e.into()),
1718 )
1719 })?;
1720 let codec = tonic::codec::ProstCodec::default();
1721 let path = http::uri::PathAndQuery::from_static(
1722 "/pdpb.PD/UpdateServiceGCSafePoint",
1723 );
1724 let mut req = request.into_request();
1725 req.extensions_mut()
1726 .insert(GrpcMethod::new("pdpb.PD", "UpdateServiceGCSafePoint"));
1727 self.inner.unary(req, path, codec).await
1728 }
1729 pub async fn sync_regions(
1730 &mut self,
1731 request: impl tonic::IntoStreamingRequest<Message = super::SyncRegionRequest>,
1732 ) -> std::result::Result<
1733 tonic::Response<tonic::codec::Streaming<super::SyncRegionResponse>>,
1734 tonic::Status,
1735 > {
1736 self.inner
1737 .ready()
1738 .await
1739 .map_err(|e| {
1740 tonic::Status::new(
1741 tonic::Code::Unknown,
1742 format!("Service was not ready: {}", e.into()),
1743 )
1744 })?;
1745 let codec = tonic::codec::ProstCodec::default();
1746 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/SyncRegions");
1747 let mut req = request.into_streaming_request();
1748 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "SyncRegions"));
1749 self.inner.streaming(req, path, codec).await
1750 }
1751 pub async fn get_operator(
1752 &mut self,
1753 request: impl tonic::IntoRequest<super::GetOperatorRequest>,
1754 ) -> std::result::Result<
1755 tonic::Response<super::GetOperatorResponse>,
1756 tonic::Status,
1757 > {
1758 self.inner
1759 .ready()
1760 .await
1761 .map_err(|e| {
1762 tonic::Status::new(
1763 tonic::Code::Unknown,
1764 format!("Service was not ready: {}", e.into()),
1765 )
1766 })?;
1767 let codec = tonic::codec::ProstCodec::default();
1768 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/GetOperator");
1769 let mut req = request.into_request();
1770 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetOperator"));
1771 self.inner.unary(req, path, codec).await
1772 }
1773 pub async fn sync_max_ts(
1774 &mut self,
1775 request: impl tonic::IntoRequest<super::SyncMaxTsRequest>,
1776 ) -> std::result::Result<
1777 tonic::Response<super::SyncMaxTsResponse>,
1778 tonic::Status,
1779 > {
1780 self.inner
1781 .ready()
1782 .await
1783 .map_err(|e| {
1784 tonic::Status::new(
1785 tonic::Code::Unknown,
1786 format!("Service was not ready: {}", e.into()),
1787 )
1788 })?;
1789 let codec = tonic::codec::ProstCodec::default();
1790 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/SyncMaxTS");
1791 let mut req = request.into_request();
1792 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "SyncMaxTS"));
1793 self.inner.unary(req, path, codec).await
1794 }
1795 pub async fn split_regions(
1796 &mut self,
1797 request: impl tonic::IntoRequest<super::SplitRegionsRequest>,
1798 ) -> std::result::Result<
1799 tonic::Response<super::SplitRegionsResponse>,
1800 tonic::Status,
1801 > {
1802 self.inner
1803 .ready()
1804 .await
1805 .map_err(|e| {
1806 tonic::Status::new(
1807 tonic::Code::Unknown,
1808 format!("Service was not ready: {}", e.into()),
1809 )
1810 })?;
1811 let codec = tonic::codec::ProstCodec::default();
1812 let path = http::uri::PathAndQuery::from_static("/pdpb.PD/SplitRegions");
1813 let mut req = request.into_request();
1814 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "SplitRegions"));
1815 self.inner.unary(req, path, codec).await
1816 }
1817 pub async fn split_and_scatter_regions(
1818 &mut self,
1819 request: impl tonic::IntoRequest<super::SplitAndScatterRegionsRequest>,
1820 ) -> std::result::Result<
1821 tonic::Response<super::SplitAndScatterRegionsResponse>,
1822 tonic::Status,
1823 > {
1824 self.inner
1825 .ready()
1826 .await
1827 .map_err(|e| {
1828 tonic::Status::new(
1829 tonic::Code::Unknown,
1830 format!("Service was not ready: {}", e.into()),
1831 )
1832 })?;
1833 let codec = tonic::codec::ProstCodec::default();
1834 let path = http::uri::PathAndQuery::from_static(
1835 "/pdpb.PD/SplitAndScatterRegions",
1836 );
1837 let mut req = request.into_request();
1838 req.extensions_mut()
1839 .insert(GrpcMethod::new("pdpb.PD", "SplitAndScatterRegions"));
1840 self.inner.unary(req, path, codec).await
1841 }
1842 pub async fn get_dc_location_info(
1843 &mut self,
1844 request: impl tonic::IntoRequest<super::GetDcLocationInfoRequest>,
1845 ) -> std::result::Result<
1846 tonic::Response<super::GetDcLocationInfoResponse>,
1847 tonic::Status,
1848 > {
1849 self.inner
1850 .ready()
1851 .await
1852 .map_err(|e| {
1853 tonic::Status::new(
1854 tonic::Code::Unknown,
1855 format!("Service was not ready: {}", e.into()),
1856 )
1857 })?;
1858 let codec = tonic::codec::ProstCodec::default();
1859 let path = http::uri::PathAndQuery::from_static(
1860 "/pdpb.PD/GetDCLocationInfo",
1861 );
1862 let mut req = request.into_request();
1863 req.extensions_mut().insert(GrpcMethod::new("pdpb.PD", "GetDCLocationInfo"));
1864 self.inner.unary(req, path, codec).await
1865 }
1866 }
1867}