pub struct BidiStreamHandle<REQ, RSP> {
pub request_sender: BidiStreamSender<REQ>,
pub response_stream: BidiStreamReceiver<RSP>,
}
Fields§
§request_sender: BidiStreamSender<REQ>
§response_stream: BidiStreamReceiver<RSP>
Implementations§
source§impl<REQ: From<SinkWriterStreamRequest>> BidiStreamHandle<REQ, SinkWriterStreamResponse>
impl<REQ: From<SinkWriterStreamRequest>> BidiStreamHandle<REQ, SinkWriterStreamResponse>
source§impl BidiStreamHandle<CoordinateRequest, CoordinateResponse>
impl BidiStreamHandle<CoordinateRequest, CoordinateResponse>
pub async fn new( client: SinkCoordinationRpcClient, param: PbSinkParam, vnode_bitmap: Bitmap, ) -> Result<Self, RpcError>
pub async fn new_with_init_stream<F, St, Fut>( param: PbSinkParam, vnode_bitmap: Bitmap, init_stream: F, ) -> Result<Self, RpcError>
pub async fn commit(&mut self, epoch: u64, metadata: SinkMetadata) -> Result<()>
pub async fn update_vnode_bitmap(&mut self, vnode_bitmap: &Bitmap) -> Result<()>
pub async fn stop(&mut self) -> Result<()>
source§impl<REQ, RSP> BidiStreamHandle<REQ, RSP>
impl<REQ, RSP> BidiStreamHandle<REQ, RSP>
pub fn for_test( request_sender: Sender<REQ>, response_stream: BoxStream<'static, Result<RSP>>, ) -> Self
pub async fn initialize<F: FnOnce(Receiver<REQ>) -> Fut, St: Stream<Item = Result<RSP>> + Send + Unpin + 'static, Fut: Future<Output = Result<St>> + Send, R: Into<REQ>>( first_request: R, init_stream_fn: F, ) -> Result<(Self, RSP)>
pub async fn next_response(&mut self) -> Result<RSP>
pub async fn send_request(&mut self, request: REQ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<REQ, RSP> Freeze for BidiStreamHandle<REQ, RSP>where
RSP: Freeze,
impl<REQ, RSP> !RefUnwindSafe for BidiStreamHandle<REQ, RSP>
impl<REQ, RSP> Send for BidiStreamHandle<REQ, RSP>
impl<REQ, RSP> !Sync for BidiStreamHandle<REQ, RSP>
impl<REQ, RSP> Unpin for BidiStreamHandle<REQ, RSP>
impl<REQ, RSP> !UnwindSafe for BidiStreamHandle<REQ, RSP>
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
Mutably borrows from an owned value. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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>
Wrap the input message
T
in a tonic::Request
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level
.source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
.source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n
with metric_level
set to
MetricLevel::Debug
and relabel_num
set to 1.