Module Arod_server

httpz + Eio server adapter for arod routes

This module adapts the framework-agnostic Arod.Route abstraction to work with httpz for HTTP parsing and Eio for async I/O. It provides a zero-allocation request/response path using CPS-style handlers that write responses directly.

val run : sw:Eio.Switch.t -> net:_ Eio.Net.t -> config:Arod.Config.t -> log:Arod_log.t -> Httpz_server.Route.t -> unit

run ~sw ~net ~config ~log routes starts the httpz + Eio server with the given routes.

  • parameter sw

    Eio switch for managing server lifecycle.

  • parameter net

    Eio network for creating sockets.

  • parameter config

    Server configuration with host, port, and paths.

  • parameter log

    Access log database for request logging.

  • raises exn

    on server errors (Eio propagates exceptions)