module Main:sig
..end
typejson =
Json.t
typekind =
[ `EXEC | `GET | `SET ]
val string_of_kind : kind -> string
val pp_kind : Format.formatter -> kind -> unit
val register : kind -> string -> (json -> json) -> unit
val find : string -> (kind * (json -> json)) option
val exec : string -> json -> json
type'a
request =[ `Kill of 'a | `Poll | `Request of 'a * string * json | `Shutdown ]
type'a
response =[ `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 -> 'a
val on : (bool -> unit) -> unit