DETS-backed persistent state.
Two tables live under ~/Library/Application Support/canaryd/:
state.dets- latest state machine snapshot per target key: target name (atom), value: mapevents.dets- append-only event log key: {unix_usec, unique_integer}, value: event map
Each CLI run opens the tables, does its work, syncs and closes.
Summary
Functions
Get latest state for a target, or a fresh default.
All events, newest first, optionally filtered by target.
Append an event. type e.g. :probe_fail, :restarted, :blocked, :recovered, :system_warn.
Run fun with both tables open, guarded by an exclusive lockfile.
Functions
Get latest state for a target, or a fresh default.
All events, newest first, optionally filtered by target.
Append an event. type e.g. :probe_fail, :restarted, :blocked, :recovered, :system_warn.
Run fun with both tables open, guarded by an exclusive lockfile.