nx_audit_server_daemon.nx
buildroot/runtime/nx_audit_server_daemon.nx
about
nx_audit_server_daemon.nx -- accept-loop variant of audit server.
Sibling of nx_audit_server_main.nx (accept-once, used by the
loopback bench). This file is the LONG-RUNNING daemon: binds
127.0.0.1:51847, accepts forever, serves docs/audit/{index.html,
snapshot.json} via nx_pages_static.
Per cardinal user-owns-every-bit: this binary does NOT install
itself as a service. Caller installs via:
- bench/nx_audit_serve.sh (bash supervisor wrapper)
- or by hand: `./nx_audit_server_daemon &`
Per cardinal feedback-bounded-loop-discipline-jpl-rule-2: the
accept loop is bounded by an inner request budget (1M requests
before clean exit to let the parent supervisor recycle). This
is the Erlang let-it-crash discipline applied -- a long-lived
process gives the parent supervisor an opportunity to refresh
state periodically.
expect_exit: 0 (never, in normal operation; bench runs with
a kill-after-N-seconds harness)
dependencies 3 imports · 0 importers
imports: nx_syscalls_x86_64.nxnx_http_server.nxnx_pages_static.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 27 | const NXAD_PORT: i64 = 51847 |
| 28 | const NXAD_REQ_CAP: i64 = 8192 |
| 29 | const NXAD_RESP_CAP: i64 = 524288 // 512 KB |
| 30 | const NXAD_REQUEST_BUDGET: i64 = 1000000 // recycle after 1M reqs |
functions
| 32 | func main() -> i64 |