pub struct ReplicatorHandle { /* private fields */ }Expand description
Handle returned by the user to the runtime at Open. The runtime uses this to drive replicator lifecycle via control events. Contains shared PartitionState for synchronous access-status fencing.
Implementations§
Source§impl ReplicatorHandle
impl ReplicatorHandle
pub fn new( control_tx: Sender<ReplicatorControlEvent>, state: Arc<PartitionState>, data_address: String, shutdown: CancellationToken, ) -> Self
Sourcepub async fn send_control<T>(
&self,
make: impl FnOnce(Sender<Result<T>>) -> ReplicatorControlEvent,
timeout: Duration,
) -> Result<T>
pub async fn send_control<T>( &self, make: impl FnOnce(Sender<Result<T>>) -> ReplicatorControlEvent, timeout: Duration, ) -> Result<T>
Send a control event and wait for reply.
Sourcepub fn state(&self) -> &Arc<PartitionState>
pub fn state(&self) -> &Arc<PartitionState>
Synchronous access to partition state (atomics, no channel hop).
Sourcepub fn data_address(&self) -> &str
pub fn data_address(&self) -> &str
Data plane address for operator registration.
Auto Trait Implementations§
impl Freeze for ReplicatorHandle
impl RefUnwindSafe for ReplicatorHandle
impl Send for ReplicatorHandle
impl Sync for ReplicatorHandle
impl Unpin for ReplicatorHandle
impl UnsafeUnpin for ReplicatorHandle
impl UnwindSafe for ReplicatorHandle
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
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>
Wrap the input message
T in a tonic::Request