code wiki / _hdl_build / nx_shard_view.nx

nx_shard_view.nx

buildroot/runtime/_hdl_build/nx_shard_view.nx

3616 B70 linesdepth 4pulls 4 transitivereach 9 importersview sourcekind librarytopic shard
docsdependenciesstructsconstsfunctions

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

nx_shard_registry.nx nx_shard_view.nx nx_mgmt_api.nx nx_shard_view_gate.nx

imports: nx_shard_registry.nx

imported by: nx_mgmt_api.nxnx_shard_view_gate.nx

structs

none

consts

7const K_MAGIC_262144: i64 = 262144

functions

9func 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 }
10func sv_catn(buf: *u8, off: i64, v: i64) -> i64
18func sv_read_file(path: *u8, out: *u8, cap: i64) -> i64
called by 1: sv_build_shards_json calls 1: sys_read
33func sv_kv(buf: *u8, off: i64, reg: *u8, ls: i64, le: i64, f: i64, key: *u8) -> i64
43func sv_build_shards_json(conf_path: *u8, out: *u8, cap: i64) -> i64