Struct ydb_unofficial::generated::ydb::topic::v1::topic_service_client::TopicServiceClient
source · pub struct TopicServiceClient<T> { /* private fields */ }Implementations§
source§impl<T> TopicServiceClient<T>where
T: GrpcService<UnsyncBoxBody<Bytes, Status>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::Error: Into<Box<dyn Error + Send + Sync, Global>>,
<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: Body<Data = Bytes> + Send + 'static,
<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync, Global>> + Send,
impl<T> TopicServiceClient<T>where T: GrpcService<UnsyncBoxBody<Bytes, Status>>, <T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::Error: Into<Box<dyn Error + Send + Sync, Global>>, <T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: Body<Data = Bytes> + Send + 'static, <<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody as Body>::Error: Into<Box<dyn Error + Send + Sync, Global>> + Send,
pub fn new(inner: T) -> TopicServiceClient<T>
pub fn with_origin(inner: T, origin: Uri) -> TopicServiceClient<T>
pub fn with_interceptor<F>( inner: T, interceptor: F ) -> TopicServiceClient<InterceptedService<T, F>>where F: Interceptor, <T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody: Default, T: Service<Request<UnsyncBoxBody<Bytes, Status>>, Response = Response<<T as GrpcService<UnsyncBoxBody<Bytes, Status>>>::ResponseBody>>, <T as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Error: Into<Box<dyn Error + Send + Sync, Global>> + Send + Sync,
sourcepub fn send_compressed(
self,
encoding: CompressionEncoding
) -> TopicServiceClient<T>
pub fn send_compressed( self, encoding: CompressionEncoding ) -> TopicServiceClient<T>
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(
self,
encoding: CompressionEncoding
) -> TopicServiceClient<T>
pub fn accept_compressed( self, encoding: CompressionEncoding ) -> TopicServiceClient<T>
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> TopicServiceClient<T>
pub fn max_decoding_message_size(self, limit: usize) -> TopicServiceClient<T>
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> TopicServiceClient<T>
pub fn max_encoding_message_size(self, limit: usize) -> TopicServiceClient<T>
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn stream_write(
&mut self,
request: impl IntoStreamingRequest<Message = FromClient>
) -> impl Future<Output = Result<Response<Streaming<FromServer>>, Status>>
pub async fn stream_write( &mut self, request: impl IntoStreamingRequest<Message = FromClient> ) -> impl Future<Output = Result<Response<Streaming<FromServer>>, Status>>
Create Write Session Pipeline example: client server InitRequest(Topic, MessageGroupID, …) ––––––––> InitResponse(Partition, MaxSeqNo, …) <–––––––– WriteRequest(data1, seqNo1) ––––––––> WriteRequest(data2, seqNo2) ––––––––> WriteResponse(seqNo1, offset1, …) <–––––––– WriteRequest(data3, seqNo3) ––––––––> WriteResponse(seqNo2, offset2, …) <–––––––– [something went wrong] (status != SUCCESS, issues not empty) <––––––––
sourcepub async fn stream_read(
&mut self,
request: impl IntoStreamingRequest<Message = FromClient>
) -> impl Future<Output = Result<Response<Streaming<FromServer>>, Status>>
pub async fn stream_read( &mut self, request: impl IntoStreamingRequest<Message = FromClient> ) -> impl Future<Output = Result<Response<Streaming<FromServer>>, Status>>
Create Read Session Pipeline: client server InitRequest(Topics, ClientId, …) ––––––––> InitResponse(SessionId) <–––––––– ReadRequest ––––––––> ReadRequest ––––––––> StartPartitionSessionRequest(Topic1, Partition1, PartitionSessionID1, …) <–––––––– StartPartitionSessionRequest(Topic2, Partition2, PartitionSessionID2, …) <–––––––– StartPartitionSessionResponse(PartitionSessionID1, …) client must respond with this message to actually start recieving data messages from this partition ––––––––> StopPartitionSessionRequest(PartitionSessionID1, …) <–––––––– StopPartitionSessionResponse(PartitionSessionID1, …) only after this response server will give this parittion to other session. ––––––––> StartPartitionSessionResponse(PartitionSession2, …) ––––––––> ReadResponse(data, …) <–––––––– CommitRequest(PartitionCommit1, …) ––––––––> CommitResponse(PartitionCommitAck1, …) <–––––––– [something went wrong] (status != SUCCESS, issues not empty) <––––––––
sourcepub async fn create_topic(
&mut self,
request: impl IntoRequest<CreateTopicRequest>
) -> impl Future<Output = Result<Response<CreateTopicResponse>, Status>>
pub async fn create_topic( &mut self, request: impl IntoRequest<CreateTopicRequest> ) -> impl Future<Output = Result<Response<CreateTopicResponse>, Status>>
Create topic command.
sourcepub async fn describe_topic(
&mut self,
request: impl IntoRequest<DescribeTopicRequest>
) -> impl Future<Output = Result<Response<DescribeTopicResponse>, Status>>
pub async fn describe_topic( &mut self, request: impl IntoRequest<DescribeTopicRequest> ) -> impl Future<Output = Result<Response<DescribeTopicResponse>, Status>>
Describe topic command.
sourcepub async fn describe_consumer(
&mut self,
request: impl IntoRequest<DescribeConsumerRequest>
) -> impl Future<Output = Result<Response<DescribeConsumerResponse>, Status>>
pub async fn describe_consumer( &mut self, request: impl IntoRequest<DescribeConsumerRequest> ) -> impl Future<Output = Result<Response<DescribeConsumerResponse>, Status>>
Describe topic’s consumer command.
sourcepub async fn alter_topic(
&mut self,
request: impl IntoRequest<AlterTopicRequest>
) -> impl Future<Output = Result<Response<AlterTopicResponse>, Status>>
pub async fn alter_topic( &mut self, request: impl IntoRequest<AlterTopicRequest> ) -> impl Future<Output = Result<Response<AlterTopicResponse>, Status>>
Alter topic command.
sourcepub async fn drop_topic(
&mut self,
request: impl IntoRequest<DropTopicRequest>
) -> impl Future<Output = Result<Response<DropTopicResponse>, Status>>
pub async fn drop_topic( &mut self, request: impl IntoRequest<DropTopicRequest> ) -> impl Future<Output = Result<Response<DropTopicResponse>, Status>>
Drop topic command.
Trait Implementations§
source§impl<T> Clone for TopicServiceClient<T>where
T: Clone,
impl<T> Clone for TopicServiceClient<T>where T: Clone,
source§fn clone(&self) -> TopicServiceClient<T>
fn clone(&self) -> TopicServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> RefUnwindSafe for TopicServiceClient<T>where T: RefUnwindSafe,
impl<T> Send for TopicServiceClient<T>where T: Send,
impl<T> Sync for TopicServiceClient<T>where T: Sync,
impl<T> Unpin for TopicServiceClient<T>where T: Unpin,
impl<T> UnwindSafe for TopicServiceClient<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request