pub struct BuiltinPluginRuntimeAdapter<E>where
E: PluginEvent,{ /* private fields */ }Expand description
Built-in in-process runtime adapter that preserves the current replay and activation behavior while presenting a stable runtime contract to callers.
Implementations§
Source§impl<E> BuiltinPluginRuntimeAdapter<E>where
E: PluginEvent,
impl<E> BuiltinPluginRuntimeAdapter<E>where
E: PluginEvent,
pub fn new( replay_hook: Arc<dyn Fn(ReplayEvent<E>) -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>, replay_start_observer: Arc<dyn Fn(&str, bool) + Send + Sync>, replay_semaphore: Option<Arc<Semaphore>>, batch_timeout: Duration, idle_sleep: Duration, stop_log_prefix: impl Into<Arc<str>>, ) -> Self
pub async fn prepare_targets( &self, targets: Vec<Box<dyn Target<E> + Send + Sync>>, ) -> PreparedActivation<E>
pub async fn prepare_targets_cancellable( &self, targets: Vec<Box<dyn Target<E> + Send + Sync>>, cancellation: &CancellationToken, ) -> PreparedActivation<E>
Sourcepub fn open_prepared_stores(
&self,
prepared: PreparedActivation<E>,
) -> (OpenedActivation<E>, PreparedActivation<E>)
pub fn open_prepared_stores( &self, prepared: PreparedActivation<E>, ) -> (OpenedActivation<E>, PreparedActivation<E>)
Opens queue stores only after the previous runtime generation has been quiesced. Targets whose stores cannot be opened retain the established fault-isolation behavior and are returned for lock-free shutdown.
pub fn try_activate_prepared( &self, opened: OpenedActivation<E>, ) -> (RuntimeActivation<E>, PreparedActivation<E>)
pub async fn close_prepared( &self, prepared: PreparedActivation<E>, ) -> Result<(), TargetError>
Trait Implementations§
Source§impl<E> Clone for BuiltinPluginRuntimeAdapter<E>where
E: PluginEvent + Clone,
impl<E> Clone for BuiltinPluginRuntimeAdapter<E>where
E: PluginEvent + Clone,
Source§fn clone(&self) -> BuiltinPluginRuntimeAdapter<E>
fn clone(&self) -> BuiltinPluginRuntimeAdapter<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E> PluginRuntimeAdapter<E> for BuiltinPluginRuntimeAdapter<E>where
E: PluginEvent,
impl<E> PluginRuntimeAdapter<E> for BuiltinPluginRuntimeAdapter<E>where
E: PluginEvent,
fn activate_with_replay<'life0, 'async_trait>(
&'life0 self,
targets: Vec<Box<dyn Target<E> + Send + Sync>>,
) -> Pin<Box<dyn Future<Output = RuntimeActivation<E>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn replace_runtime_targets<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
runtime: &'life1 mut TargetRuntimeManager<E>,
replay_workers: &'life2 mut ReplayWorkerManager,
activation: RuntimeActivation<E>,
) -> Pin<Box<dyn Future<Output = Result<(), TargetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stop_replay_workers<'life0, 'life1, 'async_trait>(
&'life0 self,
replay_workers: &'life1 mut ReplayWorkerManager,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn snapshot_runtime_status( &self, runtime: &TargetRuntimeManager<E>, replay_workers: &ReplayWorkerManager, ) -> RuntimeStatusSnapshot
fn snapshot_runtime_health<'life0, 'life1, 'async_trait>(
&'life0 self,
runtime: &'life1 TargetRuntimeManager<E>,
) -> Pin<Box<dyn Future<Output = Vec<RuntimeTargetHealthSnapshot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn shutdown<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
runtime: &'life1 mut TargetRuntimeManager<E>,
replay_workers: &'life2 mut ReplayWorkerManager,
) -> Pin<Box<dyn Future<Output = Result<(), TargetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl<E> !RefUnwindSafe for BuiltinPluginRuntimeAdapter<E>
impl<E> !UnwindSafe for BuiltinPluginRuntimeAdapter<E>
impl<E> Freeze for BuiltinPluginRuntimeAdapter<E>
impl<E> Send for BuiltinPluginRuntimeAdapter<E>
impl<E> Sync for BuiltinPluginRuntimeAdapter<E>
impl<E> Unpin for BuiltinPluginRuntimeAdapter<E>
impl<E> UnsafeUnpin for BuiltinPluginRuntimeAdapter<E>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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