pub struct TargetPluginRegistry<E>where
E: PluginEvent,{ /* private fields */ }Implementations§
Source§impl<E> TargetPluginRegistry<E>where
E: PluginEvent,
impl<E> TargetPluginRegistry<E>where
E: PluginEvent,
pub fn new() -> Self
pub fn register( &mut self, plugin: TargetPluginDescriptor<E>, ) -> Option<TargetPluginDescriptor<E>>
pub fn register_all<I>(&mut self, plugins: I)where
I: IntoIterator<Item = TargetPluginDescriptor<E>>,
pub fn supports_target_type(&self, target_type: &str) -> bool
pub fn registered_target_types(&self) -> Vec<String>
pub fn create_target( &self, target_type: &str, id: String, config: &KVS, ) -> Result<Box<dyn Target<E> + Send + Sync>, TargetError>
Sourcepub async fn create_targets_from_config(
&self,
config: &Config,
route_prefix: &str,
) -> Result<Vec<Box<dyn Target<E> + Send + Sync>>, TargetError>
pub async fn create_targets_from_config( &self, config: &Config, route_prefix: &str, ) -> Result<Vec<Box<dyn Target<E> + Send + Sync>>, TargetError>
Creates every enabled target instance found in config.
Creation is fault-isolated per instance: one broken target must not prevent the remaining targets from activating, so failures are logged and summarized instead of aborting the whole activation.
Sourcepub async fn create_dormant_targets_from_config(
&self,
config: &Config,
route_prefix: &str,
) -> Result<(Vec<Box<dyn Target<E> + Send + Sync>>, Vec<String>), TargetError>
pub async fn create_dormant_targets_from_config( &self, config: &Config, route_prefix: &str, ) -> Result<(Vec<Box<dyn Target<E> + Send + Sync>>, Vec<String>), TargetError>
Creates targets while deferring queue-store open until runtime handoff. Unlike the compatibility activation API, lifecycle preparation reports any invalid or unconstructable configured instance so the originating Admin request cannot report a false success.
pub async fn create_activation_from_config<A>(
&self,
config: &Config,
route_prefix: &str,
adapter: &A,
) -> Result<RuntimeActivation<E>, TargetError>where
A: PluginRuntimeAdapter<E> + ?Sized,
Trait Implementations§
Source§impl<E> Default for TargetPluginRegistry<E>where
E: PluginEvent,
impl<E> Default for TargetPluginRegistry<E>where
E: PluginEvent,
Auto Trait Implementations§
impl<E> !RefUnwindSafe for TargetPluginRegistry<E>
impl<E> !UnwindSafe for TargetPluginRegistry<E>
impl<E> Freeze for TargetPluginRegistry<E>
impl<E> Send for TargetPluginRegistry<E>
impl<E> Sync for TargetPluginRegistry<E>
impl<E> Unpin for TargetPluginRegistry<E>
impl<E> UnsafeUnpin for TargetPluginRegistry<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> 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