Struct Dynamic Plugin Registry
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.
In-memory dynamic plugin registry used by the control plane.
Implementations
impl DynamicPluginRegistry
impl DynamicPluginRegistry
new
pub fn new() -> Self
Creates an empty dynamic plugin registry.
from_records
pub fn from_records(records: Vec<DynamicPluginRecord>) -> Result<Self>
Reconstructs a registry from previously persisted durable records.
get
pub fn get(&self, plugin_id: &str) -> Option<&DynamicPluginRecord>
Returns the registered record for plugin_id, if present.
list
pub fn list(&self, include_tombstoned: bool) -> Vec<&DynamicPluginRecord>
Lists records, hiding tombstones unless requested.
cloned_records
pub fn cloned_records(
&self,
include_tombstoned: bool,
) -> Vec<DynamicPluginRecord>
Clones records for serialization or higher-level projection.
add
pub fn add(
&mut self,
record: DynamicPluginRecord,
) -> Result<&DynamicPluginRecord>
Adds a new dynamic plugin record.
This is a trusted internal control-plane API. Callers that start from an authored relay-plugin.toml manifest should prefer Self::add_manifest so the manifest contract is enforced before record creation.
add_manifest
pub fn add_manifest(
&mut self,
manifest: DynamicPluginManifest,
manifest_ref: Option<String>,
) -> Result<&DynamicPluginRecord>
Validates an authored manifest and registers the resulting dynamic plugin record.
enable
pub fn enable(&mut self, plugin_id: &str) -> Result<bool>
Marks the plugin enabled in desired state.
disable
pub fn disable(&mut self, plugin_id: &str) -> Result<bool>
Marks the plugin disabled in desired state.
remove
pub fn remove(&mut self, plugin_id: &str) -> Result<bool>
Tombstones the plugin record and disables desired runtime realization.
update_validation_status
pub fn update_validation_status(
&mut self,
plugin_id: &str,
validation: DynamicPluginValidationStatus,
) -> Result<()>
Replaces the current validation status without mutating desired state.
update_runtime_status
pub fn update_runtime_status(
&mut self,
plugin_id: &str,
runtime: DynamicPluginRuntimeStatus,
) -> Result<()>
Replaces the current runtime status without mutating desired state.
update_last_error
pub fn update_last_error(
&mut self,
plugin_id: &str,
last_error: Option<DynamicPluginFailure>,
) -> Result<()>
Records the most recent dynamic-plugin failure summary.
update_environment
pub fn update_environment(
&mut self,
plugin_id: &str,
environment_ref: Option<String>,
environment: DynamicPluginCheckState,
) -> Result<()>
Replaces the resolved worker environment and its validation state.
update_policy_status
pub fn update_policy_status(
&mut self,
plugin_id: &str,
policy_satisfied: DynamicPluginCheckState,
startup_class: DynamicPluginStartupClass,
attestation_mode: DynamicPluginAttestationMode,
last_error: Option<DynamicPluginFailure>,
) -> Result<()>
Replaces the current host-policy outcome without mutating desired state.
replace_declaration
pub fn replace_declaration(
&mut self,
plugin_id: &str,
replacement: DynamicPluginRecord,
) -> Result<()>
Replaces declaration-owned fields while preserving lifecycle-owned state.
The replacement must describe the same plugin ID. Desired state, runtime state, and durable lifecycle metadata remain attached to the existing record.
Trait Implementations
impl Debug for DynamicPluginRegistry
impl Debug for DynamicPluginRegistry
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for DynamicPluginRegistry
impl Default for DynamicPluginRegistry
default
fn default() -> DynamicPluginRegistry