Systemd.UnitObject (systemd v0.1.0-pre.1)

Copy Markdown View Source

D-Bus object for a loaded systemd unit.

Summary

Functions

Reads one property from the unit object.

Reads common service-specific properties.

Reads common socket-specific properties.

Reads common unit state properties.

Reads common timer-specific properties.

Types

t()

@type t() :: %Systemd.UnitObject{name: String.t() | nil, object_path: String.t()}

Functions

property(conn, unit_object, property)

@spec property(pid(), t(), String.t()) :: {:ok, term()} | {:error, Systemd.Error.t()}

Reads one property from the unit object.

service_state(conn, unit)

@spec service_state(pid(), t()) ::
  {:ok, Systemd.ServiceState.t()} | {:error, Systemd.Error.t()}

Reads common service-specific properties.

socket_state(conn, unit)

@spec socket_state(pid(), t()) ::
  {:ok, Systemd.SocketState.t()} | {:error, Systemd.Error.t()}

Reads common socket-specific properties.

state(conn, unit)

@spec state(pid(), t()) :: {:ok, Systemd.UnitState.t()} | {:error, Systemd.Error.t()}

Reads common unit state properties.

timer_state(conn, unit)

@spec timer_state(pid(), t()) ::
  {:ok, Systemd.TimerState.t()} | {:error, Systemd.Error.t()}

Reads common timer-specific properties.