Struct ydb_grpc::generated::ydb::topic::v1::topic_service_client::TopicServiceClient      
source · pub struct TopicServiceClient<T> { /* private fields */ }Implementations§
source§impl<T> TopicServiceClient<T>where
    T: GrpcService<BoxBody>,
    T::Error: Into<StdError>,
    T::ResponseBody: Body<Data = Bytes> + Send + 'static,
    <T::ResponseBody as Body>::Error: Into<StdError> + Send,
 
impl<T> TopicServiceClient<T>where
    T: GrpcService<BoxBody>,
    T::Error: Into<StdError>,
    T::ResponseBody: Body<Data = Bytes> + Send + 'static,
    <T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
    inner: T,
    interceptor: F
) -> TopicServiceClient<InterceptedService<T, F>>where
    F: Interceptor,
    T::ResponseBody: Default,
    T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
    <T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
 
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
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) -> Self
 
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub async fn stream_write(
    &mut self,
    request: impl IntoStreamingRequest<Message = FromClient>
) -> Result<Response<Streaming<FromServer>>, Status>
 
pub async fn stream_write(
    &mut self,
    request: impl IntoStreamingRequest<Message = FromClient>
) -> 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>
) -> Result<Response<Streaming<FromServer>>, Status>
 
pub async fn stream_read(
    &mut self,
    request: impl IntoStreamingRequest<Message = FromClient>
) -> 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>
) -> Result<Response<CreateTopicResponse>, Status>
 
pub async fn create_topic(
    &mut self,
    request: impl IntoRequest<CreateTopicRequest>
) -> Result<Response<CreateTopicResponse>, Status>
Create topic command.
sourcepub async fn describe_topic(
    &mut self,
    request: impl IntoRequest<DescribeTopicRequest>
) -> Result<Response<DescribeTopicResponse>, Status>
 
pub async fn describe_topic(
    &mut self,
    request: impl IntoRequest<DescribeTopicRequest>
) -> Result<Response<DescribeTopicResponse>, Status>
Describe topic command.
sourcepub async fn alter_topic(
    &mut self,
    request: impl IntoRequest<AlterTopicRequest>
) -> Result<Response<AlterTopicResponse>, Status>
 
pub async fn alter_topic(
    &mut self,
    request: impl IntoRequest<AlterTopicRequest>
) -> Result<Response<AlterTopicResponse>, Status>
Alter topic command.
sourcepub async fn drop_topic(
    &mut self,
    request: impl IntoRequest<DropTopicRequest>
) -> Result<Response<DropTopicResponse>, Status>
 
pub async fn drop_topic(
    &mut self,
    request: impl IntoRequest<DropTopicRequest>
) -> Result<Response<DropTopicResponse>, Status>
Drop topic command.
Trait Implementations§
source§impl<T: Clone> Clone for TopicServiceClient<T>
 
impl<T: Clone> Clone for TopicServiceClient<T>
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> 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