Struct Plugin Host Activation
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
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
impl PluginHostActivation
impl PluginHostActivation
activate
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.
activate_with_discovered_config
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.
is_active
pub fn is_active(&self) -> bool
Returns whether this activation handle has not begun teardown.
false means the handle is no longer reusable. It does not guarantee that another process-wide activation can start: failed teardown may intentionally retain the loaded runtimes and activation owner.
clear
pub fn clear(self) -> Result<()>
Clear registered callbacks before unloading libraries and workers.
Trait Implementations
impl Drop for PluginHostActivation
impl Drop for PluginHostActivation
drop
fn drop(&mut self)