class
Obsctl::Diagnostics::Doctor
- Obsctl::Diagnostics::Doctor
- Reference
- Object
Overview
Collects setup diagnostics for obsctl doctor.
Every external dependency is injected so the whole report is reproducible in specs without a daemon, a config file, or an OBS instance. The probe returns the daemon's server-status payload, or nil when the daemon is not reachable.
Defined in:
obsctl/diagnostics/doctor.crConstructors
Class Method Summary
-
.healthy?(checks : Array(Check)) : Bool
True when no check failed.
-
.probe_daemon(socket_path : String) : JSON::Any | Nil
Default probe: asks a running daemon for its status payload.
Instance Method Summary
-
#run : Array(Check)
Runs every check in report order.
Constructor Detail
def self.new(config_path : String, socket_path : String, env : Hash(String, String) | ENV.class = ENV, daemon_probe : DaemonProbe = ->Doctor.probe_daemon(String), service_path : String = Service::SystemdUserService.default_path)
#
Class Method Detail
True when no check failed. Warnings do not fail the command.
def self.probe_daemon(socket_path : String) : JSON::Any | Nil
#
Default probe: asks a running daemon for its status payload.