Runtime controls for systemd-backed units and transient jobs.
Summary
Functions
Alias for status/2 kept for Unitctl API compatibility.
Restarts a systemd unit or Unitctl instance.
Starts a transient systemd service through Unitctl.
Reads runtime stats for a unit or Unitctl instance.
Reads common systemd state for a unit or Unitctl instance.
Stops a systemd unit or Unitctl instance.
Types
@type unit_ref() :: Unitctl.Instance.t() | String.t()
Functions
@spec inspect( unit_ref(), keyword() ) :: {:ok, Systemd.UnitState.t()} | {:error, term()}
Alias for status/2 kept for Unitctl API compatibility.
@spec restart( unit_ref(), keyword() ) :: :ok | {:ok, Systemd.Job.t()} | {:error, term()}
Restarts a systemd unit or Unitctl instance.
@spec start(Unitctl.Spec.t() | keyword() | map()) :: {:ok, Unitctl.Instance.t()} | {:error, term()}
Starts a transient systemd service through Unitctl.
@spec stats( unit_ref(), keyword() ) :: {:ok, Unitctl.Stats.t()} | {:error, term()}
Reads runtime stats for a unit or Unitctl instance.
@spec status( unit_ref(), keyword() ) :: {:ok, Systemd.UnitState.t()} | {:error, term()}
Reads common systemd state for a unit or Unitctl instance.
@spec stop( unit_ref(), keyword() ) :: :ok | {:ok, Systemd.Job.t()} | {:error, term()}
Stops a systemd unit or Unitctl instance.