-
Notifications
You must be signed in to change notification settings - Fork 5
/
rpcstream.pb.ts
111 lines (98 loc) · 3.03 KB
/
rpcstream.pb.ts
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
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/aperturerobotics/starpc/rpcstream/rpcstream.proto (package rpcstream, syntax proto3)
/* eslint-disable */
import type { MessageType, PartialFieldInfo } from "@aptre/protobuf-es-lite";
import { createMessageType, ScalarType } from "@aptre/protobuf-es-lite";
export const protobufPackage = "rpcstream";
/**
* RpcStreamInit is the first message in a RPC stream.
*
* @generated from message rpcstream.RpcStreamInit
*/
export interface RpcStreamInit {
/**
* ComponentId is the identifier of the component making the request.
*
* @generated from field: string component_id = 1;
*/
componentId?: string;
};
// RpcStreamInit contains the message type declaration for RpcStreamInit.
export const RpcStreamInit: MessageType<RpcStreamInit> = createMessageType({
typeName: "rpcstream.RpcStreamInit",
fields: [
{ no: 1, name: "component_id", kind: "scalar", T: ScalarType.STRING },
] as readonly PartialFieldInfo[],
packedByDefault: true,
});
/**
* RpcAck is the ack message in a RPC stream.
*
* @generated from message rpcstream.RpcAck
*/
export interface RpcAck {
/**
* Error indicates there was some error setting up the stream.
*
* @generated from field: string error = 1;
*/
error?: string;
};
// RpcAck contains the message type declaration for RpcAck.
export const RpcAck: MessageType<RpcAck> = createMessageType({
typeName: "rpcstream.RpcAck",
fields: [
{ no: 1, name: "error", kind: "scalar", T: ScalarType.STRING },
] as readonly PartialFieldInfo[],
packedByDefault: true,
});
/**
* RpcStreamPacket is a packet encapsulating data for a RPC stream.
*
* @generated from message rpcstream.RpcStreamPacket
*/
export interface RpcStreamPacket {
/**
* @generated from oneof rpcstream.RpcStreamPacket.body
*/
body?: {
value?: undefined,
case: undefined
} | {
/**
* Init is the first packet in the stream.
* Sent by the initiator.
*
* @generated from field: rpcstream.RpcStreamInit init = 1;
*/
value: RpcStreamInit;
case: "init";
} | {
/**
* Ack is sent in response to Init.
* Sent by the server.
*
* @generated from field: rpcstream.RpcAck ack = 2;
*/
value: RpcAck;
case: "ack";
} | {
/**
* Data is the encapsulated data packet.
*
* @generated from field: bytes data = 3;
*/
value: Uint8Array;
case: "data";
};
};
// RpcStreamPacket contains the message type declaration for RpcStreamPacket.
export const RpcStreamPacket: MessageType<RpcStreamPacket> = createMessageType({
typeName: "rpcstream.RpcStreamPacket",
fields: [
{ no: 1, name: "init", kind: "message", T: () => RpcStreamInit, oneof: "body" },
{ no: 2, name: "ack", kind: "message", T: () => RpcAck, oneof: "body" },
{ no: 3, name: "data", kind: "scalar", T: ScalarType.BYTES, oneof: "body" },
] as readonly PartialFieldInfo[],
packedByDefault: true,
});