summaryrefslogtreecommitdiff
path: root/msg.proto
blob: 1ab78b6906f0dfa863dc21eb850023ada71e92a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
syntax = "proto3";
package main;

message Msg {
  string error = 1;

  oneof payload {
    StartMsg start = 10;
    SourceCodeFetchMsg source_code_fetch = 11;
    SourceCodeFetchResMsg source_code_fetch_res = 12;
    SourceCodeCacheMsg source_code_cache = 13;
    ExitMsg exit = 14;
    TimerStartMsg timer_start = 15;
    TimerReadyMsg timer_ready = 16;
  }
}

// START
message StartMsg {
  string cwd = 1;
  repeated string argv = 2;
}

message SourceCodeFetchMsg { string filename = 1; }

message SourceCodeFetchResMsg {
  string source_code = 1;
  string output_code = 2;
}

message SourceCodeCacheMsg {
  string filename = 1;
  string source_code = 2;
  string output_code = 3;
}

message ExitMsg { int32 code = 1; }

message TimerStartMsg {
  int32 id = 1;
  bool interval = 2;
  int32 duration = 3; // In milliseconds.
}

message TimerReadyMsg {
  int32 id = 1;
  bool done = 2;
}