Source Events ↗

plugins.reload_requested

Plugin reload API was called.

When
POST /api/system/plugins/reload accepted.
Payload
JSON: { plugin_count, delay_ms }.
Cancelable
No

This event fires before restart.scheduled.

Use cases

  • Audit plugin reloads
  • Notify external automation

Example

Registration and handler

Register

hook!(host, PluginEvent::PluginReloadRequested, on_reload);

Handler

extern "C" fn on_event(ctx: *const EventContext) -> HookResult {
    let ctx = unsafe { &*ctx };
    let payload = unsafe { std::slice::from_raw_parts(ctx.payload_ptr, ctx.payload_len) };
    let _json = std::str::from_utf8(payload).unwrap_or_default();
    HookResult::r#continue()
}

← All lifecycle events