code wiki / _hdl_build / nx_shard_view.nx
nx_shard_view.nx
buildroot/runtime/_hdl_build/nx_shard_view.nx
about
nx_shard_view.nx -- the cross-shard FLEET VIEW builder (CAP-SHARD-VIEW). Serializes the shard registry
(nx_shard_registry / shards.conf) to JSON for the control plane's /api/shards -- the "dashboard of all accounts"
(AWS Control Tower / k8s fleet console) as a deterministic sovereign endpoint. Kept a standalone module (not inlined
in nx_mgmt_api) so it composes cleanly AND is unit-gateable without standing up the daemon. The mgmt API wraps
sv_build_shards_json() in an HTTP 200; a gate calls it directly. license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_shard_registry.nx
imported by: nx_mgmt_api.nxnx_shard_view_gate.nx
structs
| none |
consts
| 7 | const K_MAGIC_262144: i64 = 262144 |
functions
| 9 | func sv_cat(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { buf[off + i] = s[i]; i = i + 1 } return off + i } |
| 10 | func sv_catn(buf: *u8, off: i64, v: i64) -> i64 called by 1: sv_build_shards_json |
| 18 | func sv_read_file(path: *u8, out: *u8, cap: i64) -> i64 |
| 33 | func sv_kv(buf: *u8, off: i64, reg: *u8, ls: i64, le: i64, f: i64, key: *u8) -> i64 |
| 43 | func sv_build_shards_json(conf_path: *u8, out: *u8, cap: i64) -> i64 |