HostKit.Runtime.Spec (host_kit v0.1.0-beta.0)

Copy Markdown View Source

HostKit alias for Unitctl transient service specs.

Summary

Functions

Builds a runtime spec from a map or keyword list.

Builds a runtime spec or raises ArgumentError.

Converts the spec to systemdkit transient-unit properties.

Returns the transient systemd service unit name.

Types

t()

@type t() :: Unitctl.Spec.t()

Functions

new(attrs)

@spec new(map() | keyword()) :: {:ok, t()} | {:error, term()}

Builds a runtime spec from a map or keyword list.

new!(attrs)

@spec new!(map() | keyword()) :: t()

Builds a runtime spec or raises ArgumentError.

to_properties(spec)

@spec to_properties(t()) :: [Systemd.TransientUnit.Property.t()]

Converts the spec to systemdkit transient-unit properties.

unit_name(spec)

@spec unit_name(t()) :: String.t()

Returns the transient systemd service unit name.