code wiki / _hdl_build / nx_gen_orchestrator_gate.nx
nx_gen_orchestrator_gate.nx
buildroot/runtime/_hdl_build/nx_gen_orchestrator_gate.nx
about
nx_gen_orchestrator_gate.nx -- end-to-end gate for the gen daemon over REAL loopback sockets.
Parent creates two listening sockets (worker + orchestrator) BEFORE forking (backlog removes any
race), forks a MOCK GPU worker (returns {"images":[b64,b64]} for /sdapi/v1/txt2img) and an
orchestrator server (go_serve_conn), then acts as the HTTP client:
(1) POST /api/generate -> 200, "count":2, real CIDs returned (socket dispatch + pipeline)
(2) GET /img/<cid> -> 200 image/png with a real PNG body (sidecar lookup + blob serve)
(3) GET / -> 200 with the gen UI
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_gen_orchestrator.nxnx_connect.nxnx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 13 | func og(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 14 | func og_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: og_find |
| 15 | func og_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var i: i64=0; while s[i]!=(0 as u8){dst[o]=s[i]; o=o+1; i=i+1} return o } called by 1: main |
| 16 | func og_catb(dst: *u8, off: i64, src: *u8, n: i64) -> i64 { var o: i64=off; var i: i64=0; while i<n {dst[o]=src[i]; o=o+1; i=i+1} return o } called by 1: main |
| 17 | func og_itoa(dst: *u8, off: i64, v: i64) -> i64 { let t: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var o: i64=off; var q: i64=k-1; while q>=0{dst[o]=t[q];o=o+1;q=q-1} return o } |
| 18 | func og_find(buf: *u8, n: i64, needle: *u8) -> i64 |
| 26 | func og_basepng(b: *u8) -> i64 called by 1: main |
| 40 | func og_enc(v: i64) -> i64 { let x: i64=v&0x3f; if x<26 {return 65+x} if x<52 {return 97+(x-26)} if x<62 {return 48+(x-52)} if x==62 {return 43} return 47 } called by 1: og_b64encode |
| 41 | func og_b64encode(inp: *u8, n: i64, out: *u8) -> i64 |
| 55 | func og_listen(port: i64) -> i64 |
| 66 | func og_connect(port: i64) -> i64 |
| 76 | func og_freshns(prefix: *u8) -> i64 |
| 85 | func og_truncate(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd>=0 {sys_close(fd)} return 0 } |
| 88 | func og_readresp(fd: i64, resp: *u8, cap: i64) -> i64 |
| 94 | func main() -> i64 |