Functor Parry_server.Server

module Server: 
functor (J : Parry_common.Job) -> sig .. end
Parameters:
J : Parry_common.Job

module JSet: Set.S  with type elt=J.job
type state = {
   jobs : JSet.t;
   ongoing : (string * Cryptokit.RSA.key * J.job * float * float) Parry_server.IntMap.t;
   unemployed : float Parry_server.IntMap.t;
   results : J.result;
   newId : int;
   killings : int;
   solved : int;
   authorized_keys : Cryptokit.RSA.key Parry_server.IntMap.t;
   reverse_authorized_keys : int Parry_server.StrMap.t;
}
This type contains the whole server state. The correctness of Parry is proven using invariants on this structure. Touch at your own risk, preferably after reading the proof.
val initial_state : J.job list -> J.result -> state Pervasives.ref * Mutex.t
Create an initial state, which is a state ref and a Mutex.t. It is strongly recommended, for the correctness of Parry, to not use := on the reference without calling Mutex.lock before.
val add_key : state Pervasives.ref * Mutex.t ->
Cryptokit.RSA.key -> unit
Authorize the given RSA key to connect to the server.
val server : state Pervasives.ref * Mutex.t -> unit
Start a server, with the given state.
val webui : int -> state Pervasives.ref * Mutex.t -> unit
Start a web interface on the given port and state, to observe the progresses of jobs.