Skip to content

Commit d765345

Browse files
hyperpolymathclaude
andcommitted
lol-gateway: collapse to single-port + path routing via uapi_gnosis_set_handler
Previously the gateway bound three ports (7800 REST / 7801 gRPC / 7802 GraphQL), each with its own accept loop (GnosisPortThread). No current consumer fires more than one protocol simultaneously, so this was unnecessary complexity. New shape: uapi_gnosis_create(7800) + uapi_gnosis_set_handler(lolHandler) + uapi_gnosis_start lolHandler is a C-ABI edge hook that path-dispatches on the parsed request: /api/v1/* → REST handlers (lolRestDispatch) /lol.CorpusService/* → gRPC-compat handlers (lolGrpcDispatch) /graphql → GraphQL handler (lolGraphqlDispatch) else → 404 All handler business logic (corpus I/O, JSON encoding, GraphQL resolution, gRPC-Web compat) is preserved unchanged. The LOL_PORT env var still sets the base port (default 7800); ports 7801/7802 are no longer bound. Module-level g_data_dir / g_allocator / g_context_ready set before uapi_gnosis_start; lolHandler reads them safely (gnosis background thread starts after main() sets these). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dbb475f commit d765345

1 file changed

Lines changed: 703 additions & 319 deletions

File tree

0 commit comments

Comments
 (0)