code wiki / (root) / nx_mesh_probe.nx

nx_mesh_probe.nx

buildroot/runtime/nx_mesh_probe.nx

2535 B52 linesdepth 6pulls 8 transitivereach 1 importersview sourcekind probetopic mesh
docsdependenciesstructsconstsfunctions

about

nx_mesh_probe.nx -- SHARED worker-mesh health probe (single source; consolidates the copy that lived in nx_mesh_autoscale + nx_mesh_lb + nx_mesh_hostagent). A BOUNDED, non-blocking TCP probe: a cold/firewalled worker is detected in ~1s instead of hanging on a blocking connect (fatal for an autoscaler that must SPAWN promptly). mp_probe(a,b,c,d,port) -> 1 if the worker answers HTTP 2xx on /v1/models, else 0. NO main (library). license_tier: ORIGINAL

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_connect.nx nx_http_client.nx nx_mesh_probe.nx nx_worker_dispatch.nx

imports: nx_syscalls.nxnx_connect.nxnx_http_client.nx

imported by: nx_worker_dispatch.nx

structs

none

consts

8const K_MAGIC_2048: i64 = 2048
9const K_MAGIC_2000: i64 = 2000
10const K_MAGIC_16384: i64 = 16384
11const K_MAGIC_16383: i64 = 16383

functions

13func mp_pollfd(pfd: *u8, fd: i64, events: i64) -> i64
called by 1: mp_probe
18func mp_resp_2xx(buf: *u8, n: i64) -> i64
called by 1: mp_probe
28func mp_probe(a: i64, b: i64, c: i64, d: i64, port: i64) -> i64