starpc 0.18.1 → 0.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/e2e/mock/mock.pb.js +10 -6
- package/dist/echo/echo.pb.js +11 -7
- package/dist/rpcstream/rpcstream.pb.js +45 -25
- package/dist/srpc/rpcproto.pb.js +69 -31
- package/e2e/mock/mock.pb.go +1 -1
- package/e2e/mock/mock.pb.ts +12 -6
- package/e2e/mock/mock_srpc.pb.go +1 -1
- package/e2e/mock/mock_vtproto.pb.go +13 -5
- package/echo/echo.pb.go +1 -1
- package/echo/echo.pb.ts +13 -7
- package/echo/echo_srpc.pb.go +1 -1
- package/echo/echo_vtproto.pb.go +13 -5
- package/go.mod +11 -13
- package/go.sum +13 -45
- package/package.json +16 -16
- package/srpc/rpcproto.pb.go +1 -1
- package/srpc/rpcproto.pb.ts +89 -34
- package/srpc/rpcproto_vtproto.pb.go +35 -13
package/dist/e2e/mock/mock.pb.js
CHANGED
|
@@ -13,19 +13,23 @@ export const MockMsg = {
|
|
|
13
13
|
return writer;
|
|
14
14
|
},
|
|
15
15
|
decode(input, length) {
|
|
16
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
16
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
17
17
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
18
18
|
const message = createBaseMockMsg();
|
|
19
19
|
while (reader.pos < end) {
|
|
20
20
|
const tag = reader.uint32();
|
|
21
21
|
switch (tag >>> 3) {
|
|
22
22
|
case 1:
|
|
23
|
+
if (tag != 10) {
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
23
26
|
message.body = reader.string();
|
|
24
|
-
|
|
25
|
-
default:
|
|
26
|
-
reader.skipType(tag & 7);
|
|
27
|
-
break;
|
|
27
|
+
continue;
|
|
28
28
|
}
|
|
29
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
reader.skipType(tag & 7);
|
|
29
33
|
}
|
|
30
34
|
return message;
|
|
31
35
|
},
|
|
@@ -83,7 +87,7 @@ export class MockClientImpl {
|
|
|
83
87
|
MockRequest(request, abortSignal) {
|
|
84
88
|
const data = MockMsg.encode(request).finish();
|
|
85
89
|
const promise = this.rpc.request(this.service, 'MockRequest', data, abortSignal || undefined);
|
|
86
|
-
return promise.then((data) => MockMsg.decode(
|
|
90
|
+
return promise.then((data) => MockMsg.decode(_m0.Reader.create(data)));
|
|
87
91
|
}
|
|
88
92
|
}
|
|
89
93
|
export const MockDefinition = {
|
package/dist/echo/echo.pb.js
CHANGED
|
@@ -14,19 +14,23 @@ export const EchoMsg = {
|
|
|
14
14
|
return writer;
|
|
15
15
|
},
|
|
16
16
|
decode(input, length) {
|
|
17
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
17
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
18
18
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
19
19
|
const message = createBaseEchoMsg();
|
|
20
20
|
while (reader.pos < end) {
|
|
21
21
|
const tag = reader.uint32();
|
|
22
22
|
switch (tag >>> 3) {
|
|
23
23
|
case 1:
|
|
24
|
+
if (tag != 10) {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
24
27
|
message.body = reader.string();
|
|
25
|
-
|
|
26
|
-
default:
|
|
27
|
-
reader.skipType(tag & 7);
|
|
28
|
-
break;
|
|
28
|
+
continue;
|
|
29
29
|
}
|
|
30
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
reader.skipType(tag & 7);
|
|
30
34
|
}
|
|
31
35
|
return message;
|
|
32
36
|
},
|
|
@@ -88,7 +92,7 @@ export class EchoerClientImpl {
|
|
|
88
92
|
Echo(request, abortSignal) {
|
|
89
93
|
const data = EchoMsg.encode(request).finish();
|
|
90
94
|
const promise = this.rpc.request(this.service, 'Echo', data, abortSignal || undefined);
|
|
91
|
-
return promise.then((data) => EchoMsg.decode(
|
|
95
|
+
return promise.then((data) => EchoMsg.decode(_m0.Reader.create(data)));
|
|
92
96
|
}
|
|
93
97
|
EchoServerStream(request, abortSignal) {
|
|
94
98
|
const data = EchoMsg.encode(request).finish();
|
|
@@ -98,7 +102,7 @@ export class EchoerClientImpl {
|
|
|
98
102
|
EchoClientStream(request, abortSignal) {
|
|
99
103
|
const data = EchoMsg.encodeTransform(request);
|
|
100
104
|
const promise = this.rpc.clientStreamingRequest(this.service, 'EchoClientStream', data, abortSignal || undefined);
|
|
101
|
-
return promise.then((data) => EchoMsg.decode(
|
|
105
|
+
return promise.then((data) => EchoMsg.decode(_m0.Reader.create(data)));
|
|
102
106
|
}
|
|
103
107
|
EchoBidiStream(request, abortSignal) {
|
|
104
108
|
const data = EchoMsg.encodeTransform(request);
|
|
@@ -7,43 +7,55 @@ function createBaseRpcStreamPacket() {
|
|
|
7
7
|
}
|
|
8
8
|
export const RpcStreamPacket = {
|
|
9
9
|
encode(message, writer = _m0.Writer.create()) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
switch (message.body?.$case) {
|
|
11
|
+
case 'init':
|
|
12
|
+
RpcStreamInit.encode(message.body.init, writer.uint32(10).fork()).ldelim();
|
|
13
|
+
break;
|
|
14
|
+
case 'ack':
|
|
15
|
+
RpcAck.encode(message.body.ack, writer.uint32(18).fork()).ldelim();
|
|
16
|
+
break;
|
|
17
|
+
case 'data':
|
|
18
|
+
writer.uint32(26).bytes(message.body.data);
|
|
19
|
+
break;
|
|
18
20
|
}
|
|
19
21
|
return writer;
|
|
20
22
|
},
|
|
21
23
|
decode(input, length) {
|
|
22
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
24
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
23
25
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
24
26
|
const message = createBaseRpcStreamPacket();
|
|
25
27
|
while (reader.pos < end) {
|
|
26
28
|
const tag = reader.uint32();
|
|
27
29
|
switch (tag >>> 3) {
|
|
28
30
|
case 1:
|
|
31
|
+
if (tag != 10) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
29
34
|
message.body = {
|
|
30
35
|
$case: 'init',
|
|
31
36
|
init: RpcStreamInit.decode(reader, reader.uint32()),
|
|
32
37
|
};
|
|
33
|
-
|
|
38
|
+
continue;
|
|
34
39
|
case 2:
|
|
40
|
+
if (tag != 18) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
35
43
|
message.body = {
|
|
36
44
|
$case: 'ack',
|
|
37
45
|
ack: RpcAck.decode(reader, reader.uint32()),
|
|
38
46
|
};
|
|
39
|
-
|
|
47
|
+
continue;
|
|
40
48
|
case 3:
|
|
49
|
+
if (tag != 26) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
41
52
|
message.body = { $case: 'data', data: reader.bytes() };
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
56
|
+
break;
|
|
46
57
|
}
|
|
58
|
+
reader.skipType(tag & 7);
|
|
47
59
|
}
|
|
48
60
|
return message;
|
|
49
61
|
},
|
|
@@ -140,19 +152,23 @@ export const RpcStreamInit = {
|
|
|
140
152
|
return writer;
|
|
141
153
|
},
|
|
142
154
|
decode(input, length) {
|
|
143
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
155
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
144
156
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
145
157
|
const message = createBaseRpcStreamInit();
|
|
146
158
|
while (reader.pos < end) {
|
|
147
159
|
const tag = reader.uint32();
|
|
148
160
|
switch (tag >>> 3) {
|
|
149
161
|
case 1:
|
|
162
|
+
if (tag != 10) {
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
150
165
|
message.componentId = reader.string();
|
|
151
|
-
|
|
152
|
-
default:
|
|
153
|
-
reader.skipType(tag & 7);
|
|
154
|
-
break;
|
|
166
|
+
continue;
|
|
155
167
|
}
|
|
168
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
reader.skipType(tag & 7);
|
|
156
172
|
}
|
|
157
173
|
return message;
|
|
158
174
|
},
|
|
@@ -214,19 +230,23 @@ export const RpcAck = {
|
|
|
214
230
|
return writer;
|
|
215
231
|
},
|
|
216
232
|
decode(input, length) {
|
|
217
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
233
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
218
234
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
219
235
|
const message = createBaseRpcAck();
|
|
220
236
|
while (reader.pos < end) {
|
|
221
237
|
const tag = reader.uint32();
|
|
222
238
|
switch (tag >>> 3) {
|
|
223
239
|
case 1:
|
|
240
|
+
if (tag != 10) {
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
224
243
|
message.error = reader.string();
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
247
|
+
break;
|
|
229
248
|
}
|
|
249
|
+
reader.skipType(tag & 7);
|
|
230
250
|
}
|
|
231
251
|
return message;
|
|
232
252
|
},
|
package/dist/srpc/rpcproto.pb.js
CHANGED
|
@@ -7,43 +7,55 @@ function createBasePacket() {
|
|
|
7
7
|
}
|
|
8
8
|
export const Packet = {
|
|
9
9
|
encode(message, writer = _m0.Writer.create()) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
switch (message.body?.$case) {
|
|
11
|
+
case 'callStart':
|
|
12
|
+
CallStart.encode(message.body.callStart, writer.uint32(10).fork()).ldelim();
|
|
13
|
+
break;
|
|
14
|
+
case 'callData':
|
|
15
|
+
CallData.encode(message.body.callData, writer.uint32(18).fork()).ldelim();
|
|
16
|
+
break;
|
|
17
|
+
case 'callCancel':
|
|
18
|
+
writer.uint32(24).bool(message.body.callCancel);
|
|
19
|
+
break;
|
|
18
20
|
}
|
|
19
21
|
return writer;
|
|
20
22
|
},
|
|
21
23
|
decode(input, length) {
|
|
22
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
24
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
23
25
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
24
26
|
const message = createBasePacket();
|
|
25
27
|
while (reader.pos < end) {
|
|
26
28
|
const tag = reader.uint32();
|
|
27
29
|
switch (tag >>> 3) {
|
|
28
30
|
case 1:
|
|
31
|
+
if (tag != 10) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
29
34
|
message.body = {
|
|
30
35
|
$case: 'callStart',
|
|
31
36
|
callStart: CallStart.decode(reader, reader.uint32()),
|
|
32
37
|
};
|
|
33
|
-
|
|
38
|
+
continue;
|
|
34
39
|
case 2:
|
|
40
|
+
if (tag != 18) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
35
43
|
message.body = {
|
|
36
44
|
$case: 'callData',
|
|
37
45
|
callData: CallData.decode(reader, reader.uint32()),
|
|
38
46
|
};
|
|
39
|
-
|
|
47
|
+
continue;
|
|
40
48
|
case 3:
|
|
49
|
+
if (tag != 24) {
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
41
52
|
message.body = { $case: 'callCancel', callCancel: reader.bool() };
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
56
|
+
break;
|
|
46
57
|
}
|
|
58
|
+
reader.skipType(tag & 7);
|
|
47
59
|
}
|
|
48
60
|
return message;
|
|
49
61
|
},
|
|
@@ -157,28 +169,41 @@ export const CallStart = {
|
|
|
157
169
|
return writer;
|
|
158
170
|
},
|
|
159
171
|
decode(input, length) {
|
|
160
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
172
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
161
173
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
162
174
|
const message = createBaseCallStart();
|
|
163
175
|
while (reader.pos < end) {
|
|
164
176
|
const tag = reader.uint32();
|
|
165
177
|
switch (tag >>> 3) {
|
|
166
178
|
case 1:
|
|
179
|
+
if (tag != 10) {
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
167
182
|
message.rpcService = reader.string();
|
|
168
|
-
|
|
183
|
+
continue;
|
|
169
184
|
case 2:
|
|
185
|
+
if (tag != 18) {
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
170
188
|
message.rpcMethod = reader.string();
|
|
171
|
-
|
|
189
|
+
continue;
|
|
172
190
|
case 3:
|
|
191
|
+
if (tag != 26) {
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
173
194
|
message.data = reader.bytes();
|
|
174
|
-
|
|
195
|
+
continue;
|
|
175
196
|
case 4:
|
|
197
|
+
if (tag != 32) {
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
176
200
|
message.dataIsZero = reader.bool();
|
|
177
|
-
|
|
178
|
-
default:
|
|
179
|
-
reader.skipType(tag & 7);
|
|
180
|
-
break;
|
|
201
|
+
continue;
|
|
181
202
|
}
|
|
203
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
reader.skipType(tag & 7);
|
|
182
207
|
}
|
|
183
208
|
return message;
|
|
184
209
|
},
|
|
@@ -266,28 +291,41 @@ export const CallData = {
|
|
|
266
291
|
return writer;
|
|
267
292
|
},
|
|
268
293
|
decode(input, length) {
|
|
269
|
-
const reader = input instanceof _m0.Reader ? input :
|
|
294
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
270
295
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
271
296
|
const message = createBaseCallData();
|
|
272
297
|
while (reader.pos < end) {
|
|
273
298
|
const tag = reader.uint32();
|
|
274
299
|
switch (tag >>> 3) {
|
|
275
300
|
case 1:
|
|
301
|
+
if (tag != 10) {
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
276
304
|
message.data = reader.bytes();
|
|
277
|
-
|
|
305
|
+
continue;
|
|
278
306
|
case 2:
|
|
307
|
+
if (tag != 16) {
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
279
310
|
message.dataIsZero = reader.bool();
|
|
280
|
-
|
|
311
|
+
continue;
|
|
281
312
|
case 3:
|
|
313
|
+
if (tag != 24) {
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
282
316
|
message.complete = reader.bool();
|
|
283
|
-
|
|
317
|
+
continue;
|
|
284
318
|
case 4:
|
|
319
|
+
if (tag != 34) {
|
|
320
|
+
break;
|
|
321
|
+
}
|
|
285
322
|
message.error = reader.string();
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
323
|
+
continue;
|
|
324
|
+
}
|
|
325
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
326
|
+
break;
|
|
290
327
|
}
|
|
328
|
+
reader.skipType(tag & 7);
|
|
291
329
|
}
|
|
292
330
|
return message;
|
|
293
331
|
},
|
package/e2e/mock/mock.pb.go
CHANGED
package/e2e/mock/mock.pb.ts
CHANGED
|
@@ -25,19 +25,25 @@ export const MockMsg = {
|
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
decode(input: _m0.Reader | Uint8Array, length?: number): MockMsg {
|
|
28
|
-
const reader =
|
|
28
|
+
const reader =
|
|
29
|
+
input instanceof _m0.Reader ? input : _m0.Reader.create(input)
|
|
29
30
|
let end = length === undefined ? reader.len : reader.pos + length
|
|
30
31
|
const message = createBaseMockMsg()
|
|
31
32
|
while (reader.pos < end) {
|
|
32
33
|
const tag = reader.uint32()
|
|
33
34
|
switch (tag >>> 3) {
|
|
34
35
|
case 1:
|
|
36
|
+
if (tag != 10) {
|
|
37
|
+
break
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
message.body = reader.string()
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
continue
|
|
42
|
+
}
|
|
43
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
44
|
+
break
|
|
40
45
|
}
|
|
46
|
+
reader.skipType(tag & 7)
|
|
41
47
|
}
|
|
42
48
|
return message
|
|
43
49
|
},
|
|
@@ -119,7 +125,7 @@ export class MockClientImpl implements Mock {
|
|
|
119
125
|
data,
|
|
120
126
|
abortSignal || undefined
|
|
121
127
|
)
|
|
122
|
-
return promise.then((data) => MockMsg.decode(
|
|
128
|
+
return promise.then((data) => MockMsg.decode(_m0.Reader.create(data)))
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
131
|
|
package/e2e/mock/mock_srpc.pb.go
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
|
|
2
|
-
// protoc-gen-go-vtproto version: v0.
|
|
2
|
+
// protoc-gen-go-vtproto version: v0.4.0
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/e2e/mock/mock.proto
|
|
4
4
|
|
|
5
5
|
package e2e_mock
|
|
@@ -34,14 +34,14 @@ func (m *MockMsg) CloneVT() *MockMsg {
|
|
|
34
34
|
return r
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
func (m *MockMsg)
|
|
37
|
+
func (m *MockMsg) CloneMessageVT() proto.Message {
|
|
38
38
|
return m.CloneVT()
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
func (this *MockMsg) EqualVT(that *MockMsg) bool {
|
|
42
|
-
if this ==
|
|
43
|
-
return
|
|
44
|
-
} else if that == nil {
|
|
42
|
+
if this == that {
|
|
43
|
+
return true
|
|
44
|
+
} else if this == nil || that == nil {
|
|
45
45
|
return false
|
|
46
46
|
}
|
|
47
47
|
if this.Body != that.Body {
|
|
@@ -50,6 +50,13 @@ func (this *MockMsg) EqualVT(that *MockMsg) bool {
|
|
|
50
50
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
func (this *MockMsg) EqualMessageVT(thatMsg proto.Message) bool {
|
|
54
|
+
that, ok := thatMsg.(*MockMsg)
|
|
55
|
+
if !ok {
|
|
56
|
+
return false
|
|
57
|
+
}
|
|
58
|
+
return this.EqualVT(that)
|
|
59
|
+
}
|
|
53
60
|
func (m *MockMsg) MarshalVT() (dAtA []byte, err error) {
|
|
54
61
|
if m == nil {
|
|
55
62
|
return nil, nil
|
|
@@ -204,6 +211,7 @@ func (m *MockMsg) UnmarshalVT(dAtA []byte) error {
|
|
|
204
211
|
}
|
|
205
212
|
return nil
|
|
206
213
|
}
|
|
214
|
+
|
|
207
215
|
func skip(dAtA []byte) (n int, err error) {
|
|
208
216
|
l := len(dAtA)
|
|
209
217
|
iNdEx := 0
|
package/echo/echo.pb.go
CHANGED
package/echo/echo.pb.ts
CHANGED
|
@@ -26,19 +26,25 @@ export const EchoMsg = {
|
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
decode(input: _m0.Reader | Uint8Array, length?: number): EchoMsg {
|
|
29
|
-
const reader =
|
|
29
|
+
const reader =
|
|
30
|
+
input instanceof _m0.Reader ? input : _m0.Reader.create(input)
|
|
30
31
|
let end = length === undefined ? reader.len : reader.pos + length
|
|
31
32
|
const message = createBaseEchoMsg()
|
|
32
33
|
while (reader.pos < end) {
|
|
33
34
|
const tag = reader.uint32()
|
|
34
35
|
switch (tag >>> 3) {
|
|
35
36
|
case 1:
|
|
37
|
+
if (tag != 10) {
|
|
38
|
+
break
|
|
39
|
+
}
|
|
40
|
+
|
|
36
41
|
message.body = reader.string()
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
continue
|
|
43
|
+
}
|
|
44
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
45
|
+
break
|
|
41
46
|
}
|
|
47
|
+
reader.skipType(tag & 7)
|
|
42
48
|
}
|
|
43
49
|
return message
|
|
44
50
|
},
|
|
@@ -144,7 +150,7 @@ export class EchoerClientImpl implements Echoer {
|
|
|
144
150
|
data,
|
|
145
151
|
abortSignal || undefined
|
|
146
152
|
)
|
|
147
|
-
return promise.then((data) => EchoMsg.decode(
|
|
153
|
+
return promise.then((data) => EchoMsg.decode(_m0.Reader.create(data)))
|
|
148
154
|
}
|
|
149
155
|
|
|
150
156
|
EchoServerStream(
|
|
@@ -172,7 +178,7 @@ export class EchoerClientImpl implements Echoer {
|
|
|
172
178
|
data,
|
|
173
179
|
abortSignal || undefined
|
|
174
180
|
)
|
|
175
|
-
return promise.then((data) => EchoMsg.decode(
|
|
181
|
+
return promise.then((data) => EchoMsg.decode(_m0.Reader.create(data)))
|
|
176
182
|
}
|
|
177
183
|
|
|
178
184
|
EchoBidiStream(
|
package/echo/echo_srpc.pb.go
CHANGED
package/echo/echo_vtproto.pb.go
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
|
|
2
|
-
// protoc-gen-go-vtproto version: v0.
|
|
2
|
+
// protoc-gen-go-vtproto version: v0.4.0
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/echo/echo.proto
|
|
4
4
|
|
|
5
5
|
package echo
|
|
@@ -34,14 +34,14 @@ func (m *EchoMsg) CloneVT() *EchoMsg {
|
|
|
34
34
|
return r
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
func (m *EchoMsg)
|
|
37
|
+
func (m *EchoMsg) CloneMessageVT() proto.Message {
|
|
38
38
|
return m.CloneVT()
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
func (this *EchoMsg) EqualVT(that *EchoMsg) bool {
|
|
42
|
-
if this ==
|
|
43
|
-
return
|
|
44
|
-
} else if that == nil {
|
|
42
|
+
if this == that {
|
|
43
|
+
return true
|
|
44
|
+
} else if this == nil || that == nil {
|
|
45
45
|
return false
|
|
46
46
|
}
|
|
47
47
|
if this.Body != that.Body {
|
|
@@ -50,6 +50,13 @@ func (this *EchoMsg) EqualVT(that *EchoMsg) bool {
|
|
|
50
50
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
func (this *EchoMsg) EqualMessageVT(thatMsg proto.Message) bool {
|
|
54
|
+
that, ok := thatMsg.(*EchoMsg)
|
|
55
|
+
if !ok {
|
|
56
|
+
return false
|
|
57
|
+
}
|
|
58
|
+
return this.EqualVT(that)
|
|
59
|
+
}
|
|
53
60
|
func (m *EchoMsg) MarshalVT() (dAtA []byte, err error) {
|
|
54
61
|
if m == nil {
|
|
55
62
|
return nil, nil
|
|
@@ -204,6 +211,7 @@ func (m *EchoMsg) UnmarshalVT(dAtA []byte) error {
|
|
|
204
211
|
}
|
|
205
212
|
return nil
|
|
206
213
|
}
|
|
214
|
+
|
|
207
215
|
func skip(dAtA []byte) (n int, err error) {
|
|
208
216
|
l := len(dAtA)
|
|
209
217
|
iNdEx := 0
|
package/go.mod
CHANGED
|
@@ -3,27 +3,24 @@ module github.com/aperturerobotics/starpc
|
|
|
3
3
|
go 1.18
|
|
4
4
|
|
|
5
5
|
require (
|
|
6
|
-
github.com/pkg/errors v0.9.1
|
|
7
|
-
google.golang.org/protobuf v1.
|
|
8
|
-
nhooyr.io/websocket v1.8.8-0.20221213223501-14fb98eba64e
|
|
6
|
+
github.com/pkg/errors v0.9.1 // latest
|
|
7
|
+
google.golang.org/protobuf v1.30.0 // latest
|
|
8
|
+
nhooyr.io/websocket v1.8.8-0.20221213223501-14fb98eba64e // master
|
|
9
9
|
)
|
|
10
10
|
|
|
11
11
|
require (
|
|
12
|
-
github.com/aperturerobotics/util v1.0.
|
|
13
|
-
github.com/libp2p/go-libp2p v0.
|
|
14
|
-
github.com/libp2p/go-yamux/v4 v4.0.1-0.20220919134236-1c09f2ab3ec1
|
|
15
|
-
github.com/sirupsen/logrus v1.9.0
|
|
12
|
+
github.com/aperturerobotics/util v1.0.6-0.20230313071030-6260e05b62e5 // latest
|
|
13
|
+
github.com/libp2p/go-libp2p v0.26.3 // latest
|
|
14
|
+
github.com/libp2p/go-yamux/v4 v4.0.1-0.20220919134236-1c09f2ab3ec1 // master
|
|
15
|
+
github.com/sirupsen/logrus v1.9.0 // latest
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
require (
|
|
19
19
|
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
|
|
20
|
-
github.com/gogo/protobuf v1.3.2 // indirect
|
|
21
20
|
github.com/ipfs/go-cid v0.3.2 // indirect
|
|
22
21
|
github.com/klauspost/compress v1.15.12 // indirect
|
|
23
22
|
github.com/klauspost/cpuid/v2 v2.2.1 // indirect
|
|
24
23
|
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
|
25
|
-
github.com/libp2p/go-openssl v0.1.0 // indirect
|
|
26
|
-
github.com/mattn/go-pointer v0.0.1 // indirect
|
|
27
24
|
github.com/minio/sha256-simd v1.0.0 // indirect
|
|
28
25
|
github.com/mr-tron/base58 v1.2.0 // indirect
|
|
29
26
|
github.com/multiformats/go-base32 v0.1.0 // indirect
|
|
@@ -32,10 +29,11 @@ require (
|
|
|
32
29
|
github.com/multiformats/go-multibase v0.1.1 // indirect
|
|
33
30
|
github.com/multiformats/go-multicodec v0.7.0 // indirect
|
|
34
31
|
github.com/multiformats/go-multihash v0.2.1 // indirect
|
|
32
|
+
github.com/multiformats/go-multistream v0.4.1 // indirect
|
|
35
33
|
github.com/multiformats/go-varint v0.0.7 // indirect
|
|
36
|
-
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
|
|
37
34
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
|
38
|
-
golang.org/x/crypto v0.
|
|
39
|
-
golang.org/x/sys v0.
|
|
35
|
+
golang.org/x/crypto v0.4.0 // indirect
|
|
36
|
+
golang.org/x/sys v0.4.1-0.20230131160137-e7d7f63158de // indirect
|
|
37
|
+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
|
40
38
|
lukechampine.com/blake3 v1.1.7 // indirect
|
|
41
39
|
)
|
package/go.sum
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
github.com/aperturerobotics/util v1.0.
|
|
2
|
-
github.com/aperturerobotics/util v1.0.
|
|
1
|
+
github.com/aperturerobotics/util v1.0.6-0.20230313071030-6260e05b62e5 h1:SVQsecow4oFN4ra6SURikAJROdvSYY2lI0vujic5veU=
|
|
2
|
+
github.com/aperturerobotics/util v1.0.6-0.20230313071030-6260e05b62e5/go.mod h1:45zfYCir2T5/KE+O9CyYdZPrsXZtOEAuA4UU79rRMN4=
|
|
3
3
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
4
4
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
|
5
5
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
@@ -23,8 +23,6 @@ github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
|
|
|
23
23
|
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
|
24
24
|
github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
|
|
25
25
|
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
|
26
|
-
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
|
27
|
-
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
|
28
26
|
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
|
|
29
27
|
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
|
|
30
28
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
|
@@ -33,14 +31,12 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
|
|
|
33
31
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
34
32
|
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
|
|
35
33
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
|
34
|
+
github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
|
|
36
35
|
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
|
37
|
-
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
|
38
36
|
github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc=
|
|
39
37
|
github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw=
|
|
40
38
|
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
|
|
41
39
|
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
42
|
-
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
|
43
|
-
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
|
44
40
|
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
|
45
41
|
github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM=
|
|
46
42
|
github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
|
|
@@ -52,17 +48,13 @@ github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
|
|
52
48
|
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
|
53
49
|
github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
|
|
54
50
|
github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg=
|
|
55
|
-
github.com/libp2p/go-libp2p v0.
|
|
56
|
-
github.com/libp2p/go-libp2p v0.
|
|
51
|
+
github.com/libp2p/go-libp2p v0.26.3 h1:6g/psubqwdaBqNNoidbRKSTBEYgaOuKBhHl8Q5tO+PM=
|
|
52
|
+
github.com/libp2p/go-libp2p v0.26.3/go.mod h1:x75BN32YbwuY0Awm2Uix4d4KOz+/4piInkp4Wr3yOo8=
|
|
57
53
|
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
|
|
58
|
-
github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo=
|
|
59
|
-
github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc=
|
|
60
54
|
github.com/libp2p/go-yamux/v4 v4.0.1-0.20220919134236-1c09f2ab3ec1 h1:fxyHejZvFIBqlznQDuHUkw9BThYKyoT3DclP/C2g8Wc=
|
|
61
55
|
github.com/libp2p/go-yamux/v4 v4.0.1-0.20220919134236-1c09f2ab3ec1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4=
|
|
62
56
|
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
|
63
57
|
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
|
|
64
|
-
github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
|
|
65
|
-
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
|
|
66
58
|
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
|
|
67
59
|
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
|
68
60
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
|
@@ -83,6 +75,8 @@ github.com/multiformats/go-multicodec v0.7.0 h1:rTUjGOwjlhGHbEMbPoSUJowG1spZTVsI
|
|
|
83
75
|
github.com/multiformats/go-multicodec v0.7.0/go.mod h1:GUC8upxSBE4oG+q3kWZRw/+6yC1BqO550bjhWsJbZlw=
|
|
84
76
|
github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108=
|
|
85
77
|
github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc=
|
|
78
|
+
github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo=
|
|
79
|
+
github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q=
|
|
86
80
|
github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8=
|
|
87
81
|
github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU=
|
|
88
82
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
|
@@ -91,8 +85,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|
|
91
85
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
92
86
|
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
|
93
87
|
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
|
94
|
-
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
|
|
95
|
-
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
|
|
96
88
|
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
|
|
97
89
|
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
|
|
98
90
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
@@ -104,46 +96,22 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
|
|
|
104
96
|
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
|
105
97
|
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
|
106
98
|
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
|
110
|
-
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
111
|
-
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
112
|
-
golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
|
|
113
|
-
golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
|
|
114
|
-
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
115
|
-
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
116
|
-
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
117
|
-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
118
|
-
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
119
|
-
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
120
|
-
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
121
|
-
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
122
|
-
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
123
|
-
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
124
|
-
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
99
|
+
golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
|
|
100
|
+
golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
|
|
125
101
|
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
126
|
-
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
127
102
|
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
128
103
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
129
|
-
golang.org/x/sys v0.
|
|
130
|
-
golang.org/x/sys v0.
|
|
131
|
-
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
104
|
+
golang.org/x/sys v0.4.1-0.20230131160137-e7d7f63158de h1:VO/n/VqVQnSnxYKbExOquQRm9FLLepZKkpYyXf1+6l8=
|
|
105
|
+
golang.org/x/sys v0.4.1-0.20230131160137-e7d7f63158de/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
132
106
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|
133
|
-
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
134
107
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
|
135
108
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
136
|
-
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
137
|
-
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
|
138
|
-
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
139
|
-
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
140
|
-
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
141
109
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
142
110
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
|
143
111
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
144
112
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
|
145
|
-
google.golang.org/protobuf v1.
|
|
146
|
-
google.golang.org/protobuf v1.
|
|
113
|
+
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
|
|
114
|
+
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
|
147
115
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
148
116
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
149
117
|
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starpc",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "Streaming protobuf RPC service protocol over any two-way channel.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -60,28 +60,28 @@
|
|
|
60
60
|
"singleQuote": true
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@aperturerobotics/ts-common": "^0.3.
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
65
|
-
"@typescript-eslint/parser": "^5.
|
|
63
|
+
"@aperturerobotics/ts-common": "^0.3.4",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^5.56.0",
|
|
65
|
+
"@typescript-eslint/parser": "^5.56.0",
|
|
66
66
|
"bufferutil": "^4.0.7",
|
|
67
67
|
"depcheck": "^1.4.3",
|
|
68
|
-
"esbuild": "^0.17.
|
|
69
|
-
"eslint": "^8.
|
|
70
|
-
"eslint-config-prettier": "^8.
|
|
71
|
-
"prettier": "^2.8.
|
|
72
|
-
"rimraf": "^4.
|
|
73
|
-
"ts-proto": "^1.
|
|
74
|
-
"typescript": "^
|
|
75
|
-
"utf-8-validate": "^6.0.
|
|
68
|
+
"esbuild": "^0.17.12",
|
|
69
|
+
"eslint": "^8.36.0",
|
|
70
|
+
"eslint-config-prettier": "^8.8.0",
|
|
71
|
+
"prettier": "^2.8.5",
|
|
72
|
+
"rimraf": "^4.4.0",
|
|
73
|
+
"ts-proto": "^1.143.0",
|
|
74
|
+
"typescript": "^5.0.2",
|
|
75
|
+
"utf-8-validate": "^6.0.3"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@chainsafe/libp2p-yamux": "^3.0.
|
|
79
|
-
"@libp2p/interface-connection": "^3.
|
|
78
|
+
"@chainsafe/libp2p-yamux": "^3.0.7",
|
|
79
|
+
"@libp2p/interface-connection": "^3.1.1",
|
|
80
80
|
"@libp2p/interface-stream-muxer": "^3.0.4",
|
|
81
81
|
"event-iterator": "^2.0.0",
|
|
82
82
|
"is-promise": "^4.0.0",
|
|
83
83
|
"isomorphic-ws": "^5.0.0",
|
|
84
|
-
"it-first": "^2.0.
|
|
84
|
+
"it-first": "^2.0.1",
|
|
85
85
|
"it-length-prefixed": "^8.0.4",
|
|
86
86
|
"it-pipe": "^2.0.5",
|
|
87
87
|
"it-pushable": "^3.1.2",
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
"patch-package": "^6.5.1",
|
|
93
93
|
"protobufjs": "^7.1.2",
|
|
94
94
|
"uint8arraylist": "^2.4.3",
|
|
95
|
-
"ws": "^8.
|
|
95
|
+
"ws": "^8.13.0"
|
|
96
96
|
}
|
|
97
97
|
}
|
package/srpc/rpcproto.pb.go
CHANGED
package/srpc/rpcproto.pb.ts
CHANGED
|
@@ -60,47 +60,66 @@ export const Packet = {
|
|
|
60
60
|
message: Packet,
|
|
61
61
|
writer: _m0.Writer = _m0.Writer.create()
|
|
62
62
|
): _m0.Writer {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
63
|
+
switch (message.body?.$case) {
|
|
64
|
+
case 'callStart':
|
|
65
|
+
CallStart.encode(
|
|
66
|
+
message.body.callStart,
|
|
67
|
+
writer.uint32(10).fork()
|
|
68
|
+
).ldelim()
|
|
69
|
+
break
|
|
70
|
+
case 'callData':
|
|
71
|
+
CallData.encode(
|
|
72
|
+
message.body.callData,
|
|
73
|
+
writer.uint32(18).fork()
|
|
74
|
+
).ldelim()
|
|
75
|
+
break
|
|
76
|
+
case 'callCancel':
|
|
77
|
+
writer.uint32(24).bool(message.body.callCancel)
|
|
78
|
+
break
|
|
74
79
|
}
|
|
75
80
|
return writer
|
|
76
81
|
},
|
|
77
82
|
|
|
78
83
|
decode(input: _m0.Reader | Uint8Array, length?: number): Packet {
|
|
79
|
-
const reader =
|
|
84
|
+
const reader =
|
|
85
|
+
input instanceof _m0.Reader ? input : _m0.Reader.create(input)
|
|
80
86
|
let end = length === undefined ? reader.len : reader.pos + length
|
|
81
87
|
const message = createBasePacket()
|
|
82
88
|
while (reader.pos < end) {
|
|
83
89
|
const tag = reader.uint32()
|
|
84
90
|
switch (tag >>> 3) {
|
|
85
91
|
case 1:
|
|
92
|
+
if (tag != 10) {
|
|
93
|
+
break
|
|
94
|
+
}
|
|
95
|
+
|
|
86
96
|
message.body = {
|
|
87
97
|
$case: 'callStart',
|
|
88
98
|
callStart: CallStart.decode(reader, reader.uint32()),
|
|
89
99
|
}
|
|
90
|
-
|
|
100
|
+
continue
|
|
91
101
|
case 2:
|
|
102
|
+
if (tag != 18) {
|
|
103
|
+
break
|
|
104
|
+
}
|
|
105
|
+
|
|
92
106
|
message.body = {
|
|
93
107
|
$case: 'callData',
|
|
94
108
|
callData: CallData.decode(reader, reader.uint32()),
|
|
95
109
|
}
|
|
96
|
-
|
|
110
|
+
continue
|
|
97
111
|
case 3:
|
|
112
|
+
if (tag != 24) {
|
|
113
|
+
break
|
|
114
|
+
}
|
|
115
|
+
|
|
98
116
|
message.body = { $case: 'callCancel', callCancel: reader.bool() }
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
117
|
+
continue
|
|
118
|
+
}
|
|
119
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
120
|
+
break
|
|
103
121
|
}
|
|
122
|
+
reader.skipType(tag & 7)
|
|
104
123
|
}
|
|
105
124
|
return message
|
|
106
125
|
},
|
|
@@ -236,28 +255,46 @@ export const CallStart = {
|
|
|
236
255
|
},
|
|
237
256
|
|
|
238
257
|
decode(input: _m0.Reader | Uint8Array, length?: number): CallStart {
|
|
239
|
-
const reader =
|
|
258
|
+
const reader =
|
|
259
|
+
input instanceof _m0.Reader ? input : _m0.Reader.create(input)
|
|
240
260
|
let end = length === undefined ? reader.len : reader.pos + length
|
|
241
261
|
const message = createBaseCallStart()
|
|
242
262
|
while (reader.pos < end) {
|
|
243
263
|
const tag = reader.uint32()
|
|
244
264
|
switch (tag >>> 3) {
|
|
245
265
|
case 1:
|
|
266
|
+
if (tag != 10) {
|
|
267
|
+
break
|
|
268
|
+
}
|
|
269
|
+
|
|
246
270
|
message.rpcService = reader.string()
|
|
247
|
-
|
|
271
|
+
continue
|
|
248
272
|
case 2:
|
|
273
|
+
if (tag != 18) {
|
|
274
|
+
break
|
|
275
|
+
}
|
|
276
|
+
|
|
249
277
|
message.rpcMethod = reader.string()
|
|
250
|
-
|
|
278
|
+
continue
|
|
251
279
|
case 3:
|
|
280
|
+
if (tag != 26) {
|
|
281
|
+
break
|
|
282
|
+
}
|
|
283
|
+
|
|
252
284
|
message.data = reader.bytes()
|
|
253
|
-
|
|
285
|
+
continue
|
|
254
286
|
case 4:
|
|
287
|
+
if (tag != 32) {
|
|
288
|
+
break
|
|
289
|
+
}
|
|
290
|
+
|
|
255
291
|
message.dataIsZero = reader.bool()
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
292
|
+
continue
|
|
293
|
+
}
|
|
294
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
295
|
+
break
|
|
260
296
|
}
|
|
297
|
+
reader.skipType(tag & 7)
|
|
261
298
|
}
|
|
262
299
|
return message
|
|
263
300
|
},
|
|
@@ -367,28 +404,46 @@ export const CallData = {
|
|
|
367
404
|
},
|
|
368
405
|
|
|
369
406
|
decode(input: _m0.Reader | Uint8Array, length?: number): CallData {
|
|
370
|
-
const reader =
|
|
407
|
+
const reader =
|
|
408
|
+
input instanceof _m0.Reader ? input : _m0.Reader.create(input)
|
|
371
409
|
let end = length === undefined ? reader.len : reader.pos + length
|
|
372
410
|
const message = createBaseCallData()
|
|
373
411
|
while (reader.pos < end) {
|
|
374
412
|
const tag = reader.uint32()
|
|
375
413
|
switch (tag >>> 3) {
|
|
376
414
|
case 1:
|
|
415
|
+
if (tag != 10) {
|
|
416
|
+
break
|
|
417
|
+
}
|
|
418
|
+
|
|
377
419
|
message.data = reader.bytes()
|
|
378
|
-
|
|
420
|
+
continue
|
|
379
421
|
case 2:
|
|
422
|
+
if (tag != 16) {
|
|
423
|
+
break
|
|
424
|
+
}
|
|
425
|
+
|
|
380
426
|
message.dataIsZero = reader.bool()
|
|
381
|
-
|
|
427
|
+
continue
|
|
382
428
|
case 3:
|
|
429
|
+
if (tag != 24) {
|
|
430
|
+
break
|
|
431
|
+
}
|
|
432
|
+
|
|
383
433
|
message.complete = reader.bool()
|
|
384
|
-
|
|
434
|
+
continue
|
|
385
435
|
case 4:
|
|
436
|
+
if (tag != 34) {
|
|
437
|
+
break
|
|
438
|
+
}
|
|
439
|
+
|
|
386
440
|
message.error = reader.string()
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
441
|
+
continue
|
|
442
|
+
}
|
|
443
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
444
|
+
break
|
|
391
445
|
}
|
|
446
|
+
reader.skipType(tag & 7)
|
|
392
447
|
}
|
|
393
448
|
return message
|
|
394
449
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
|
|
2
|
-
// protoc-gen-go-vtproto version: v0.
|
|
2
|
+
// protoc-gen-go-vtproto version: v0.4.0
|
|
3
3
|
// source: github.com/aperturerobotics/starpc/srpc/rpcproto.proto
|
|
4
4
|
|
|
5
5
|
package srpc
|
|
@@ -35,7 +35,7 @@ func (m *Packet) CloneVT() *Packet {
|
|
|
35
35
|
return r
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
func (m *Packet)
|
|
38
|
+
func (m *Packet) CloneMessageVT() proto.Message {
|
|
39
39
|
return m.CloneVT()
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -90,7 +90,7 @@ func (m *CallStart) CloneVT() *CallStart {
|
|
|
90
90
|
return r
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
func (m *CallStart)
|
|
93
|
+
func (m *CallStart) CloneMessageVT() proto.Message {
|
|
94
94
|
return m.CloneVT()
|
|
95
95
|
}
|
|
96
96
|
|
|
@@ -115,14 +115,14 @@ func (m *CallData) CloneVT() *CallData {
|
|
|
115
115
|
return r
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
func (m *CallData)
|
|
118
|
+
func (m *CallData) CloneMessageVT() proto.Message {
|
|
119
119
|
return m.CloneVT()
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
func (this *Packet) EqualVT(that *Packet) bool {
|
|
123
|
-
if this ==
|
|
124
|
-
return
|
|
125
|
-
} else if that == nil {
|
|
123
|
+
if this == that {
|
|
124
|
+
return true
|
|
125
|
+
} else if this == nil || that == nil {
|
|
126
126
|
return false
|
|
127
127
|
}
|
|
128
128
|
if this.Body == nil && that.Body != nil {
|
|
@@ -138,6 +138,13 @@ func (this *Packet) EqualVT(that *Packet) bool {
|
|
|
138
138
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
func (this *Packet) EqualMessageVT(thatMsg proto.Message) bool {
|
|
142
|
+
that, ok := thatMsg.(*Packet)
|
|
143
|
+
if !ok {
|
|
144
|
+
return false
|
|
145
|
+
}
|
|
146
|
+
return this.EqualVT(that)
|
|
147
|
+
}
|
|
141
148
|
func (this *Packet_CallStart) EqualVT(thatIface isPacket_Body) bool {
|
|
142
149
|
that, ok := thatIface.(*Packet_CallStart)
|
|
143
150
|
if !ok {
|
|
@@ -206,9 +213,9 @@ func (this *Packet_CallCancel) EqualVT(thatIface isPacket_Body) bool {
|
|
|
206
213
|
}
|
|
207
214
|
|
|
208
215
|
func (this *CallStart) EqualVT(that *CallStart) bool {
|
|
209
|
-
if this ==
|
|
210
|
-
return
|
|
211
|
-
} else if that == nil {
|
|
216
|
+
if this == that {
|
|
217
|
+
return true
|
|
218
|
+
} else if this == nil || that == nil {
|
|
212
219
|
return false
|
|
213
220
|
}
|
|
214
221
|
if this.RpcService != that.RpcService {
|
|
@@ -226,10 +233,17 @@ func (this *CallStart) EqualVT(that *CallStart) bool {
|
|
|
226
233
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
227
234
|
}
|
|
228
235
|
|
|
236
|
+
func (this *CallStart) EqualMessageVT(thatMsg proto.Message) bool {
|
|
237
|
+
that, ok := thatMsg.(*CallStart)
|
|
238
|
+
if !ok {
|
|
239
|
+
return false
|
|
240
|
+
}
|
|
241
|
+
return this.EqualVT(that)
|
|
242
|
+
}
|
|
229
243
|
func (this *CallData) EqualVT(that *CallData) bool {
|
|
230
|
-
if this ==
|
|
231
|
-
return
|
|
232
|
-
} else if that == nil {
|
|
244
|
+
if this == that {
|
|
245
|
+
return true
|
|
246
|
+
} else if this == nil || that == nil {
|
|
233
247
|
return false
|
|
234
248
|
}
|
|
235
249
|
if string(this.Data) != string(that.Data) {
|
|
@@ -247,6 +261,13 @@ func (this *CallData) EqualVT(that *CallData) bool {
|
|
|
247
261
|
return string(this.unknownFields) == string(that.unknownFields)
|
|
248
262
|
}
|
|
249
263
|
|
|
264
|
+
func (this *CallData) EqualMessageVT(thatMsg proto.Message) bool {
|
|
265
|
+
that, ok := thatMsg.(*CallData)
|
|
266
|
+
if !ok {
|
|
267
|
+
return false
|
|
268
|
+
}
|
|
269
|
+
return this.EqualVT(that)
|
|
270
|
+
}
|
|
250
271
|
func (m *Packet) MarshalVT() (dAtA []byte, err error) {
|
|
251
272
|
if m == nil {
|
|
252
273
|
return nil, nil
|
|
@@ -1067,6 +1088,7 @@ func (m *CallData) UnmarshalVT(dAtA []byte) error {
|
|
|
1067
1088
|
}
|
|
1068
1089
|
return nil
|
|
1069
1090
|
}
|
|
1091
|
+
|
|
1070
1092
|
func skip(dAtA []byte) (n int, err error) {
|
|
1071
1093
|
l := len(dAtA)
|
|
1072
1094
|
iNdEx := 0
|