starpc 0.18.2 → 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 +3 -3
- package/go.sum +6 -6
- package/package.json +15 -15
- 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
|
@@ -4,13 +4,13 @@ go 1.18
|
|
|
4
4
|
|
|
5
5
|
require (
|
|
6
6
|
github.com/pkg/errors v0.9.1 // latest
|
|
7
|
-
google.golang.org/protobuf v1.
|
|
7
|
+
google.golang.org/protobuf v1.30.0 // latest
|
|
8
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.26.
|
|
12
|
+
github.com/aperturerobotics/util v1.0.6-0.20230313071030-6260e05b62e5 // latest
|
|
13
|
+
github.com/libp2p/go-libp2p v0.26.3 // latest
|
|
14
14
|
github.com/libp2p/go-yamux/v4 v4.0.1-0.20220919134236-1c09f2ab3ec1 // master
|
|
15
15
|
github.com/sirupsen/logrus v1.9.0 // latest
|
|
16
16
|
)
|
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=
|
|
@@ -48,8 +48,8 @@ github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
|
|
|
48
48
|
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
|
|
49
49
|
github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8=
|
|
50
50
|
github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg=
|
|
51
|
-
github.com/libp2p/go-libp2p v0.26.
|
|
52
|
-
github.com/libp2p/go-libp2p v0.26.
|
|
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=
|
|
53
53
|
github.com/libp2p/go-libp2p-testing v0.12.0 h1:EPvBb4kKMWO29qP4mZGyhVzUyR25dvfUIK5WDu6iPUA=
|
|
54
54
|
github.com/libp2p/go-yamux/v4 v4.0.1-0.20220919134236-1c09f2ab3ec1 h1:fxyHejZvFIBqlznQDuHUkw9BThYKyoT3DclP/C2g8Wc=
|
|
55
55
|
github.com/libp2p/go-yamux/v4 v4.0.1-0.20220919134236-1c09f2ab3ec1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5wwmtQP1YB4=
|
|
@@ -110,8 +110,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
|
|
|
110
110
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
|
111
111
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
112
112
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
|
113
|
-
google.golang.org/protobuf v1.
|
|
114
|
-
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=
|
|
115
115
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
116
116
|
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
117
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": "^
|
|
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
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
|