vitess_grpc/generated/
queryservice.rs

1/// Generated client implementations.
2pub mod query_client {
3    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
4    use tonic::codegen::*;
5    use tonic::codegen::http::Uri;
6    /// Query defines the tablet query service, implemented by vttablet.
7    #[derive(Debug, Clone)]
8    pub struct QueryClient<T> {
9        inner: tonic::client::Grpc<T>,
10    }
11    impl QueryClient<tonic::transport::Channel> {
12        /// Attempt to create a new client by connecting to a given endpoint.
13        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
14        where
15            D: TryInto<tonic::transport::Endpoint>,
16            D::Error: Into<StdError>,
17        {
18            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
19            Ok(Self::new(conn))
20        }
21    }
22    impl<T> QueryClient<T>
23    where
24        T: tonic::client::GrpcService<tonic::body::BoxBody>,
25        T::Error: Into<StdError>,
26        T::ResponseBody: Body<Data = Bytes> + Send + 'static,
27        <T::ResponseBody as Body>::Error: Into<StdError> + Send,
28    {
29        pub fn new(inner: T) -> Self {
30            let inner = tonic::client::Grpc::new(inner);
31            Self { inner }
32        }
33        pub fn with_origin(inner: T, origin: Uri) -> Self {
34            let inner = tonic::client::Grpc::with_origin(inner, origin);
35            Self { inner }
36        }
37        pub fn with_interceptor<F>(
38            inner: T,
39            interceptor: F,
40        ) -> QueryClient<InterceptedService<T, F>>
41        where
42            F: tonic::service::Interceptor,
43            T::ResponseBody: Default,
44            T: tonic::codegen::Service<
45                http::Request<tonic::body::BoxBody>,
46                Response = http::Response<
47                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
48                >,
49            >,
50            <T as tonic::codegen::Service<
51                http::Request<tonic::body::BoxBody>,
52            >>::Error: Into<StdError> + Send + Sync,
53        {
54            QueryClient::new(InterceptedService::new(inner, interceptor))
55        }
56        /// Compress requests with the given encoding.
57        ///
58        /// This requires the server to support it otherwise it might respond with an
59        /// error.
60        #[must_use]
61        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
62            self.inner = self.inner.send_compressed(encoding);
63            self
64        }
65        /// Enable decompressing responses.
66        #[must_use]
67        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
68            self.inner = self.inner.accept_compressed(encoding);
69            self
70        }
71        /// Limits the maximum size of a decoded message.
72        ///
73        /// Default: `4MB`
74        #[must_use]
75        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
76            self.inner = self.inner.max_decoding_message_size(limit);
77            self
78        }
79        /// Limits the maximum size of an encoded message.
80        ///
81        /// Default: `usize::MAX`
82        #[must_use]
83        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
84            self.inner = self.inner.max_encoding_message_size(limit);
85            self
86        }
87        /// Execute executes the specified SQL query (might be in a
88        /// transaction context, if Query.transaction_id is set).
89        pub async fn execute(
90            &mut self,
91            request: impl tonic::IntoRequest<super::super::query::ExecuteRequest>,
92        ) -> std::result::Result<
93            tonic::Response<super::super::query::ExecuteResponse>,
94            tonic::Status,
95        > {
96            self.inner
97                .ready()
98                .await
99                .map_err(|e| {
100                    tonic::Status::new(
101                        tonic::Code::Unknown,
102                        format!("Service was not ready: {}", e.into()),
103                    )
104                })?;
105            let codec = tonic::codec::ProstCodec::default();
106            let path = http::uri::PathAndQuery::from_static(
107                "/queryservice.Query/Execute",
108            );
109            let mut req = request.into_request();
110            req.extensions_mut()
111                .insert(GrpcMethod::new("queryservice.Query", "Execute"));
112            self.inner.unary(req, path, codec).await
113        }
114        /// StreamExecute executes a streaming query. Use this method if the
115        /// query returns a large number of rows. The first QueryResult will
116        /// contain the Fields, subsequent QueryResult messages will contain
117        /// the rows.
118        pub async fn stream_execute(
119            &mut self,
120            request: impl tonic::IntoRequest<super::super::query::StreamExecuteRequest>,
121        ) -> std::result::Result<
122            tonic::Response<
123                tonic::codec::Streaming<super::super::query::StreamExecuteResponse>,
124            >,
125            tonic::Status,
126        > {
127            self.inner
128                .ready()
129                .await
130                .map_err(|e| {
131                    tonic::Status::new(
132                        tonic::Code::Unknown,
133                        format!("Service was not ready: {}", e.into()),
134                    )
135                })?;
136            let codec = tonic::codec::ProstCodec::default();
137            let path = http::uri::PathAndQuery::from_static(
138                "/queryservice.Query/StreamExecute",
139            );
140            let mut req = request.into_request();
141            req.extensions_mut()
142                .insert(GrpcMethod::new("queryservice.Query", "StreamExecute"));
143            self.inner.server_streaming(req, path, codec).await
144        }
145        /// Begin a transaction.
146        pub async fn begin(
147            &mut self,
148            request: impl tonic::IntoRequest<super::super::query::BeginRequest>,
149        ) -> std::result::Result<
150            tonic::Response<super::super::query::BeginResponse>,
151            tonic::Status,
152        > {
153            self.inner
154                .ready()
155                .await
156                .map_err(|e| {
157                    tonic::Status::new(
158                        tonic::Code::Unknown,
159                        format!("Service was not ready: {}", e.into()),
160                    )
161                })?;
162            let codec = tonic::codec::ProstCodec::default();
163            let path = http::uri::PathAndQuery::from_static("/queryservice.Query/Begin");
164            let mut req = request.into_request();
165            req.extensions_mut().insert(GrpcMethod::new("queryservice.Query", "Begin"));
166            self.inner.unary(req, path, codec).await
167        }
168        /// Commit a transaction.
169        pub async fn commit(
170            &mut self,
171            request: impl tonic::IntoRequest<super::super::query::CommitRequest>,
172        ) -> std::result::Result<
173            tonic::Response<super::super::query::CommitResponse>,
174            tonic::Status,
175        > {
176            self.inner
177                .ready()
178                .await
179                .map_err(|e| {
180                    tonic::Status::new(
181                        tonic::Code::Unknown,
182                        format!("Service was not ready: {}", e.into()),
183                    )
184                })?;
185            let codec = tonic::codec::ProstCodec::default();
186            let path = http::uri::PathAndQuery::from_static(
187                "/queryservice.Query/Commit",
188            );
189            let mut req = request.into_request();
190            req.extensions_mut().insert(GrpcMethod::new("queryservice.Query", "Commit"));
191            self.inner.unary(req, path, codec).await
192        }
193        /// Rollback a transaction.
194        pub async fn rollback(
195            &mut self,
196            request: impl tonic::IntoRequest<super::super::query::RollbackRequest>,
197        ) -> std::result::Result<
198            tonic::Response<super::super::query::RollbackResponse>,
199            tonic::Status,
200        > {
201            self.inner
202                .ready()
203                .await
204                .map_err(|e| {
205                    tonic::Status::new(
206                        tonic::Code::Unknown,
207                        format!("Service was not ready: {}", e.into()),
208                    )
209                })?;
210            let codec = tonic::codec::ProstCodec::default();
211            let path = http::uri::PathAndQuery::from_static(
212                "/queryservice.Query/Rollback",
213            );
214            let mut req = request.into_request();
215            req.extensions_mut()
216                .insert(GrpcMethod::new("queryservice.Query", "Rollback"));
217            self.inner.unary(req, path, codec).await
218        }
219        /// Prepare preares a transaction.
220        pub async fn prepare(
221            &mut self,
222            request: impl tonic::IntoRequest<super::super::query::PrepareRequest>,
223        ) -> std::result::Result<
224            tonic::Response<super::super::query::PrepareResponse>,
225            tonic::Status,
226        > {
227            self.inner
228                .ready()
229                .await
230                .map_err(|e| {
231                    tonic::Status::new(
232                        tonic::Code::Unknown,
233                        format!("Service was not ready: {}", e.into()),
234                    )
235                })?;
236            let codec = tonic::codec::ProstCodec::default();
237            let path = http::uri::PathAndQuery::from_static(
238                "/queryservice.Query/Prepare",
239            );
240            let mut req = request.into_request();
241            req.extensions_mut()
242                .insert(GrpcMethod::new("queryservice.Query", "Prepare"));
243            self.inner.unary(req, path, codec).await
244        }
245        /// CommitPrepared commits a prepared transaction.
246        pub async fn commit_prepared(
247            &mut self,
248            request: impl tonic::IntoRequest<super::super::query::CommitPreparedRequest>,
249        ) -> std::result::Result<
250            tonic::Response<super::super::query::CommitPreparedResponse>,
251            tonic::Status,
252        > {
253            self.inner
254                .ready()
255                .await
256                .map_err(|e| {
257                    tonic::Status::new(
258                        tonic::Code::Unknown,
259                        format!("Service was not ready: {}", e.into()),
260                    )
261                })?;
262            let codec = tonic::codec::ProstCodec::default();
263            let path = http::uri::PathAndQuery::from_static(
264                "/queryservice.Query/CommitPrepared",
265            );
266            let mut req = request.into_request();
267            req.extensions_mut()
268                .insert(GrpcMethod::new("queryservice.Query", "CommitPrepared"));
269            self.inner.unary(req, path, codec).await
270        }
271        /// RollbackPrepared rolls back a prepared transaction.
272        pub async fn rollback_prepared(
273            &mut self,
274            request: impl tonic::IntoRequest<
275                super::super::query::RollbackPreparedRequest,
276            >,
277        ) -> std::result::Result<
278            tonic::Response<super::super::query::RollbackPreparedResponse>,
279            tonic::Status,
280        > {
281            self.inner
282                .ready()
283                .await
284                .map_err(|e| {
285                    tonic::Status::new(
286                        tonic::Code::Unknown,
287                        format!("Service was not ready: {}", e.into()),
288                    )
289                })?;
290            let codec = tonic::codec::ProstCodec::default();
291            let path = http::uri::PathAndQuery::from_static(
292                "/queryservice.Query/RollbackPrepared",
293            );
294            let mut req = request.into_request();
295            req.extensions_mut()
296                .insert(GrpcMethod::new("queryservice.Query", "RollbackPrepared"));
297            self.inner.unary(req, path, codec).await
298        }
299        /// CreateTransaction creates the metadata for a 2pc transaction.
300        pub async fn create_transaction(
301            &mut self,
302            request: impl tonic::IntoRequest<
303                super::super::query::CreateTransactionRequest,
304            >,
305        ) -> std::result::Result<
306            tonic::Response<super::super::query::CreateTransactionResponse>,
307            tonic::Status,
308        > {
309            self.inner
310                .ready()
311                .await
312                .map_err(|e| {
313                    tonic::Status::new(
314                        tonic::Code::Unknown,
315                        format!("Service was not ready: {}", e.into()),
316                    )
317                })?;
318            let codec = tonic::codec::ProstCodec::default();
319            let path = http::uri::PathAndQuery::from_static(
320                "/queryservice.Query/CreateTransaction",
321            );
322            let mut req = request.into_request();
323            req.extensions_mut()
324                .insert(GrpcMethod::new("queryservice.Query", "CreateTransaction"));
325            self.inner.unary(req, path, codec).await
326        }
327        /// StartCommit initiates a commit for a 2pc transaction.
328        pub async fn start_commit(
329            &mut self,
330            request: impl tonic::IntoRequest<super::super::query::StartCommitRequest>,
331        ) -> std::result::Result<
332            tonic::Response<super::super::query::StartCommitResponse>,
333            tonic::Status,
334        > {
335            self.inner
336                .ready()
337                .await
338                .map_err(|e| {
339                    tonic::Status::new(
340                        tonic::Code::Unknown,
341                        format!("Service was not ready: {}", e.into()),
342                    )
343                })?;
344            let codec = tonic::codec::ProstCodec::default();
345            let path = http::uri::PathAndQuery::from_static(
346                "/queryservice.Query/StartCommit",
347            );
348            let mut req = request.into_request();
349            req.extensions_mut()
350                .insert(GrpcMethod::new("queryservice.Query", "StartCommit"));
351            self.inner.unary(req, path, codec).await
352        }
353        /// SetRollback marks the 2pc transaction for rollback.
354        pub async fn set_rollback(
355            &mut self,
356            request: impl tonic::IntoRequest<super::super::query::SetRollbackRequest>,
357        ) -> std::result::Result<
358            tonic::Response<super::super::query::SetRollbackResponse>,
359            tonic::Status,
360        > {
361            self.inner
362                .ready()
363                .await
364                .map_err(|e| {
365                    tonic::Status::new(
366                        tonic::Code::Unknown,
367                        format!("Service was not ready: {}", e.into()),
368                    )
369                })?;
370            let codec = tonic::codec::ProstCodec::default();
371            let path = http::uri::PathAndQuery::from_static(
372                "/queryservice.Query/SetRollback",
373            );
374            let mut req = request.into_request();
375            req.extensions_mut()
376                .insert(GrpcMethod::new("queryservice.Query", "SetRollback"));
377            self.inner.unary(req, path, codec).await
378        }
379        /// ConcludeTransaction marks the 2pc transaction as resolved.
380        pub async fn conclude_transaction(
381            &mut self,
382            request: impl tonic::IntoRequest<
383                super::super::query::ConcludeTransactionRequest,
384            >,
385        ) -> std::result::Result<
386            tonic::Response<super::super::query::ConcludeTransactionResponse>,
387            tonic::Status,
388        > {
389            self.inner
390                .ready()
391                .await
392                .map_err(|e| {
393                    tonic::Status::new(
394                        tonic::Code::Unknown,
395                        format!("Service was not ready: {}", e.into()),
396                    )
397                })?;
398            let codec = tonic::codec::ProstCodec::default();
399            let path = http::uri::PathAndQuery::from_static(
400                "/queryservice.Query/ConcludeTransaction",
401            );
402            let mut req = request.into_request();
403            req.extensions_mut()
404                .insert(GrpcMethod::new("queryservice.Query", "ConcludeTransaction"));
405            self.inner.unary(req, path, codec).await
406        }
407        /// ReadTransaction returns the 2pc transaction info.
408        pub async fn read_transaction(
409            &mut self,
410            request: impl tonic::IntoRequest<super::super::query::ReadTransactionRequest>,
411        ) -> std::result::Result<
412            tonic::Response<super::super::query::ReadTransactionResponse>,
413            tonic::Status,
414        > {
415            self.inner
416                .ready()
417                .await
418                .map_err(|e| {
419                    tonic::Status::new(
420                        tonic::Code::Unknown,
421                        format!("Service was not ready: {}", e.into()),
422                    )
423                })?;
424            let codec = tonic::codec::ProstCodec::default();
425            let path = http::uri::PathAndQuery::from_static(
426                "/queryservice.Query/ReadTransaction",
427            );
428            let mut req = request.into_request();
429            req.extensions_mut()
430                .insert(GrpcMethod::new("queryservice.Query", "ReadTransaction"));
431            self.inner.unary(req, path, codec).await
432        }
433        /// BeginExecute executes a begin and the specified SQL query.
434        pub async fn begin_execute(
435            &mut self,
436            request: impl tonic::IntoRequest<super::super::query::BeginExecuteRequest>,
437        ) -> std::result::Result<
438            tonic::Response<super::super::query::BeginExecuteResponse>,
439            tonic::Status,
440        > {
441            self.inner
442                .ready()
443                .await
444                .map_err(|e| {
445                    tonic::Status::new(
446                        tonic::Code::Unknown,
447                        format!("Service was not ready: {}", e.into()),
448                    )
449                })?;
450            let codec = tonic::codec::ProstCodec::default();
451            let path = http::uri::PathAndQuery::from_static(
452                "/queryservice.Query/BeginExecute",
453            );
454            let mut req = request.into_request();
455            req.extensions_mut()
456                .insert(GrpcMethod::new("queryservice.Query", "BeginExecute"));
457            self.inner.unary(req, path, codec).await
458        }
459        /// BeginStreamExecute executes a begin and the specified SQL query.
460        pub async fn begin_stream_execute(
461            &mut self,
462            request: impl tonic::IntoRequest<
463                super::super::query::BeginStreamExecuteRequest,
464            >,
465        ) -> std::result::Result<
466            tonic::Response<
467                tonic::codec::Streaming<super::super::query::BeginStreamExecuteResponse>,
468            >,
469            tonic::Status,
470        > {
471            self.inner
472                .ready()
473                .await
474                .map_err(|e| {
475                    tonic::Status::new(
476                        tonic::Code::Unknown,
477                        format!("Service was not ready: {}", e.into()),
478                    )
479                })?;
480            let codec = tonic::codec::ProstCodec::default();
481            let path = http::uri::PathAndQuery::from_static(
482                "/queryservice.Query/BeginStreamExecute",
483            );
484            let mut req = request.into_request();
485            req.extensions_mut()
486                .insert(GrpcMethod::new("queryservice.Query", "BeginStreamExecute"));
487            self.inner.server_streaming(req, path, codec).await
488        }
489        /// MessageStream streams messages from a message table.
490        pub async fn message_stream(
491            &mut self,
492            request: impl tonic::IntoRequest<super::super::query::MessageStreamRequest>,
493        ) -> std::result::Result<
494            tonic::Response<
495                tonic::codec::Streaming<super::super::query::MessageStreamResponse>,
496            >,
497            tonic::Status,
498        > {
499            self.inner
500                .ready()
501                .await
502                .map_err(|e| {
503                    tonic::Status::new(
504                        tonic::Code::Unknown,
505                        format!("Service was not ready: {}", e.into()),
506                    )
507                })?;
508            let codec = tonic::codec::ProstCodec::default();
509            let path = http::uri::PathAndQuery::from_static(
510                "/queryservice.Query/MessageStream",
511            );
512            let mut req = request.into_request();
513            req.extensions_mut()
514                .insert(GrpcMethod::new("queryservice.Query", "MessageStream"));
515            self.inner.server_streaming(req, path, codec).await
516        }
517        /// MessageAck acks messages for a table.
518        pub async fn message_ack(
519            &mut self,
520            request: impl tonic::IntoRequest<super::super::query::MessageAckRequest>,
521        ) -> std::result::Result<
522            tonic::Response<super::super::query::MessageAckResponse>,
523            tonic::Status,
524        > {
525            self.inner
526                .ready()
527                .await
528                .map_err(|e| {
529                    tonic::Status::new(
530                        tonic::Code::Unknown,
531                        format!("Service was not ready: {}", e.into()),
532                    )
533                })?;
534            let codec = tonic::codec::ProstCodec::default();
535            let path = http::uri::PathAndQuery::from_static(
536                "/queryservice.Query/MessageAck",
537            );
538            let mut req = request.into_request();
539            req.extensions_mut()
540                .insert(GrpcMethod::new("queryservice.Query", "MessageAck"));
541            self.inner.unary(req, path, codec).await
542        }
543        /// ReserveExecute executes a query on a reserved connection
544        pub async fn reserve_execute(
545            &mut self,
546            request: impl tonic::IntoRequest<super::super::query::ReserveExecuteRequest>,
547        ) -> std::result::Result<
548            tonic::Response<super::super::query::ReserveExecuteResponse>,
549            tonic::Status,
550        > {
551            self.inner
552                .ready()
553                .await
554                .map_err(|e| {
555                    tonic::Status::new(
556                        tonic::Code::Unknown,
557                        format!("Service was not ready: {}", e.into()),
558                    )
559                })?;
560            let codec = tonic::codec::ProstCodec::default();
561            let path = http::uri::PathAndQuery::from_static(
562                "/queryservice.Query/ReserveExecute",
563            );
564            let mut req = request.into_request();
565            req.extensions_mut()
566                .insert(GrpcMethod::new("queryservice.Query", "ReserveExecute"));
567            self.inner.unary(req, path, codec).await
568        }
569        /// ReserveBeginExecute starts a transaction and executes a query in the transaction on a reserved connection
570        pub async fn reserve_begin_execute(
571            &mut self,
572            request: impl tonic::IntoRequest<
573                super::super::query::ReserveBeginExecuteRequest,
574            >,
575        ) -> std::result::Result<
576            tonic::Response<super::super::query::ReserveBeginExecuteResponse>,
577            tonic::Status,
578        > {
579            self.inner
580                .ready()
581                .await
582                .map_err(|e| {
583                    tonic::Status::new(
584                        tonic::Code::Unknown,
585                        format!("Service was not ready: {}", e.into()),
586                    )
587                })?;
588            let codec = tonic::codec::ProstCodec::default();
589            let path = http::uri::PathAndQuery::from_static(
590                "/queryservice.Query/ReserveBeginExecute",
591            );
592            let mut req = request.into_request();
593            req.extensions_mut()
594                .insert(GrpcMethod::new("queryservice.Query", "ReserveBeginExecute"));
595            self.inner.unary(req, path, codec).await
596        }
597        /// ReserveStreamExecute executes a streaming query on a reserved connection
598        pub async fn reserve_stream_execute(
599            &mut self,
600            request: impl tonic::IntoRequest<
601                super::super::query::ReserveStreamExecuteRequest,
602            >,
603        ) -> std::result::Result<
604            tonic::Response<
605                tonic::codec::Streaming<
606                    super::super::query::ReserveStreamExecuteResponse,
607                >,
608            >,
609            tonic::Status,
610        > {
611            self.inner
612                .ready()
613                .await
614                .map_err(|e| {
615                    tonic::Status::new(
616                        tonic::Code::Unknown,
617                        format!("Service was not ready: {}", e.into()),
618                    )
619                })?;
620            let codec = tonic::codec::ProstCodec::default();
621            let path = http::uri::PathAndQuery::from_static(
622                "/queryservice.Query/ReserveStreamExecute",
623            );
624            let mut req = request.into_request();
625            req.extensions_mut()
626                .insert(GrpcMethod::new("queryservice.Query", "ReserveStreamExecute"));
627            self.inner.server_streaming(req, path, codec).await
628        }
629        /// ReserveBeginStreamExecute starts a transaction and executes a streaming query in the transaction on a reserved connection
630        pub async fn reserve_begin_stream_execute(
631            &mut self,
632            request: impl tonic::IntoRequest<
633                super::super::query::ReserveBeginStreamExecuteRequest,
634            >,
635        ) -> std::result::Result<
636            tonic::Response<
637                tonic::codec::Streaming<
638                    super::super::query::ReserveBeginStreamExecuteResponse,
639                >,
640            >,
641            tonic::Status,
642        > {
643            self.inner
644                .ready()
645                .await
646                .map_err(|e| {
647                    tonic::Status::new(
648                        tonic::Code::Unknown,
649                        format!("Service was not ready: {}", e.into()),
650                    )
651                })?;
652            let codec = tonic::codec::ProstCodec::default();
653            let path = http::uri::PathAndQuery::from_static(
654                "/queryservice.Query/ReserveBeginStreamExecute",
655            );
656            let mut req = request.into_request();
657            req.extensions_mut()
658                .insert(
659                    GrpcMethod::new("queryservice.Query", "ReserveBeginStreamExecute"),
660                );
661            self.inner.server_streaming(req, path, codec).await
662        }
663        /// Release releases the connection
664        pub async fn release(
665            &mut self,
666            request: impl tonic::IntoRequest<super::super::query::ReleaseRequest>,
667        ) -> std::result::Result<
668            tonic::Response<super::super::query::ReleaseResponse>,
669            tonic::Status,
670        > {
671            self.inner
672                .ready()
673                .await
674                .map_err(|e| {
675                    tonic::Status::new(
676                        tonic::Code::Unknown,
677                        format!("Service was not ready: {}", e.into()),
678                    )
679                })?;
680            let codec = tonic::codec::ProstCodec::default();
681            let path = http::uri::PathAndQuery::from_static(
682                "/queryservice.Query/Release",
683            );
684            let mut req = request.into_request();
685            req.extensions_mut()
686                .insert(GrpcMethod::new("queryservice.Query", "Release"));
687            self.inner.unary(req, path, codec).await
688        }
689        /// StreamHealth runs a streaming RPC to the tablet, that returns the
690        /// current health of the tablet on a regular basis.
691        pub async fn stream_health(
692            &mut self,
693            request: impl tonic::IntoRequest<super::super::query::StreamHealthRequest>,
694        ) -> std::result::Result<
695            tonic::Response<
696                tonic::codec::Streaming<super::super::query::StreamHealthResponse>,
697            >,
698            tonic::Status,
699        > {
700            self.inner
701                .ready()
702                .await
703                .map_err(|e| {
704                    tonic::Status::new(
705                        tonic::Code::Unknown,
706                        format!("Service was not ready: {}", e.into()),
707                    )
708                })?;
709            let codec = tonic::codec::ProstCodec::default();
710            let path = http::uri::PathAndQuery::from_static(
711                "/queryservice.Query/StreamHealth",
712            );
713            let mut req = request.into_request();
714            req.extensions_mut()
715                .insert(GrpcMethod::new("queryservice.Query", "StreamHealth"));
716            self.inner.server_streaming(req, path, codec).await
717        }
718        /// VStream streams vreplication events.
719        pub async fn v_stream(
720            &mut self,
721            request: impl tonic::IntoRequest<super::super::binlogdata::VStreamRequest>,
722        ) -> std::result::Result<
723            tonic::Response<
724                tonic::codec::Streaming<super::super::binlogdata::VStreamResponse>,
725            >,
726            tonic::Status,
727        > {
728            self.inner
729                .ready()
730                .await
731                .map_err(|e| {
732                    tonic::Status::new(
733                        tonic::Code::Unknown,
734                        format!("Service was not ready: {}", e.into()),
735                    )
736                })?;
737            let codec = tonic::codec::ProstCodec::default();
738            let path = http::uri::PathAndQuery::from_static(
739                "/queryservice.Query/VStream",
740            );
741            let mut req = request.into_request();
742            req.extensions_mut()
743                .insert(GrpcMethod::new("queryservice.Query", "VStream"));
744            self.inner.server_streaming(req, path, codec).await
745        }
746        /// VStreamRows streams rows from the specified starting point.
747        pub async fn v_stream_rows(
748            &mut self,
749            request: impl tonic::IntoRequest<
750                super::super::binlogdata::VStreamRowsRequest,
751            >,
752        ) -> std::result::Result<
753            tonic::Response<
754                tonic::codec::Streaming<super::super::binlogdata::VStreamRowsResponse>,
755            >,
756            tonic::Status,
757        > {
758            self.inner
759                .ready()
760                .await
761                .map_err(|e| {
762                    tonic::Status::new(
763                        tonic::Code::Unknown,
764                        format!("Service was not ready: {}", e.into()),
765                    )
766                })?;
767            let codec = tonic::codec::ProstCodec::default();
768            let path = http::uri::PathAndQuery::from_static(
769                "/queryservice.Query/VStreamRows",
770            );
771            let mut req = request.into_request();
772            req.extensions_mut()
773                .insert(GrpcMethod::new("queryservice.Query", "VStreamRows"));
774            self.inner.server_streaming(req, path, codec).await
775        }
776        /// VStreamTables streams rows from the specified starting point.
777        pub async fn v_stream_tables(
778            &mut self,
779            request: impl tonic::IntoRequest<
780                super::super::binlogdata::VStreamTablesRequest,
781            >,
782        ) -> std::result::Result<
783            tonic::Response<
784                tonic::codec::Streaming<super::super::binlogdata::VStreamTablesResponse>,
785            >,
786            tonic::Status,
787        > {
788            self.inner
789                .ready()
790                .await
791                .map_err(|e| {
792                    tonic::Status::new(
793                        tonic::Code::Unknown,
794                        format!("Service was not ready: {}", e.into()),
795                    )
796                })?;
797            let codec = tonic::codec::ProstCodec::default();
798            let path = http::uri::PathAndQuery::from_static(
799                "/queryservice.Query/VStreamTables",
800            );
801            let mut req = request.into_request();
802            req.extensions_mut()
803                .insert(GrpcMethod::new("queryservice.Query", "VStreamTables"));
804            self.inner.server_streaming(req, path, codec).await
805        }
806        /// VStreamResults streams results along with the gtid of the snapshot.
807        pub async fn v_stream_results(
808            &mut self,
809            request: impl tonic::IntoRequest<
810                super::super::binlogdata::VStreamResultsRequest,
811            >,
812        ) -> std::result::Result<
813            tonic::Response<
814                tonic::codec::Streaming<super::super::binlogdata::VStreamResultsResponse>,
815            >,
816            tonic::Status,
817        > {
818            self.inner
819                .ready()
820                .await
821                .map_err(|e| {
822                    tonic::Status::new(
823                        tonic::Code::Unknown,
824                        format!("Service was not ready: {}", e.into()),
825                    )
826                })?;
827            let codec = tonic::codec::ProstCodec::default();
828            let path = http::uri::PathAndQuery::from_static(
829                "/queryservice.Query/VStreamResults",
830            );
831            let mut req = request.into_request();
832            req.extensions_mut()
833                .insert(GrpcMethod::new("queryservice.Query", "VStreamResults"));
834            self.inner.server_streaming(req, path, codec).await
835        }
836        /// GetSchema returns the schema information.
837        pub async fn get_schema(
838            &mut self,
839            request: impl tonic::IntoRequest<super::super::query::GetSchemaRequest>,
840        ) -> std::result::Result<
841            tonic::Response<
842                tonic::codec::Streaming<super::super::query::GetSchemaResponse>,
843            >,
844            tonic::Status,
845        > {
846            self.inner
847                .ready()
848                .await
849                .map_err(|e| {
850                    tonic::Status::new(
851                        tonic::Code::Unknown,
852                        format!("Service was not ready: {}", e.into()),
853                    )
854                })?;
855            let codec = tonic::codec::ProstCodec::default();
856            let path = http::uri::PathAndQuery::from_static(
857                "/queryservice.Query/GetSchema",
858            );
859            let mut req = request.into_request();
860            req.extensions_mut()
861                .insert(GrpcMethod::new("queryservice.Query", "GetSchema"));
862            self.inner.server_streaming(req, path, codec).await
863        }
864    }
865}