pub struct PluginDeclaration {
pub name: String,
pub kind: String,
pub hooks: Vec<String>,
pub capabilities: Vec<String>,
pub config: Option<Value>,
pub on_error: Option<String>,
pub extra: HashMap<String, Value>,
}Expand description
One entry from the root plugins: block. The minimal shape apl-core
needs to make routing + dispatch decisions; richer CPEX fields
(source, priority, mode, transport blocks, description,
version) are captured opaquely under extra so the round-trip
preserves them without us modeling every variant for v0.
Fields§
§name: StringPlugin name — referenced from routes by plugin(name) and used
as the key in PluginRegistry.
kind: StringImplementation kind. Spec defines a closed set (builtin,
native, wasm, FQN, external, isolated_venv, PDP kinds)
but we parse as a free string so configs using future kinds
the runtime understands aren’t rejected at the apl-core layer.
hooks: Vec<String>CPEX hook names this plugin implements. Invokers pick which hook to dispatch based on this list; v0 uses the first entry, future versions will choose by invocation context (policy vs post_policy vs pipe-chain).
Per spec §“Hook dispatch”: NOT overridable per-route.
capabilities: Vec<String>Attribute-extension capabilities (read_subject, read_labels,
append_labels, read_headers, …). The runtime uses these for
extension filtering before dispatch. v0: parsed but not yet
enforced (capability gating is a separately tracked item).
config: Option<Value>Opaque per-plugin config. Passed to the plugin verbatim by the CPEX runtime; apl-core doesn’t interpret it.
on_error: Option<String>fail | ignore | disable. Defaults to fail per spec when None.
extra: HashMap<String, Value>Catch-all for source, priority, mode, transport blocks,
description, version, etc. Preserved so a future loader can
read them without re-parsing the YAML.
Trait Implementations§
Source§impl Clone for PluginDeclaration
impl Clone for PluginDeclaration
Source§fn clone(&self) -> PluginDeclaration
fn clone(&self) -> PluginDeclaration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more