serialization.atd 898 Bytes
Newer Older
Fardale's avatar
Fardale committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
type node = {addr: string; ~port <ocaml default="4242">: int; cpu: int; ram: int}

type master_conf = {pass: string; ~port <ocaml default="4242">: int; nodes: node list}
type node_conf = {pass: string; ~port <ocaml default="4242">: int}

type computation = {id: (int * int); env: string list; script: string; time: float option; pass: string; port: int; cpu: int; ram: int}

type ret_code = [WEXITED of int | WSIGNALED of int | WSTOPPED of int]

type submission = {script: string; time: float option; iteration: int <ocaml default="1">;
                   cpu: int <ocaml default="1">; ram: int <ocaml default="1024">;
                   pass: string}

type query = [COMPUTATION of computation | STAT | RESULT of result | JOB of submission]

16 17
type answer = [Ok | Error of string]

Fardale's avatar
Fardale committed
18 19 20 21
type stat = [OK]

type result =
  {id: (int * int); stdout: string; stderr: string; ret_code: ret_code; pass: string}