pub struct PluginHostActivation { /* private fields */ }Expand description
Owns one process-wide dynamic plugin configuration and its loaded runtimes.
The activation keeps native libraries and worker processes alive until after all callbacks and subscribers registered from them have been removed. Only one activation may exist in a process at a time.
Implementations§
Source§impl PluginHostActivation
impl PluginHostActivation
Sourcepub async fn activate<I>(
config: PluginConfig,
dynamic_plugins: I,
) -> Result<(Self, ConfigReport)>where
I: IntoIterator<Item = DynamicPluginActivationSpec>,
pub async fn activate<I>(
config: PluginConfig,
dynamic_plugins: I,
) -> Result<(Self, ConfigReport)>where
I: IntoIterator<Item = DynamicPluginActivationSpec>,
Load dynamic plugins and activate them with config as one transaction.
The supplied base configuration may contain statically registered components. Dynamic components are appended after them in specification order. At least one dynamic plugin is required; static-only callers should use the regular plugin initialization API. The returned activation must remain alive for as long as code may invoke plugin-provided callbacks.
Sourcepub async fn activate_with_discovered_config<I>(
config: PluginConfig,
dynamic_plugins: I,
) -> Result<(Self, ConfigReport)>where
I: IntoIterator<Item = DynamicPluginActivationSpec>,
pub async fn activate_with_discovered_config<I>(
config: PluginConfig,
dynamic_plugins: I,
) -> Result<(Self, ConfigReport)>where
I: IntoIterator<Item = DynamicPluginActivationSpec>,
Load dynamic plugins after layering config over discovered plugins.toml files.
This is the harness-native entrypoint for language and FFI bindings. File
discovery and merging happen once before activation, and the explicit
config has higher precedence. Hosts such as the Relay CLI that already
resolved plugin configuration should call Self::activate instead.
Trait Implementations§
Source§impl Drop for PluginHostActivation
impl Drop for PluginHostActivation
Auto Trait Implementations§
impl Freeze for PluginHostActivation
impl RefUnwindSafe for PluginHostActivation
impl Send for PluginHostActivation
impl Sync for PluginHostActivation
impl Unpin for PluginHostActivation
impl UnsafeUnpin for PluginHostActivation
impl UnwindSafe for PluginHostActivation
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<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> ⓘ
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> ⓘ
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>
T in a tonic::Request