forked from coder/code-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.proto
More file actions
138 lines (115 loc) · 2.23 KB
/
node.proto
File metadata and controls
138 lines (115 loc) · 2.23 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
syntax = "proto3";
enum Module {
ChildProcess = 0;
Fs = 1;
Net = 2;
NodePty = 3;
Spdlog = 4;
Trash = 5;
}
message Argument {
message ErrorValue {
string message = 1;
string stack = 2;
string code = 3;
}
message BufferValue {
bytes data = 1;
}
message ObjectValue {
map<string, Argument> data = 1;
}
message ArrayValue {
repeated Argument data = 1;
}
message ProxyValue {
uint64 id = 1;
}
message FunctionValue {
uint64 id = 1;
}
message NullValue {}
message UndefinedValue {}
oneof msg {
ErrorValue error = 1;
BufferValue buffer = 2;
ObjectValue object = 3;
ArrayValue array = 4;
ProxyValue proxy = 5;
FunctionValue function = 6;
NullValue null = 7;
UndefinedValue undefined = 8;
double number = 9;
string string = 10;
bool boolean = 11;
}
}
// Call a remote method.
message Method {
// A proxy identified by a unique name like "fs".
message Named {
uint64 id = 1;
Module module = 2;
string method = 3;
repeated Argument args = 4;
}
// A general proxy identified by an ID like WriteStream.
message Numbered {
uint64 id = 1;
uint64 proxy_id = 2;
string method = 3;
repeated Argument args = 4;
}
// Remote method failed.
message Fail {
uint64 id = 1;
Argument response = 2;
}
// Remote method succeeded.
message Success {
uint64 id = 1;
Argument response = 2;
}
oneof msg {
Method.Named named_proxy = 1;
Method.Numbered numbered_proxy = 2;
}
}
message Callback {
// A remote callback for uniquely named proxy.
message Named {
Module module = 1;
uint64 callback_id = 2;
repeated Argument args = 3;
}
// A remote callback for a numbered proxy.
message Numbered {
uint64 proxy_id = 1;
uint64 callback_id = 2;
repeated Argument args = 3;
}
oneof msg {
Callback.Named named_callback = 1;
Callback.Numbered numbered_callback = 2;
}
}
message Event {
// Emit an event on a uniquely named proxy.
message Named {
Module module = 1;
string event = 2;
repeated Argument args = 3;
}
// Emit an event on a numbered proxy.
message Numbered {
uint64 proxy_id = 1;
string event = 2;
repeated Argument args = 3;
}
oneof msg {
Event.Named named_event = 1;
Event.Numbered numbered_event = 2;
}
}
message Ping {}
message Pong {}