class

Obsctl::Diagnostics::Doctor

Inherits Reference < Object

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.

Constructors

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)
Source

Class methods

healthy?(checks : Array(Check)) : Bool

True when no check failed. Warnings do not fail the command.

Source
probe_daemon(socket_path : String) : JSON::Any | Nil

Default probe: asks a running daemon for its status payload.

Source

Instance methods

run

Runs every check in report order.

Source

Nested types