Runtime specification for a systemd-backed process.
Unitctl.Spec is intentionally application-shaped instead of D-Bus-shaped.
It describes what to run, while unitctl translates it to a transient
systemd service through systemdkit.
Summary
Functions
Builds a runtime spec from a map or keyword list.
Builds a runtime spec or raises ArgumentError.
Converts the spec to typed systemdkit transient-unit properties.
Returns the transient systemd service unit name.
Types
@type resources() :: %{ optional(:memory_max) => non_neg_integer(), optional(:tasks_max) => non_neg_integer(), optional(:cpu_quota) => non_neg_integer() }
@type t() :: %Unitctl.Spec{ bus: Systemd.DBus.bus(), command: [String.t()], description: String.t() | nil, environment: %{optional(String.t()) => String.t()}, group: String.t() | nil, name: String.t(), resources: resources(), restart: String.t() | nil, sandbox: sandbox(), timeout_stop_usec: non_neg_integer() | nil, user: String.t() | nil, wait: boolean(), wait_timeout: non_neg_integer(), working_directory: String.t() | nil }
Functions
Builds a runtime spec from a map or keyword list.
Builds a runtime spec or raises ArgumentError.
@spec to_properties(t()) :: [Systemd.TransientUnit.Property.t()]
Converts the spec to typed systemdkit transient-unit properties.
Returns the transient systemd service unit name.