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 28 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 · 6 importers

nx_shard_registry.nx nx_shard_view.nx nx_mgmt_api.nx nx_mgmt_api.pre-toolchain-20260910 nx_mgmt_api_search_candidate_t330. nx_mgmt_api_toolchain_session_2026 nx_mgmt_cap_candidate_t186.nx nx_mgmt_deploy_candidate_t185.nx

imports: nx_shard_registry.nx

imported by: nx_mgmt_api.nxnx_mgmt_api.pre-toolchain-20260910.nxnx_mgmt_api_search_candidate_t330.nxnx_mgmt_api_toolchain_session_20260910.nxnx_mgmt_cap_candidate_t186.nxnx_mgmt_deploy_candidate_t185.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
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