nx_recordlog.nx
buildroot/runtime/nx_recordlog.nx
about
nx_recordlog.nx -- REUSABLE append-only timestamped record store (no main).
One store, reused everywhere (the genealogist's anti-one-off rule): a pain log,
an audit trail, an event journal, a metrics series -- all are "append a keyed,
timestamped record + count/aggregate them." Each line: "<unix_ts>\t<key>\n".
Additive-only (Cardinal #13): append, never rewrite. Reuses sys_openat_append
+ sys_now_realtime_sec + sys_read_file. license_tier: ORIGINAL
(Existing ad-hoc append loops -- the event-bus log, the warden audit -- are
candidates to migrate onto this; logged for the genealogist's dedup pass.)
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_ui_serve.nx
structs
| none |
consts
| 14 | const RL_MODE: i64 = 420 // 0o644 |
functions
| 16 | func rl_wn(fd: i64, n: i64) -> i64 |
| 27 | func recordlog_append(path: *u8, key: i64) -> i64 |
| 39 | func recordlog_count(path: *u8, key: i64) -> i64 |
| 67 | func recordlog_total(path: *u8) -> i64 |