Skip to main content

Module storage

Module storage 

Source
Expand description

Rule storage: per-machine .yah/cloud/rules/*.yaml with config-file watcher.

RuleStore loads all rule files from the rules directory at tower boot. Schema versioning is enforced: future-version files are skipped with a warning; older files (lower minor than the current SchemaVersion) migrate lazily. Today that migration is a no-op since V1 is the only version.

RuleStore::watch starts a notify-backed file watcher that emits WatchEvents whenever a rule file is created, modified, or removed. The caller (the tower daemon) maps these events onto Supervisor::update_rule and Supervisor::disable_rule calls per the arch doc §Rule storage.

Architecture: .yah/docs/architecture/A052-yah-tower.md

Structs§

LoadResult
Output of RuleStore::load_all.
RuleStore
Loader and watcher for per-machine tower rule files.
RuleWatcher
Live config-file watcher for the rules directory.
SkippedFile
A rule file that was skipped during load_all.

Enums§

SkipReason
Why a rule file was not loaded.
WatchEvent
Event emitted by the RuleWatcher background thread.