sig
type json = Json.t
type kind = [ `EXEC | `GET | `SET ]
val string_of_kind : Main.kind -> string
val pp_kind : Format.formatter -> Main.kind -> unit
val register : Main.kind -> string -> (Main.json -> Main.json) -> unit
val find : string -> (Main.kind * (Main.json -> Main.json)) option
val exec : string -> Main.json -> Main.json
type 'a request =
[ `Kill of 'a | `Poll | `Request of 'a * string * Main.json | `Shutdown ]
type 'a response =
[ `Data of 'a * Main.json
| `Error of 'a * string
| `Killed of 'a
| `Rejected of 'a ]
type 'a message = {
requests : 'a Main.request list;
callback : 'a Main.response list -> unit;
}
val run :
pretty:(Format.formatter -> 'a -> unit) ->
?equal:('a -> 'a -> bool) ->
fetch:(unit -> 'a Main.message option) -> unit -> unit
val yield : unit -> unit
val kill : unit -> 'a
val on : (bool -> unit) -> unit
end