module Main:sig..end
typejson =Json.t
typekind =[ `EXEC | `GET | `SET ]
val string_of_kind : kind -> string
val pp_kind : Format.formatter -> kind -> unitval register : kind -> string -> (json -> json) -> unit
val find : string -> (kind * (json -> json)) option
val exec : string -> json -> jsontype'arequest =[ `Kill of 'a | `Poll | `Request of 'a * string * json | `Shutdown ]
type'aresponse =[ `Data of 'a * json
| `Error of 'a * string
| `Killed of 'a
| `Rejected of 'a ]
type 'a message = {
|
requests : |
|
callback : |
val run : pretty:(Format.formatter -> 'a -> unit) ->
?equal:('a -> 'a -> bool) ->
fetch:(unit -> 'a message option) -> unit -> unit
The function does not return until the server is explicitely
Shutdown. Logs are monitored unless ~logs:false is specified.
Default equality is the standard `(=)` one.
val yield : unit -> unit!Db.progress().val kill : unit -> 'aval on : (bool -> unit) -> unit