Units are description files that describe everything Rind manages. They are the metadata layer of the Registry.

flowchart LR
    TOML[Unit] --> OR[[Orchestrators]]
    OR -->|register metadata| MR[MetadataRegistry]
    OR -->|dispatch runtimes| RT[[Runtimes]]

TOML Structure

[[service]]
name = "web"
run.exec = "/usr/bin/httpd"
restart = { max_retries = 3 }
 
[[facet]]
name = "ready"
payload = "string"

Group Names

The file stem becomes the group name: example.toml → group "example". Every entity in that file is addressable as example:<name>.

# example.toml → group "example"
[[service]]
name = "web_ser"
# addressable as "example:web_ser"

Built-in Entity Types

TOML sectionRust typePurpose
[[service]]ServiceA process to spawn and manage
[[timer]]TimerA one-shot timer
[[socket]]SocketA Unix/TCP/UDP socket
[[mount]]MountA filesystem mount point
[[facet]]FlowFacetA persistent state fact
[[impulse]]FlowImpulseAn ephemeral event
[[variable]]VariableA reusable run definition
[[permission]]PermissionAn access permission
[[network]]NetworkConfigA network interface
[[transport-route]]TransportRouteA transport routing rule

Mixed Types

A single unit can define multiple entity types:

[[service]]
name = "app"
run.exec = "/usr/bin/app"
 
[[facet]]
name = "app:status"
payload = "string"
 
[[impulse]]
name = "app:event"
payload = "json"
 
[[timer]]
name = "healthcheck"
duration = "30s"
finish = [{ impulse = "app:health:check" }]