nx_mesh_probe.nx
buildroot/runtime/nx_mesh_probe.nx
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
imports: nx_syscalls.nxnx_connect.nxnx_http_client.nx
imported by: nx_worker_dispatch.nx
structs
| none |
consts
| 8 | const K_MAGIC_2048: i64 = 2048 |
| 9 | const K_MAGIC_2000: i64 = 2000 |
| 10 | const K_MAGIC_16384: i64 = 16384 |
| 11 | const K_MAGIC_16383: i64 = 16383 |
functions
| 13 | func mp_pollfd(pfd: *u8, fd: i64, events: i64) -> i64 called by 1: mp_probe |
| 18 | func mp_resp_2xx(buf: *u8, n: i64) -> i64 called by 1: mp_probe |
| 28 | func mp_probe(a: i64, b: i64, c: i64, d: i64, port: i64) -> i64 called by 1: wd_probe calls 11: sys_mmapnx_http_client_sockaddr_ipv4sys_socketnx_connect_boundedmp_pollfdsys_poll+5 |