Module type Madge_server.Endpoints

include Madge.Endpoints
type ('a, 'w, 'r) t

The type of internal endpoints. Some other endpoints (batching, metrics) will be added automatically.

val route_internal : ('a, 'w, 'r) t -> ('a, 'w, 'r) Madge.Route.t

Routes of internal endpoints, without the /api prefix.

type wrapped =
  1. | W : ('a, 'r Lwt.t, 'r) t -> wrapped
val all : wrapped list
type 'w wrapped' =
  1. | W' : ('a, 'w, 'r) t -> 'w wrapped'
val all' : unit -> 'w wrapped' list
val name : ('a, 'w, 'r) t -> string
type (_, _, _) full =
  1. | Api : ('a, 'w, 'r) t -> ('a, 'w, 'r) full
  2. | Batch : (Madge.Request.t list -> 'w, 'w, Madge.Response.t list) full
  3. | Metrics : ('w, 'w, Nes.Void.t) full
    (*

    The type of full endpoints, which are the internal endpoints augmented of some other endpoints (batching, metrics).

    *)
val route_full : ('a, 'w, 'r) full -> ('a, 'w, 'r) Madge.Route.t

Routes for full endpoints; this is what is ultimately used to generate URIs or to match them.

val route : ('a, 'w, 'r) t -> ('a, 'w, 'r) Madge.Route.t

Routes for internal endpoints. route e is short for route_full (Api e).

type env
val dispatch : 'a 'r. env -> ('a, 'r Nes.Lwt.t, 'r) t -> 'a

A function dispatching routes to controllers.