rally/generator/ws_handler

WebSocket handler codegen.

Generates ws_handler.gleam: connection init (with optional auth resolve), frame decoding via protocol_wire, page-init handling (topic subscription, auth policy checks), RPC dispatch, push frame delivery, and reauth on stale sessions. The output wires together page dispatch, libero RPC dispatch, and the system message logger.

Values

pub fn generate(
  page_contracts: List(#(types.ScannedRoute, types.PageContract)),
  atoms_module: String,
  rpc_dispatch_module: String,
  auth_config: option.Option(types.AuthConfig),
  from_session_module from_session_module: String,
  endpoints endpoints: List(scanner.HandlerEndpoint),
  wire_import_module wire_import_module: String,
  protocol protocol: String,
) -> String
Search Document