code wiki / (root) / nx_recordlog.nx

nx_recordlog.nx

buildroot/runtime/nx_recordlog.nx

2877 B77 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_recordlog.nx nx_ui_serve.nx

imports: nx_syscalls.nx

imported by: nx_ui_serve.nx

structs

none

consts

14const RL_MODE: i64 = 420 // 0o644

functions

16func rl_wn(fd: i64, n: i64) -> i64
called by 1: recordlog_append calls 2: sys_writesys_mmap
27func recordlog_append(path: *u8, key: i64) -> i64
39func recordlog_count(path: *u8, key: i64) -> i64
67func recordlog_total(path: *u8) -> i64