summaryrefslogtreecommitdiff
path: root/msg.proto
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-05-25 15:36:13 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-05-25 16:16:28 -0400
commit0fe6ab91df7158cacd5c2a632d36066251a292c4 (patch)
tree054673ba8b49ce6a122cf02612a80ecb5c89f0aa /msg.proto
parent5b858632acb672c1f38145edac9df11fdbcacad6 (diff)
Finish de-oneof-ing
Diffstat (limited to 'msg.proto')
-rw-r--r--msg.proto60
1 files changed, 27 insertions, 33 deletions
diff --git a/msg.proto b/msg.proto
index db86f8ae1..28ad77e56 100644
--- a/msg.proto
+++ b/msg.proto
@@ -12,8 +12,13 @@ message Msg {
enum Command {
ERROR = 0;
START = 1;
- SOURCE_CODE_FETCH_RES = 2;
- ONEOF = 100;
+ SOURCE_CODE_FETCH = 2;
+ SOURCE_CODE_FETCH_RES = 3;
+ SOURCE_CODE_CACHE = 4;
+ EXIT = 5;
+ TIMER_START = 6;
+ TIMER_READY = 7;
+ TIMER_CLEAR = 8;
}
Command command = 2;
@@ -23,13 +28,17 @@ message Msg {
// potentially add many hundreds of commands. Therefore we just prefix command
// arguments by their name.
- // Start
+ // START
string start_cwd = 10;
repeated string start_argv = 11;
bool start_debug_flag = 12;
string start_main_js = 13; // The contents of dist/main.js
string start_main_map = 14; // The contents of dist/main.map
+ // SOURCE_CODE_FETCH
+ string source_code_fetch_module_specifier = 20;
+ string source_code_fetch_containing_file = 21;
+
// SOURCE_CODE_FETCH_RES
// If it's a non-http module, moduleName and filename will be the same.
// For http modules, moduleName is its resolved http URL, and filename
@@ -39,38 +48,23 @@ message Msg {
string source_code_fetch_res_source_code = 32;
string source_code_fetch_res_output_code = 33; // Non-empty only if cached.
- oneof payload {
- SourceCodeFetchMsg source_code_fetch = 100;
- SourceCodeCacheMsg source_code_cache = 102;
- ExitMsg exit = 103;
- TimerStartMsg timer_start = 104;
- TimerReadyMsg timer_ready = 105;
- TimerClearMsg timer_clear = 106;
- }
-}
-
-message SourceCodeFetchMsg {
- string module_specifier = 1;
- string containing_file = 2;
-}
+ // SOURCE_CODE_CACHE
+ string source_code_cache_filename = 41;
+ string source_code_cache_source_code = 42;
+ string source_code_cache_output_code = 43;
-message SourceCodeCacheMsg {
- string filename = 1;
- string source_code = 2;
- string output_code = 3;
-}
+ // EXIT
+ int32 exit_code = 50;
-message ExitMsg { int32 code = 1; }
+ // TIMER_START
+ int32 timer_start_id = 60;
+ bool timer_start_interval = 61;
+ int32 timer_start_duration = 62; // In milliseconds.
-message TimerStartMsg {
- int32 id = 1;
- bool interval = 2;
- int32 duration = 3; // In milliseconds.
-}
+ // TIMER_READY
+ int32 timer_ready_id = 70;
+ bool timer_ready_done = 71;
-message TimerReadyMsg {
- int32 id = 1;
- bool done = 2;
+ // TIMER_CLEAR
+ int32 timer_clear_id = 80;
}
-
-message TimerClearMsg { int32 id = 1; }