NAME
Developer::Dashboard::CLI::RuntimeControl - shared restart, stop, and log command runtime for Developer Dashboard
SYNOPSIS
use Developer::Dashboard::CLI::RuntimeControl;
Developer::Dashboard::CLI::RuntimeControl::run_runtime_command(
command => 'restart',
args => \@ARGV,
runtime => $runtime,
config => $config,
collectors => $collectors,
);
DESCRIPTION
Owns the command parsing and default human-facing output for the built-in runtime control commands: dashboard restart, dashboard stop, dashboard log, and dashboard logs.
PURPOSE
This module centralizes the public runtime-control command contract so restart, stop, and log flows stay thin in the staged helper runtime while still sharing one consistent parser, progress board hookup, JSON mode, and default summary table behavior.
WHY IT EXISTS
It exists because restart and stop now need scoped variants such as dashboard restart web and dashboard stop collector NAME, and those flows should not be duplicated inside the private switchboard. Keeping the logic here makes the contract testable and keeps the thin helper loader honest.
WHEN TO USE
Use this file when changing the public restart/stop/log CLI verbs, scoped lifecycle semantics, progress board wiring, or the default summary table printed after runtime-control commands finish.
HOW TO USE
Call run_runtime_command with the command name, raw argv array reference, runtime manager, config object, and collector store. The helper parses the scope, optional collector target, lifecycle flags, and output mode, then prints either JSON or a terminal table.
WHAT USES IT
It is used by the private _dashboard-core helper for top-level lifecycle and log commands, by CLI smoke tests that pin public operator behavior, and by runtime-manager tests that verify scoped restart and stop progress plans.
EXAMPLES
dashboard restart
dashboard restart web --port 7901
dashboard restart collector housekeeper -o json
dashboard stop collector
dashboard log
dashboard log collector alpha.collector
dashboard log web -n 50