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:
parent
89ccc5e6c5
commit
7b4adea325
3 changed files with 76 additions and 47 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue