dashboard: lifecycle_action helper collapses start/stop/restart/rebuild

five POST handlers (post_kill / post_restart / post_start / post_rebuild)
were all repeating the same boilerplate: strip prefix, set_transient,
call lifecycle::X, clear_transient, match the result. extract one
helper that takes the transient kind, error-message verb, the work
body, and an optional 'on success' tail (used by kill to also
unregister + emit HelperEvent::Killed). each handler shrinks to a
single lifecycle_action(..) call. zero behavior change.
This commit is contained in:
müde 2026-05-15 20:12:03 +02:00
parent 89ccc5e6c5
commit 7b4adea325
3 changed files with 76 additions and 47 deletions

View file

@ -13,8 +13,8 @@ mod broker;
mod client;
mod coordinator;
mod dashboard;
mod lifecycle;
mod events_vacuum;
mod lifecycle;
mod manager_server;
mod operator_questions;
mod server;