HostKit.Conventions (host_kit v0.1.0-beta.0)

Copy Markdown View Source

Project-level naming and path conventions.

Summary

Functions

Returns the root used for rollback backup payloads.

Returns the root used for minimal HostKit run records.

Returns the HostKit state root, defaulting to /var/lib/hostkit.

Types

t()

@type t() :: %HostKit.Conventions{
  prefixes: %{optional(atom()) => String.t()},
  roots: %{optional(atom()) => String.t()}
}

Functions

backups_root(conventions)

@spec backups_root(t() | map()) :: String.t()

Returns the root used for rollback backup payloads.

new(attrs \\ [])

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

prefixed(conventions, name, value)

@spec prefixed(t() | map(), atom(), term()) :: String.t()

put_prefix(conventions, name, prefix)

@spec put_prefix(t(), atom(), String.t()) :: t()

put_root(conventions, name, path)

@spec put_root(t(), atom(), String.t()) :: t()

root(conventions, name, default)

@spec root(t() | map(), atom(), String.t()) :: String.t()

root!(conventions, name)

@spec root!(t() | map(), atom()) :: String.t()

runs_root(conventions)

@spec runs_root(t() | map()) :: String.t()

Returns the root used for minimal HostKit run records.

state_root(conventions)

@spec state_root(t() | map()) :: String.t()

Returns the HostKit state root, defaulting to /var/lib/hostkit.