Skip to main content

cordis_loader/
events.rs

1//! Names of the events the loader emits on the root context's event bus.
2//!
3//! All listeners receive the affected [`Entry`](crate::Entry) as the first
4//! argument; `config-update` additionally carries the new
5//! [`Node`](crate::Node) config as the second. Listener failures are
6//! recorded through [`Loader::last_error`](crate::Loader::last_error) and
7//! never abort the state machine — keep listeners light, they run inside
8//! loader transitions.
9
10/// Emitted after an entry's fiber was created and mapped.
11pub const ENTRY_INIT: &str = "loader/entry-init";
12
13/// Emitted before a config-only patch is applied to a live fiber.
14pub const BEFORE_PATCH: &str = "loader/before-patch";
15
16/// Emitted after a config-only patch was applied.
17pub const AFTER_PATCH: &str = "loader/after-patch";
18
19/// Emitted after a self-disposed plugin was persisted as `disabled: true`.
20pub const PARTIAL_DISPOSE: &str = "loader/partial-dispose";
21
22/// Emitted after [`update_config`](crate::Loader::update_config) changed
23/// and persisted an entry's config.
24pub const CONFIG_UPDATE: &str = "loader/config-update";