@kronos-ts/kronosdb 0.1.0
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/connection.d.ts +86 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +133 -0
- package/dist/connection.js.map +1 -0
- package/dist/errors.d.ts +72 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +149 -0
- package/dist/errors.js.map +1 -0
- package/dist/event-processor-info.d.ts +32 -0
- package/dist/event-processor-info.d.ts.map +1 -0
- package/dist/event-processor-info.js +24 -0
- package/dist/event-processor-info.js.map +1 -0
- package/dist/flow-controlled-sender.d.ts +12 -0
- package/dist/flow-controlled-sender.d.ts.map +1 -0
- package/dist/flow-controlled-sender.js +53 -0
- package/dist/flow-controlled-sender.js.map +1 -0
- package/dist/generated/command.d.ts +169 -0
- package/dist/generated/command.d.ts.map +1 -0
- package/dist/generated/command.js +964 -0
- package/dist/generated/command.js.map +1 -0
- package/dist/generated/common.d.ts +76 -0
- package/dist/generated/common.d.ts.map +1 -0
- package/dist/generated/common.js +648 -0
- package/dist/generated/common.js.map +1 -0
- package/dist/generated/eventstore.d.ts +337 -0
- package/dist/generated/eventstore.d.ts.map +1 -0
- package/dist/generated/eventstore.js +1757 -0
- package/dist/generated/eventstore.js.map +1 -0
- package/dist/generated/platform.d.ts +242 -0
- package/dist/generated/platform.d.ts.map +1 -0
- package/dist/generated/platform.js +1525 -0
- package/dist/generated/platform.js.map +1 -0
- package/dist/generated/query.d.ts +265 -0
- package/dist/generated/query.d.ts.map +1 -0
- package/dist/generated/query.js +2114 -0
- package/dist/generated/query.js.map +1 -0
- package/dist/generated/snapshot.d.ts +180 -0
- package/dist/generated/snapshot.d.ts.map +1 -0
- package/dist/generated/snapshot.js +861 -0
- package/dist/generated/snapshot.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/kronosdb-event-store.d.ts +17 -0
- package/dist/kronosdb-event-store.d.ts.map +1 -0
- package/dist/kronosdb-event-store.js +328 -0
- package/dist/kronosdb-event-store.js.map +1 -0
- package/dist/kronosdb-snapshot-store.d.ts +10 -0
- package/dist/kronosdb-snapshot-store.d.ts.map +1 -0
- package/dist/kronosdb-snapshot-store.js +79 -0
- package/dist/kronosdb-snapshot-store.js.map +1 -0
- package/dist/kronosdb.d.ts +53 -0
- package/dist/kronosdb.d.ts.map +1 -0
- package/dist/kronosdb.js +852 -0
- package/dist/kronosdb.js.map +1 -0
- package/dist/metadata-conversion.d.ts +37 -0
- package/dist/metadata-conversion.d.ts.map +1 -0
- package/dist/metadata-conversion.js +75 -0
- package/dist/metadata-conversion.js.map +1 -0
- package/dist/outbound-stream.d.ts +15 -0
- package/dist/outbound-stream.d.ts.map +1 -0
- package/dist/outbound-stream.js +39 -0
- package/dist/outbound-stream.js.map +1 -0
- package/dist/platform-service.d.ts +87 -0
- package/dist/platform-service.d.ts.map +1 -0
- package/dist/platform-service.js +218 -0
- package/dist/platform-service.js.map +1 -0
- package/dist/service-definitions.d.ts +187 -0
- package/dist/service-definitions.d.ts.map +1 -0
- package/dist/service-definitions.js +18 -0
- package/dist/service-definitions.js.map +1 -0
- package/dist/shutdown-latch.d.ts +18 -0
- package/dist/shutdown-latch.d.ts.map +1 -0
- package/dist/shutdown-latch.js +51 -0
- package/dist/shutdown-latch.js.map +1 -0
- package/package.json +69 -0
- package/src/connection.ts +235 -0
- package/src/errors.ts +173 -0
- package/src/event-processor-info.ts +53 -0
- package/src/flow-controlled-sender.ts +73 -0
- package/src/generated/command.ts +1226 -0
- package/src/generated/common.ts +770 -0
- package/src/generated/eventstore.ts +2241 -0
- package/src/generated/platform.ts +1914 -0
- package/src/generated/query.ts +2571 -0
- package/src/generated/snapshot.ts +1110 -0
- package/src/index.ts +87 -0
- package/src/kronosdb-event-store.ts +401 -0
- package/src/kronosdb-snapshot-store.ts +104 -0
- package/src/kronosdb.ts +1000 -0
- package/src/metadata-conversion.ts +85 -0
- package/src/outbound-stream.ts +52 -0
- package/src/platform-service.ts +297 -0
- package/src/service-definitions.ts +25 -0
- package/src/shutdown-latch.ts +74 -0
|
@@ -0,0 +1,1914 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.6
|
|
4
|
+
// protoc v3.19.1
|
|
5
|
+
// source: platform.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
+
import { ErrorMessage, InstructionAck } from "./common.js";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "kronosdb.platform";
|
|
13
|
+
|
|
14
|
+
/** Client identification, sent on initial connect. */
|
|
15
|
+
export interface ClientIdentification {
|
|
16
|
+
/** Unique instance identifier (UUID). Distinguishes instances of the same component. */
|
|
17
|
+
clientId: string;
|
|
18
|
+
/** Application/component name (e.g. "OrderService"). Shared across instances. */
|
|
19
|
+
componentName: string;
|
|
20
|
+
/** Client library version. */
|
|
21
|
+
version: string;
|
|
22
|
+
/** Arbitrary tags for routing hints or metadata. */
|
|
23
|
+
tags: { [key: string]: string };
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ClientIdentification_TagsEntry {
|
|
27
|
+
key: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Server information returned after client identification. */
|
|
32
|
+
export interface PlatformInfo {
|
|
33
|
+
/** The node name of this server. */
|
|
34
|
+
nodeName: string;
|
|
35
|
+
/** Server version. */
|
|
36
|
+
version: string;
|
|
37
|
+
/** Available contexts on this server. */
|
|
38
|
+
contexts: string[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Messages sent FROM the client TO the server on the lifecycle stream. */
|
|
42
|
+
export interface PlatformInbound {
|
|
43
|
+
/** Re-identify on stream open (required as first message). */
|
|
44
|
+
register?:
|
|
45
|
+
| ClientIdentification
|
|
46
|
+
| undefined;
|
|
47
|
+
/** Heartbeat response. */
|
|
48
|
+
heartbeat?:
|
|
49
|
+
| Heartbeat
|
|
50
|
+
| undefined;
|
|
51
|
+
/** Acknowledge a server instruction. */
|
|
52
|
+
ack?:
|
|
53
|
+
| InstructionAck
|
|
54
|
+
| undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Event processor status report.
|
|
57
|
+
* Clients periodically send this to report the state of their event processors.
|
|
58
|
+
*/
|
|
59
|
+
eventProcessorInfo?:
|
|
60
|
+
| EventProcessorInfo
|
|
61
|
+
| undefined;
|
|
62
|
+
/** Result of executing a server instruction (e.g. split/merge outcome). */
|
|
63
|
+
result?: InstructionResult | undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Messages sent FROM the server TO the client on the lifecycle stream. */
|
|
67
|
+
export interface PlatformOutbound {
|
|
68
|
+
/** Server node info, sent after registration. */
|
|
69
|
+
nodeNotification?:
|
|
70
|
+
| PlatformInfo
|
|
71
|
+
| undefined;
|
|
72
|
+
/** Heartbeat request — client must respond. */
|
|
73
|
+
heartbeat?:
|
|
74
|
+
| Heartbeat
|
|
75
|
+
| undefined;
|
|
76
|
+
/** Ask the client to reconnect (e.g. for rebalancing). */
|
|
77
|
+
requestReconnect?:
|
|
78
|
+
| RequestReconnect
|
|
79
|
+
| undefined;
|
|
80
|
+
/** Instruction to pause a streaming event processor. */
|
|
81
|
+
pauseEventProcessor?:
|
|
82
|
+
| EventProcessorReference
|
|
83
|
+
| undefined;
|
|
84
|
+
/** Instruction to start a streaming event processor. */
|
|
85
|
+
startEventProcessor?:
|
|
86
|
+
| EventProcessorReference
|
|
87
|
+
| undefined;
|
|
88
|
+
/** Instruction to release a specific segment in a streaming event processor. */
|
|
89
|
+
releaseSegment?:
|
|
90
|
+
| EventProcessorSegmentReference
|
|
91
|
+
| undefined;
|
|
92
|
+
/** Request status information for a specific event processor. */
|
|
93
|
+
requestEventProcessorInfo?:
|
|
94
|
+
| EventProcessorReference
|
|
95
|
+
| undefined;
|
|
96
|
+
/** Instruction to split a segment in a streaming event processor. */
|
|
97
|
+
splitEventProcessorSegment?:
|
|
98
|
+
| EventProcessorSegmentReference
|
|
99
|
+
| undefined;
|
|
100
|
+
/** Instruction to merge two segments in a streaming event processor. */
|
|
101
|
+
mergeEventProcessorSegment?:
|
|
102
|
+
| EventProcessorSegmentReference
|
|
103
|
+
| undefined;
|
|
104
|
+
/** Notification that the handler topology has changed (handlers registered/deregistered). */
|
|
105
|
+
topologyNotification?:
|
|
106
|
+
| TopologyNotification
|
|
107
|
+
| undefined;
|
|
108
|
+
/** If set, the client must acknowledge this instruction. */
|
|
109
|
+
instructionId: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Notification sent to connected platform clients when the handler topology changes. */
|
|
113
|
+
export interface TopologyNotification {
|
|
114
|
+
/** Type of change: "handler_registered" or "handler_deregistered". */
|
|
115
|
+
changeType: string;
|
|
116
|
+
/** The message type (command or query name) affected. */
|
|
117
|
+
messageType: string;
|
|
118
|
+
/** Whether this is a command or query handler. */
|
|
119
|
+
handlerKind: string;
|
|
120
|
+
/** The client that registered/deregistered. */
|
|
121
|
+
clientId: string;
|
|
122
|
+
/** The component name. */
|
|
123
|
+
componentName: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Heartbeat message for liveness detection. */
|
|
127
|
+
export interface Heartbeat {
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** Ask the client to disconnect and reconnect. */
|
|
131
|
+
export interface RequestReconnect {
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Status of an event processor, reported by clients.
|
|
136
|
+
*
|
|
137
|
+
* Matches the Axon Server protocol shape so the connector can map fields directly.
|
|
138
|
+
*/
|
|
139
|
+
export interface EventProcessorInfo {
|
|
140
|
+
/** The logical name of this processor (e.g. "OrderProjection"). */
|
|
141
|
+
processorName: string;
|
|
142
|
+
/** The mode: "Tracking", "Subscribing", "Pooled", etc. */
|
|
143
|
+
mode: string;
|
|
144
|
+
/** Number of threads currently actively processing events. */
|
|
145
|
+
activeThreads: number;
|
|
146
|
+
/** Whether the processor is running. */
|
|
147
|
+
running: boolean;
|
|
148
|
+
/** Whether the processor stopped due to an irrecoverable error. */
|
|
149
|
+
error: boolean;
|
|
150
|
+
/** Per-segment status. Only provided by streaming event processors. */
|
|
151
|
+
segmentStatus: EventProcessorInfo_SegmentStatus[];
|
|
152
|
+
/** Number of threads available to assign to segments. 0 if all assigned. */
|
|
153
|
+
availableThreads: number;
|
|
154
|
+
/**
|
|
155
|
+
* Token store identifier, if available. Distinguishes processors with the
|
|
156
|
+
* same name but different token stores.
|
|
157
|
+
*/
|
|
158
|
+
tokenStoreIdentifier: string;
|
|
159
|
+
/** Whether this is a streaming event processor (supports split/merge). */
|
|
160
|
+
isStreamingProcessor: boolean;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** Status of a single segment within a streaming event processor. */
|
|
164
|
+
export interface EventProcessorInfo_SegmentStatus {
|
|
165
|
+
/** The segment identifier. */
|
|
166
|
+
segmentId: number;
|
|
167
|
+
/** Whether this segment has caught up with the head of the event stream. */
|
|
168
|
+
caughtUp: boolean;
|
|
169
|
+
/** Whether this segment is replaying historic events after a reset. */
|
|
170
|
+
replaying: boolean;
|
|
171
|
+
/** The fraction this segment processes. 2 means 1/2, 4 means 1/4, etc. */
|
|
172
|
+
onePartOf: number;
|
|
173
|
+
/** The approximate position of the tracking token in the stream. */
|
|
174
|
+
tokenPosition: bigint;
|
|
175
|
+
/** Error state description, if the segment is in error. */
|
|
176
|
+
errorState: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** Reference to an event processor by name. Used for instructions. */
|
|
180
|
+
export interface EventProcessorReference {
|
|
181
|
+
processorName: string;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/** Reference to a specific segment of an event processor. Used for instructions. */
|
|
185
|
+
export interface EventProcessorSegmentReference {
|
|
186
|
+
processorName: string;
|
|
187
|
+
segmentIdentifier: number;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Result of executing a server instruction. */
|
|
191
|
+
export interface InstructionResult {
|
|
192
|
+
instructionId: string;
|
|
193
|
+
success: boolean;
|
|
194
|
+
error: ErrorMessage | undefined;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function createBaseClientIdentification(): ClientIdentification {
|
|
198
|
+
return { clientId: "", componentName: "", version: "", tags: {} };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export const ClientIdentification: MessageFns<ClientIdentification> = {
|
|
202
|
+
encode(message: ClientIdentification, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
203
|
+
if (message.clientId !== "") {
|
|
204
|
+
writer.uint32(10).string(message.clientId);
|
|
205
|
+
}
|
|
206
|
+
if (message.componentName !== "") {
|
|
207
|
+
writer.uint32(18).string(message.componentName);
|
|
208
|
+
}
|
|
209
|
+
if (message.version !== "") {
|
|
210
|
+
writer.uint32(26).string(message.version);
|
|
211
|
+
}
|
|
212
|
+
globalThis.Object.entries(message.tags).forEach(([key, value]: [string, string]) => {
|
|
213
|
+
ClientIdentification_TagsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join();
|
|
214
|
+
});
|
|
215
|
+
return writer;
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClientIdentification {
|
|
219
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
220
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
221
|
+
const message = createBaseClientIdentification();
|
|
222
|
+
while (reader.pos < end) {
|
|
223
|
+
const tag = reader.uint32();
|
|
224
|
+
switch (tag >>> 3) {
|
|
225
|
+
case 1: {
|
|
226
|
+
if (tag !== 10) {
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
message.clientId = reader.string();
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
case 2: {
|
|
234
|
+
if (tag !== 18) {
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
message.componentName = reader.string();
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
case 3: {
|
|
242
|
+
if (tag !== 26) {
|
|
243
|
+
break;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
message.version = reader.string();
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
case 4: {
|
|
250
|
+
if (tag !== 34) {
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const entry4 = ClientIdentification_TagsEntry.decode(reader, reader.uint32());
|
|
255
|
+
if (entry4.value !== undefined) {
|
|
256
|
+
message.tags[entry4.key] = entry4.value;
|
|
257
|
+
}
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
reader.skip(tag & 7);
|
|
265
|
+
}
|
|
266
|
+
return message;
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
fromJSON(object: any): ClientIdentification {
|
|
270
|
+
return {
|
|
271
|
+
clientId: isSet(object.clientId)
|
|
272
|
+
? globalThis.String(object.clientId)
|
|
273
|
+
: isSet(object.client_id)
|
|
274
|
+
? globalThis.String(object.client_id)
|
|
275
|
+
: "",
|
|
276
|
+
componentName: isSet(object.componentName)
|
|
277
|
+
? globalThis.String(object.componentName)
|
|
278
|
+
: isSet(object.component_name)
|
|
279
|
+
? globalThis.String(object.component_name)
|
|
280
|
+
: "",
|
|
281
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
282
|
+
tags: isObject(object.tags)
|
|
283
|
+
? (globalThis.Object.entries(object.tags) as [string, any][]).reduce(
|
|
284
|
+
(acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
285
|
+
acc[key] = globalThis.String(value);
|
|
286
|
+
return acc;
|
|
287
|
+
},
|
|
288
|
+
{},
|
|
289
|
+
)
|
|
290
|
+
: {},
|
|
291
|
+
};
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
toJSON(message: ClientIdentification): unknown {
|
|
295
|
+
const obj: any = {};
|
|
296
|
+
if (message.clientId !== "") {
|
|
297
|
+
obj.clientId = message.clientId;
|
|
298
|
+
}
|
|
299
|
+
if (message.componentName !== "") {
|
|
300
|
+
obj.componentName = message.componentName;
|
|
301
|
+
}
|
|
302
|
+
if (message.version !== "") {
|
|
303
|
+
obj.version = message.version;
|
|
304
|
+
}
|
|
305
|
+
if (message.tags) {
|
|
306
|
+
const entries = globalThis.Object.entries(message.tags) as [string, string][];
|
|
307
|
+
if (entries.length > 0) {
|
|
308
|
+
obj.tags = {};
|
|
309
|
+
entries.forEach(([k, v]) => {
|
|
310
|
+
obj.tags[k] = v;
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return obj;
|
|
315
|
+
},
|
|
316
|
+
|
|
317
|
+
create(base?: DeepPartial<ClientIdentification>): ClientIdentification {
|
|
318
|
+
return ClientIdentification.fromPartial(base ?? {});
|
|
319
|
+
},
|
|
320
|
+
fromPartial(object: DeepPartial<ClientIdentification>): ClientIdentification {
|
|
321
|
+
const message = createBaseClientIdentification();
|
|
322
|
+
message.clientId = object.clientId ?? "";
|
|
323
|
+
message.componentName = object.componentName ?? "";
|
|
324
|
+
message.version = object.version ?? "";
|
|
325
|
+
message.tags = (globalThis.Object.entries(object.tags ?? {}) as [string, string][]).reduce(
|
|
326
|
+
(acc: { [key: string]: string }, [key, value]: [string, string]) => {
|
|
327
|
+
if (value !== undefined) {
|
|
328
|
+
acc[key] = globalThis.String(value);
|
|
329
|
+
}
|
|
330
|
+
return acc;
|
|
331
|
+
},
|
|
332
|
+
{},
|
|
333
|
+
);
|
|
334
|
+
return message;
|
|
335
|
+
},
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
function createBaseClientIdentification_TagsEntry(): ClientIdentification_TagsEntry {
|
|
339
|
+
return { key: "", value: "" };
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export const ClientIdentification_TagsEntry: MessageFns<ClientIdentification_TagsEntry> = {
|
|
343
|
+
encode(message: ClientIdentification_TagsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
344
|
+
if (message.key !== "") {
|
|
345
|
+
writer.uint32(10).string(message.key);
|
|
346
|
+
}
|
|
347
|
+
if (message.value !== "") {
|
|
348
|
+
writer.uint32(18).string(message.value);
|
|
349
|
+
}
|
|
350
|
+
return writer;
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClientIdentification_TagsEntry {
|
|
354
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
355
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
356
|
+
const message = createBaseClientIdentification_TagsEntry();
|
|
357
|
+
while (reader.pos < end) {
|
|
358
|
+
const tag = reader.uint32();
|
|
359
|
+
switch (tag >>> 3) {
|
|
360
|
+
case 1: {
|
|
361
|
+
if (tag !== 10) {
|
|
362
|
+
break;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
message.key = reader.string();
|
|
366
|
+
continue;
|
|
367
|
+
}
|
|
368
|
+
case 2: {
|
|
369
|
+
if (tag !== 18) {
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
message.value = reader.string();
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
reader.skip(tag & 7);
|
|
381
|
+
}
|
|
382
|
+
return message;
|
|
383
|
+
},
|
|
384
|
+
|
|
385
|
+
fromJSON(object: any): ClientIdentification_TagsEntry {
|
|
386
|
+
return {
|
|
387
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
388
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
389
|
+
};
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
toJSON(message: ClientIdentification_TagsEntry): unknown {
|
|
393
|
+
const obj: any = {};
|
|
394
|
+
if (message.key !== "") {
|
|
395
|
+
obj.key = message.key;
|
|
396
|
+
}
|
|
397
|
+
if (message.value !== "") {
|
|
398
|
+
obj.value = message.value;
|
|
399
|
+
}
|
|
400
|
+
return obj;
|
|
401
|
+
},
|
|
402
|
+
|
|
403
|
+
create(base?: DeepPartial<ClientIdentification_TagsEntry>): ClientIdentification_TagsEntry {
|
|
404
|
+
return ClientIdentification_TagsEntry.fromPartial(base ?? {});
|
|
405
|
+
},
|
|
406
|
+
fromPartial(object: DeepPartial<ClientIdentification_TagsEntry>): ClientIdentification_TagsEntry {
|
|
407
|
+
const message = createBaseClientIdentification_TagsEntry();
|
|
408
|
+
message.key = object.key ?? "";
|
|
409
|
+
message.value = object.value ?? "";
|
|
410
|
+
return message;
|
|
411
|
+
},
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
function createBasePlatformInfo(): PlatformInfo {
|
|
415
|
+
return { nodeName: "", version: "", contexts: [] };
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export const PlatformInfo: MessageFns<PlatformInfo> = {
|
|
419
|
+
encode(message: PlatformInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
420
|
+
if (message.nodeName !== "") {
|
|
421
|
+
writer.uint32(10).string(message.nodeName);
|
|
422
|
+
}
|
|
423
|
+
if (message.version !== "") {
|
|
424
|
+
writer.uint32(18).string(message.version);
|
|
425
|
+
}
|
|
426
|
+
for (const v of message.contexts) {
|
|
427
|
+
writer.uint32(26).string(v!);
|
|
428
|
+
}
|
|
429
|
+
return writer;
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PlatformInfo {
|
|
433
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
434
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
435
|
+
const message = createBasePlatformInfo();
|
|
436
|
+
while (reader.pos < end) {
|
|
437
|
+
const tag = reader.uint32();
|
|
438
|
+
switch (tag >>> 3) {
|
|
439
|
+
case 1: {
|
|
440
|
+
if (tag !== 10) {
|
|
441
|
+
break;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
message.nodeName = reader.string();
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
447
|
+
case 2: {
|
|
448
|
+
if (tag !== 18) {
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
message.version = reader.string();
|
|
453
|
+
continue;
|
|
454
|
+
}
|
|
455
|
+
case 3: {
|
|
456
|
+
if (tag !== 26) {
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
message.contexts.push(reader.string());
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
reader.skip(tag & 7);
|
|
468
|
+
}
|
|
469
|
+
return message;
|
|
470
|
+
},
|
|
471
|
+
|
|
472
|
+
fromJSON(object: any): PlatformInfo {
|
|
473
|
+
return {
|
|
474
|
+
nodeName: isSet(object.nodeName)
|
|
475
|
+
? globalThis.String(object.nodeName)
|
|
476
|
+
: isSet(object.node_name)
|
|
477
|
+
? globalThis.String(object.node_name)
|
|
478
|
+
: "",
|
|
479
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
480
|
+
contexts: globalThis.Array.isArray(object?.contexts) ? object.contexts.map((e: any) => globalThis.String(e)) : [],
|
|
481
|
+
};
|
|
482
|
+
},
|
|
483
|
+
|
|
484
|
+
toJSON(message: PlatformInfo): unknown {
|
|
485
|
+
const obj: any = {};
|
|
486
|
+
if (message.nodeName !== "") {
|
|
487
|
+
obj.nodeName = message.nodeName;
|
|
488
|
+
}
|
|
489
|
+
if (message.version !== "") {
|
|
490
|
+
obj.version = message.version;
|
|
491
|
+
}
|
|
492
|
+
if (message.contexts?.length) {
|
|
493
|
+
obj.contexts = message.contexts;
|
|
494
|
+
}
|
|
495
|
+
return obj;
|
|
496
|
+
},
|
|
497
|
+
|
|
498
|
+
create(base?: DeepPartial<PlatformInfo>): PlatformInfo {
|
|
499
|
+
return PlatformInfo.fromPartial(base ?? {});
|
|
500
|
+
},
|
|
501
|
+
fromPartial(object: DeepPartial<PlatformInfo>): PlatformInfo {
|
|
502
|
+
const message = createBasePlatformInfo();
|
|
503
|
+
message.nodeName = object.nodeName ?? "";
|
|
504
|
+
message.version = object.version ?? "";
|
|
505
|
+
message.contexts = object.contexts?.map((e) => e) || [];
|
|
506
|
+
return message;
|
|
507
|
+
},
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
function createBasePlatformInbound(): PlatformInbound {
|
|
511
|
+
return {
|
|
512
|
+
register: undefined,
|
|
513
|
+
heartbeat: undefined,
|
|
514
|
+
ack: undefined,
|
|
515
|
+
eventProcessorInfo: undefined,
|
|
516
|
+
result: undefined,
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export const PlatformInbound: MessageFns<PlatformInbound> = {
|
|
521
|
+
encode(message: PlatformInbound, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
522
|
+
if (message.register !== undefined) {
|
|
523
|
+
ClientIdentification.encode(message.register, writer.uint32(10).fork()).join();
|
|
524
|
+
}
|
|
525
|
+
if (message.heartbeat !== undefined) {
|
|
526
|
+
Heartbeat.encode(message.heartbeat, writer.uint32(18).fork()).join();
|
|
527
|
+
}
|
|
528
|
+
if (message.ack !== undefined) {
|
|
529
|
+
InstructionAck.encode(message.ack, writer.uint32(26).fork()).join();
|
|
530
|
+
}
|
|
531
|
+
if (message.eventProcessorInfo !== undefined) {
|
|
532
|
+
EventProcessorInfo.encode(message.eventProcessorInfo, writer.uint32(34).fork()).join();
|
|
533
|
+
}
|
|
534
|
+
if (message.result !== undefined) {
|
|
535
|
+
InstructionResult.encode(message.result, writer.uint32(42).fork()).join();
|
|
536
|
+
}
|
|
537
|
+
return writer;
|
|
538
|
+
},
|
|
539
|
+
|
|
540
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PlatformInbound {
|
|
541
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
542
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
543
|
+
const message = createBasePlatformInbound();
|
|
544
|
+
while (reader.pos < end) {
|
|
545
|
+
const tag = reader.uint32();
|
|
546
|
+
switch (tag >>> 3) {
|
|
547
|
+
case 1: {
|
|
548
|
+
if (tag !== 10) {
|
|
549
|
+
break;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
message.register = ClientIdentification.decode(reader, reader.uint32());
|
|
553
|
+
continue;
|
|
554
|
+
}
|
|
555
|
+
case 2: {
|
|
556
|
+
if (tag !== 18) {
|
|
557
|
+
break;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
message.heartbeat = Heartbeat.decode(reader, reader.uint32());
|
|
561
|
+
continue;
|
|
562
|
+
}
|
|
563
|
+
case 3: {
|
|
564
|
+
if (tag !== 26) {
|
|
565
|
+
break;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
message.ack = InstructionAck.decode(reader, reader.uint32());
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
571
|
+
case 4: {
|
|
572
|
+
if (tag !== 34) {
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
message.eventProcessorInfo = EventProcessorInfo.decode(reader, reader.uint32());
|
|
577
|
+
continue;
|
|
578
|
+
}
|
|
579
|
+
case 5: {
|
|
580
|
+
if (tag !== 42) {
|
|
581
|
+
break;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
message.result = InstructionResult.decode(reader, reader.uint32());
|
|
585
|
+
continue;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
reader.skip(tag & 7);
|
|
592
|
+
}
|
|
593
|
+
return message;
|
|
594
|
+
},
|
|
595
|
+
|
|
596
|
+
fromJSON(object: any): PlatformInbound {
|
|
597
|
+
return {
|
|
598
|
+
register: isSet(object.register) ? ClientIdentification.fromJSON(object.register) : undefined,
|
|
599
|
+
heartbeat: isSet(object.heartbeat) ? Heartbeat.fromJSON(object.heartbeat) : undefined,
|
|
600
|
+
ack: isSet(object.ack) ? InstructionAck.fromJSON(object.ack) : undefined,
|
|
601
|
+
eventProcessorInfo: isSet(object.eventProcessorInfo)
|
|
602
|
+
? EventProcessorInfo.fromJSON(object.eventProcessorInfo)
|
|
603
|
+
: isSet(object.event_processor_info)
|
|
604
|
+
? EventProcessorInfo.fromJSON(object.event_processor_info)
|
|
605
|
+
: undefined,
|
|
606
|
+
result: isSet(object.result) ? InstructionResult.fromJSON(object.result) : undefined,
|
|
607
|
+
};
|
|
608
|
+
},
|
|
609
|
+
|
|
610
|
+
toJSON(message: PlatformInbound): unknown {
|
|
611
|
+
const obj: any = {};
|
|
612
|
+
if (message.register !== undefined) {
|
|
613
|
+
obj.register = ClientIdentification.toJSON(message.register);
|
|
614
|
+
}
|
|
615
|
+
if (message.heartbeat !== undefined) {
|
|
616
|
+
obj.heartbeat = Heartbeat.toJSON(message.heartbeat);
|
|
617
|
+
}
|
|
618
|
+
if (message.ack !== undefined) {
|
|
619
|
+
obj.ack = InstructionAck.toJSON(message.ack);
|
|
620
|
+
}
|
|
621
|
+
if (message.eventProcessorInfo !== undefined) {
|
|
622
|
+
obj.eventProcessorInfo = EventProcessorInfo.toJSON(message.eventProcessorInfo);
|
|
623
|
+
}
|
|
624
|
+
if (message.result !== undefined) {
|
|
625
|
+
obj.result = InstructionResult.toJSON(message.result);
|
|
626
|
+
}
|
|
627
|
+
return obj;
|
|
628
|
+
},
|
|
629
|
+
|
|
630
|
+
create(base?: DeepPartial<PlatformInbound>): PlatformInbound {
|
|
631
|
+
return PlatformInbound.fromPartial(base ?? {});
|
|
632
|
+
},
|
|
633
|
+
fromPartial(object: DeepPartial<PlatformInbound>): PlatformInbound {
|
|
634
|
+
const message = createBasePlatformInbound();
|
|
635
|
+
message.register = (object.register !== undefined && object.register !== null)
|
|
636
|
+
? ClientIdentification.fromPartial(object.register)
|
|
637
|
+
: undefined;
|
|
638
|
+
message.heartbeat = (object.heartbeat !== undefined && object.heartbeat !== null)
|
|
639
|
+
? Heartbeat.fromPartial(object.heartbeat)
|
|
640
|
+
: undefined;
|
|
641
|
+
message.ack = (object.ack !== undefined && object.ack !== null)
|
|
642
|
+
? InstructionAck.fromPartial(object.ack)
|
|
643
|
+
: undefined;
|
|
644
|
+
message.eventProcessorInfo = (object.eventProcessorInfo !== undefined && object.eventProcessorInfo !== null)
|
|
645
|
+
? EventProcessorInfo.fromPartial(object.eventProcessorInfo)
|
|
646
|
+
: undefined;
|
|
647
|
+
message.result = (object.result !== undefined && object.result !== null)
|
|
648
|
+
? InstructionResult.fromPartial(object.result)
|
|
649
|
+
: undefined;
|
|
650
|
+
return message;
|
|
651
|
+
},
|
|
652
|
+
};
|
|
653
|
+
|
|
654
|
+
function createBasePlatformOutbound(): PlatformOutbound {
|
|
655
|
+
return {
|
|
656
|
+
nodeNotification: undefined,
|
|
657
|
+
heartbeat: undefined,
|
|
658
|
+
requestReconnect: undefined,
|
|
659
|
+
pauseEventProcessor: undefined,
|
|
660
|
+
startEventProcessor: undefined,
|
|
661
|
+
releaseSegment: undefined,
|
|
662
|
+
requestEventProcessorInfo: undefined,
|
|
663
|
+
splitEventProcessorSegment: undefined,
|
|
664
|
+
mergeEventProcessorSegment: undefined,
|
|
665
|
+
topologyNotification: undefined,
|
|
666
|
+
instructionId: "",
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export const PlatformOutbound: MessageFns<PlatformOutbound> = {
|
|
671
|
+
encode(message: PlatformOutbound, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
672
|
+
if (message.nodeNotification !== undefined) {
|
|
673
|
+
PlatformInfo.encode(message.nodeNotification, writer.uint32(10).fork()).join();
|
|
674
|
+
}
|
|
675
|
+
if (message.heartbeat !== undefined) {
|
|
676
|
+
Heartbeat.encode(message.heartbeat, writer.uint32(18).fork()).join();
|
|
677
|
+
}
|
|
678
|
+
if (message.requestReconnect !== undefined) {
|
|
679
|
+
RequestReconnect.encode(message.requestReconnect, writer.uint32(26).fork()).join();
|
|
680
|
+
}
|
|
681
|
+
if (message.pauseEventProcessor !== undefined) {
|
|
682
|
+
EventProcessorReference.encode(message.pauseEventProcessor, writer.uint32(34).fork()).join();
|
|
683
|
+
}
|
|
684
|
+
if (message.startEventProcessor !== undefined) {
|
|
685
|
+
EventProcessorReference.encode(message.startEventProcessor, writer.uint32(42).fork()).join();
|
|
686
|
+
}
|
|
687
|
+
if (message.releaseSegment !== undefined) {
|
|
688
|
+
EventProcessorSegmentReference.encode(message.releaseSegment, writer.uint32(50).fork()).join();
|
|
689
|
+
}
|
|
690
|
+
if (message.requestEventProcessorInfo !== undefined) {
|
|
691
|
+
EventProcessorReference.encode(message.requestEventProcessorInfo, writer.uint32(58).fork()).join();
|
|
692
|
+
}
|
|
693
|
+
if (message.splitEventProcessorSegment !== undefined) {
|
|
694
|
+
EventProcessorSegmentReference.encode(message.splitEventProcessorSegment, writer.uint32(66).fork()).join();
|
|
695
|
+
}
|
|
696
|
+
if (message.mergeEventProcessorSegment !== undefined) {
|
|
697
|
+
EventProcessorSegmentReference.encode(message.mergeEventProcessorSegment, writer.uint32(74).fork()).join();
|
|
698
|
+
}
|
|
699
|
+
if (message.topologyNotification !== undefined) {
|
|
700
|
+
TopologyNotification.encode(message.topologyNotification, writer.uint32(90).fork()).join();
|
|
701
|
+
}
|
|
702
|
+
if (message.instructionId !== "") {
|
|
703
|
+
writer.uint32(82).string(message.instructionId);
|
|
704
|
+
}
|
|
705
|
+
return writer;
|
|
706
|
+
},
|
|
707
|
+
|
|
708
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PlatformOutbound {
|
|
709
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
710
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
711
|
+
const message = createBasePlatformOutbound();
|
|
712
|
+
while (reader.pos < end) {
|
|
713
|
+
const tag = reader.uint32();
|
|
714
|
+
switch (tag >>> 3) {
|
|
715
|
+
case 1: {
|
|
716
|
+
if (tag !== 10) {
|
|
717
|
+
break;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
message.nodeNotification = PlatformInfo.decode(reader, reader.uint32());
|
|
721
|
+
continue;
|
|
722
|
+
}
|
|
723
|
+
case 2: {
|
|
724
|
+
if (tag !== 18) {
|
|
725
|
+
break;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
message.heartbeat = Heartbeat.decode(reader, reader.uint32());
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
case 3: {
|
|
732
|
+
if (tag !== 26) {
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
message.requestReconnect = RequestReconnect.decode(reader, reader.uint32());
|
|
737
|
+
continue;
|
|
738
|
+
}
|
|
739
|
+
case 4: {
|
|
740
|
+
if (tag !== 34) {
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
message.pauseEventProcessor = EventProcessorReference.decode(reader, reader.uint32());
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
747
|
+
case 5: {
|
|
748
|
+
if (tag !== 42) {
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
message.startEventProcessor = EventProcessorReference.decode(reader, reader.uint32());
|
|
753
|
+
continue;
|
|
754
|
+
}
|
|
755
|
+
case 6: {
|
|
756
|
+
if (tag !== 50) {
|
|
757
|
+
break;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
message.releaseSegment = EventProcessorSegmentReference.decode(reader, reader.uint32());
|
|
761
|
+
continue;
|
|
762
|
+
}
|
|
763
|
+
case 7: {
|
|
764
|
+
if (tag !== 58) {
|
|
765
|
+
break;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
message.requestEventProcessorInfo = EventProcessorReference.decode(reader, reader.uint32());
|
|
769
|
+
continue;
|
|
770
|
+
}
|
|
771
|
+
case 8: {
|
|
772
|
+
if (tag !== 66) {
|
|
773
|
+
break;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
message.splitEventProcessorSegment = EventProcessorSegmentReference.decode(reader, reader.uint32());
|
|
777
|
+
continue;
|
|
778
|
+
}
|
|
779
|
+
case 9: {
|
|
780
|
+
if (tag !== 74) {
|
|
781
|
+
break;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
message.mergeEventProcessorSegment = EventProcessorSegmentReference.decode(reader, reader.uint32());
|
|
785
|
+
continue;
|
|
786
|
+
}
|
|
787
|
+
case 11: {
|
|
788
|
+
if (tag !== 90) {
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
message.topologyNotification = TopologyNotification.decode(reader, reader.uint32());
|
|
793
|
+
continue;
|
|
794
|
+
}
|
|
795
|
+
case 10: {
|
|
796
|
+
if (tag !== 82) {
|
|
797
|
+
break;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
message.instructionId = reader.string();
|
|
801
|
+
continue;
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
805
|
+
break;
|
|
806
|
+
}
|
|
807
|
+
reader.skip(tag & 7);
|
|
808
|
+
}
|
|
809
|
+
return message;
|
|
810
|
+
},
|
|
811
|
+
|
|
812
|
+
fromJSON(object: any): PlatformOutbound {
|
|
813
|
+
return {
|
|
814
|
+
nodeNotification: isSet(object.nodeNotification)
|
|
815
|
+
? PlatformInfo.fromJSON(object.nodeNotification)
|
|
816
|
+
: isSet(object.node_notification)
|
|
817
|
+
? PlatformInfo.fromJSON(object.node_notification)
|
|
818
|
+
: undefined,
|
|
819
|
+
heartbeat: isSet(object.heartbeat) ? Heartbeat.fromJSON(object.heartbeat) : undefined,
|
|
820
|
+
requestReconnect: isSet(object.requestReconnect)
|
|
821
|
+
? RequestReconnect.fromJSON(object.requestReconnect)
|
|
822
|
+
: isSet(object.request_reconnect)
|
|
823
|
+
? RequestReconnect.fromJSON(object.request_reconnect)
|
|
824
|
+
: undefined,
|
|
825
|
+
pauseEventProcessor: isSet(object.pauseEventProcessor)
|
|
826
|
+
? EventProcessorReference.fromJSON(object.pauseEventProcessor)
|
|
827
|
+
: isSet(object.pause_event_processor)
|
|
828
|
+
? EventProcessorReference.fromJSON(object.pause_event_processor)
|
|
829
|
+
: undefined,
|
|
830
|
+
startEventProcessor: isSet(object.startEventProcessor)
|
|
831
|
+
? EventProcessorReference.fromJSON(object.startEventProcessor)
|
|
832
|
+
: isSet(object.start_event_processor)
|
|
833
|
+
? EventProcessorReference.fromJSON(object.start_event_processor)
|
|
834
|
+
: undefined,
|
|
835
|
+
releaseSegment: isSet(object.releaseSegment)
|
|
836
|
+
? EventProcessorSegmentReference.fromJSON(object.releaseSegment)
|
|
837
|
+
: isSet(object.release_segment)
|
|
838
|
+
? EventProcessorSegmentReference.fromJSON(object.release_segment)
|
|
839
|
+
: undefined,
|
|
840
|
+
requestEventProcessorInfo: isSet(object.requestEventProcessorInfo)
|
|
841
|
+
? EventProcessorReference.fromJSON(object.requestEventProcessorInfo)
|
|
842
|
+
: isSet(object.request_event_processor_info)
|
|
843
|
+
? EventProcessorReference.fromJSON(object.request_event_processor_info)
|
|
844
|
+
: undefined,
|
|
845
|
+
splitEventProcessorSegment: isSet(object.splitEventProcessorSegment)
|
|
846
|
+
? EventProcessorSegmentReference.fromJSON(object.splitEventProcessorSegment)
|
|
847
|
+
: isSet(object.split_event_processor_segment)
|
|
848
|
+
? EventProcessorSegmentReference.fromJSON(object.split_event_processor_segment)
|
|
849
|
+
: undefined,
|
|
850
|
+
mergeEventProcessorSegment: isSet(object.mergeEventProcessorSegment)
|
|
851
|
+
? EventProcessorSegmentReference.fromJSON(object.mergeEventProcessorSegment)
|
|
852
|
+
: isSet(object.merge_event_processor_segment)
|
|
853
|
+
? EventProcessorSegmentReference.fromJSON(object.merge_event_processor_segment)
|
|
854
|
+
: undefined,
|
|
855
|
+
topologyNotification: isSet(object.topologyNotification)
|
|
856
|
+
? TopologyNotification.fromJSON(object.topologyNotification)
|
|
857
|
+
: isSet(object.topology_notification)
|
|
858
|
+
? TopologyNotification.fromJSON(object.topology_notification)
|
|
859
|
+
: undefined,
|
|
860
|
+
instructionId: isSet(object.instructionId)
|
|
861
|
+
? globalThis.String(object.instructionId)
|
|
862
|
+
: isSet(object.instruction_id)
|
|
863
|
+
? globalThis.String(object.instruction_id)
|
|
864
|
+
: "",
|
|
865
|
+
};
|
|
866
|
+
},
|
|
867
|
+
|
|
868
|
+
toJSON(message: PlatformOutbound): unknown {
|
|
869
|
+
const obj: any = {};
|
|
870
|
+
if (message.nodeNotification !== undefined) {
|
|
871
|
+
obj.nodeNotification = PlatformInfo.toJSON(message.nodeNotification);
|
|
872
|
+
}
|
|
873
|
+
if (message.heartbeat !== undefined) {
|
|
874
|
+
obj.heartbeat = Heartbeat.toJSON(message.heartbeat);
|
|
875
|
+
}
|
|
876
|
+
if (message.requestReconnect !== undefined) {
|
|
877
|
+
obj.requestReconnect = RequestReconnect.toJSON(message.requestReconnect);
|
|
878
|
+
}
|
|
879
|
+
if (message.pauseEventProcessor !== undefined) {
|
|
880
|
+
obj.pauseEventProcessor = EventProcessorReference.toJSON(message.pauseEventProcessor);
|
|
881
|
+
}
|
|
882
|
+
if (message.startEventProcessor !== undefined) {
|
|
883
|
+
obj.startEventProcessor = EventProcessorReference.toJSON(message.startEventProcessor);
|
|
884
|
+
}
|
|
885
|
+
if (message.releaseSegment !== undefined) {
|
|
886
|
+
obj.releaseSegment = EventProcessorSegmentReference.toJSON(message.releaseSegment);
|
|
887
|
+
}
|
|
888
|
+
if (message.requestEventProcessorInfo !== undefined) {
|
|
889
|
+
obj.requestEventProcessorInfo = EventProcessorReference.toJSON(message.requestEventProcessorInfo);
|
|
890
|
+
}
|
|
891
|
+
if (message.splitEventProcessorSegment !== undefined) {
|
|
892
|
+
obj.splitEventProcessorSegment = EventProcessorSegmentReference.toJSON(message.splitEventProcessorSegment);
|
|
893
|
+
}
|
|
894
|
+
if (message.mergeEventProcessorSegment !== undefined) {
|
|
895
|
+
obj.mergeEventProcessorSegment = EventProcessorSegmentReference.toJSON(message.mergeEventProcessorSegment);
|
|
896
|
+
}
|
|
897
|
+
if (message.topologyNotification !== undefined) {
|
|
898
|
+
obj.topologyNotification = TopologyNotification.toJSON(message.topologyNotification);
|
|
899
|
+
}
|
|
900
|
+
if (message.instructionId !== "") {
|
|
901
|
+
obj.instructionId = message.instructionId;
|
|
902
|
+
}
|
|
903
|
+
return obj;
|
|
904
|
+
},
|
|
905
|
+
|
|
906
|
+
create(base?: DeepPartial<PlatformOutbound>): PlatformOutbound {
|
|
907
|
+
return PlatformOutbound.fromPartial(base ?? {});
|
|
908
|
+
},
|
|
909
|
+
fromPartial(object: DeepPartial<PlatformOutbound>): PlatformOutbound {
|
|
910
|
+
const message = createBasePlatformOutbound();
|
|
911
|
+
message.nodeNotification = (object.nodeNotification !== undefined && object.nodeNotification !== null)
|
|
912
|
+
? PlatformInfo.fromPartial(object.nodeNotification)
|
|
913
|
+
: undefined;
|
|
914
|
+
message.heartbeat = (object.heartbeat !== undefined && object.heartbeat !== null)
|
|
915
|
+
? Heartbeat.fromPartial(object.heartbeat)
|
|
916
|
+
: undefined;
|
|
917
|
+
message.requestReconnect = (object.requestReconnect !== undefined && object.requestReconnect !== null)
|
|
918
|
+
? RequestReconnect.fromPartial(object.requestReconnect)
|
|
919
|
+
: undefined;
|
|
920
|
+
message.pauseEventProcessor = (object.pauseEventProcessor !== undefined && object.pauseEventProcessor !== null)
|
|
921
|
+
? EventProcessorReference.fromPartial(object.pauseEventProcessor)
|
|
922
|
+
: undefined;
|
|
923
|
+
message.startEventProcessor = (object.startEventProcessor !== undefined && object.startEventProcessor !== null)
|
|
924
|
+
? EventProcessorReference.fromPartial(object.startEventProcessor)
|
|
925
|
+
: undefined;
|
|
926
|
+
message.releaseSegment = (object.releaseSegment !== undefined && object.releaseSegment !== null)
|
|
927
|
+
? EventProcessorSegmentReference.fromPartial(object.releaseSegment)
|
|
928
|
+
: undefined;
|
|
929
|
+
message.requestEventProcessorInfo =
|
|
930
|
+
(object.requestEventProcessorInfo !== undefined && object.requestEventProcessorInfo !== null)
|
|
931
|
+
? EventProcessorReference.fromPartial(object.requestEventProcessorInfo)
|
|
932
|
+
: undefined;
|
|
933
|
+
message.splitEventProcessorSegment =
|
|
934
|
+
(object.splitEventProcessorSegment !== undefined && object.splitEventProcessorSegment !== null)
|
|
935
|
+
? EventProcessorSegmentReference.fromPartial(object.splitEventProcessorSegment)
|
|
936
|
+
: undefined;
|
|
937
|
+
message.mergeEventProcessorSegment =
|
|
938
|
+
(object.mergeEventProcessorSegment !== undefined && object.mergeEventProcessorSegment !== null)
|
|
939
|
+
? EventProcessorSegmentReference.fromPartial(object.mergeEventProcessorSegment)
|
|
940
|
+
: undefined;
|
|
941
|
+
message.topologyNotification = (object.topologyNotification !== undefined && object.topologyNotification !== null)
|
|
942
|
+
? TopologyNotification.fromPartial(object.topologyNotification)
|
|
943
|
+
: undefined;
|
|
944
|
+
message.instructionId = object.instructionId ?? "";
|
|
945
|
+
return message;
|
|
946
|
+
},
|
|
947
|
+
};
|
|
948
|
+
|
|
949
|
+
function createBaseTopologyNotification(): TopologyNotification {
|
|
950
|
+
return { changeType: "", messageType: "", handlerKind: "", clientId: "", componentName: "" };
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
export const TopologyNotification: MessageFns<TopologyNotification> = {
|
|
954
|
+
encode(message: TopologyNotification, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
955
|
+
if (message.changeType !== "") {
|
|
956
|
+
writer.uint32(10).string(message.changeType);
|
|
957
|
+
}
|
|
958
|
+
if (message.messageType !== "") {
|
|
959
|
+
writer.uint32(18).string(message.messageType);
|
|
960
|
+
}
|
|
961
|
+
if (message.handlerKind !== "") {
|
|
962
|
+
writer.uint32(26).string(message.handlerKind);
|
|
963
|
+
}
|
|
964
|
+
if (message.clientId !== "") {
|
|
965
|
+
writer.uint32(34).string(message.clientId);
|
|
966
|
+
}
|
|
967
|
+
if (message.componentName !== "") {
|
|
968
|
+
writer.uint32(42).string(message.componentName);
|
|
969
|
+
}
|
|
970
|
+
return writer;
|
|
971
|
+
},
|
|
972
|
+
|
|
973
|
+
decode(input: BinaryReader | Uint8Array, length?: number): TopologyNotification {
|
|
974
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
975
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
976
|
+
const message = createBaseTopologyNotification();
|
|
977
|
+
while (reader.pos < end) {
|
|
978
|
+
const tag = reader.uint32();
|
|
979
|
+
switch (tag >>> 3) {
|
|
980
|
+
case 1: {
|
|
981
|
+
if (tag !== 10) {
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
message.changeType = reader.string();
|
|
986
|
+
continue;
|
|
987
|
+
}
|
|
988
|
+
case 2: {
|
|
989
|
+
if (tag !== 18) {
|
|
990
|
+
break;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
message.messageType = reader.string();
|
|
994
|
+
continue;
|
|
995
|
+
}
|
|
996
|
+
case 3: {
|
|
997
|
+
if (tag !== 26) {
|
|
998
|
+
break;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
message.handlerKind = reader.string();
|
|
1002
|
+
continue;
|
|
1003
|
+
}
|
|
1004
|
+
case 4: {
|
|
1005
|
+
if (tag !== 34) {
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
message.clientId = reader.string();
|
|
1010
|
+
continue;
|
|
1011
|
+
}
|
|
1012
|
+
case 5: {
|
|
1013
|
+
if (tag !== 42) {
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
message.componentName = reader.string();
|
|
1018
|
+
continue;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1022
|
+
break;
|
|
1023
|
+
}
|
|
1024
|
+
reader.skip(tag & 7);
|
|
1025
|
+
}
|
|
1026
|
+
return message;
|
|
1027
|
+
},
|
|
1028
|
+
|
|
1029
|
+
fromJSON(object: any): TopologyNotification {
|
|
1030
|
+
return {
|
|
1031
|
+
changeType: isSet(object.changeType)
|
|
1032
|
+
? globalThis.String(object.changeType)
|
|
1033
|
+
: isSet(object.change_type)
|
|
1034
|
+
? globalThis.String(object.change_type)
|
|
1035
|
+
: "",
|
|
1036
|
+
messageType: isSet(object.messageType)
|
|
1037
|
+
? globalThis.String(object.messageType)
|
|
1038
|
+
: isSet(object.message_type)
|
|
1039
|
+
? globalThis.String(object.message_type)
|
|
1040
|
+
: "",
|
|
1041
|
+
handlerKind: isSet(object.handlerKind)
|
|
1042
|
+
? globalThis.String(object.handlerKind)
|
|
1043
|
+
: isSet(object.handler_kind)
|
|
1044
|
+
? globalThis.String(object.handler_kind)
|
|
1045
|
+
: "",
|
|
1046
|
+
clientId: isSet(object.clientId)
|
|
1047
|
+
? globalThis.String(object.clientId)
|
|
1048
|
+
: isSet(object.client_id)
|
|
1049
|
+
? globalThis.String(object.client_id)
|
|
1050
|
+
: "",
|
|
1051
|
+
componentName: isSet(object.componentName)
|
|
1052
|
+
? globalThis.String(object.componentName)
|
|
1053
|
+
: isSet(object.component_name)
|
|
1054
|
+
? globalThis.String(object.component_name)
|
|
1055
|
+
: "",
|
|
1056
|
+
};
|
|
1057
|
+
},
|
|
1058
|
+
|
|
1059
|
+
toJSON(message: TopologyNotification): unknown {
|
|
1060
|
+
const obj: any = {};
|
|
1061
|
+
if (message.changeType !== "") {
|
|
1062
|
+
obj.changeType = message.changeType;
|
|
1063
|
+
}
|
|
1064
|
+
if (message.messageType !== "") {
|
|
1065
|
+
obj.messageType = message.messageType;
|
|
1066
|
+
}
|
|
1067
|
+
if (message.handlerKind !== "") {
|
|
1068
|
+
obj.handlerKind = message.handlerKind;
|
|
1069
|
+
}
|
|
1070
|
+
if (message.clientId !== "") {
|
|
1071
|
+
obj.clientId = message.clientId;
|
|
1072
|
+
}
|
|
1073
|
+
if (message.componentName !== "") {
|
|
1074
|
+
obj.componentName = message.componentName;
|
|
1075
|
+
}
|
|
1076
|
+
return obj;
|
|
1077
|
+
},
|
|
1078
|
+
|
|
1079
|
+
create(base?: DeepPartial<TopologyNotification>): TopologyNotification {
|
|
1080
|
+
return TopologyNotification.fromPartial(base ?? {});
|
|
1081
|
+
},
|
|
1082
|
+
fromPartial(object: DeepPartial<TopologyNotification>): TopologyNotification {
|
|
1083
|
+
const message = createBaseTopologyNotification();
|
|
1084
|
+
message.changeType = object.changeType ?? "";
|
|
1085
|
+
message.messageType = object.messageType ?? "";
|
|
1086
|
+
message.handlerKind = object.handlerKind ?? "";
|
|
1087
|
+
message.clientId = object.clientId ?? "";
|
|
1088
|
+
message.componentName = object.componentName ?? "";
|
|
1089
|
+
return message;
|
|
1090
|
+
},
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
function createBaseHeartbeat(): Heartbeat {
|
|
1094
|
+
return {};
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
export const Heartbeat: MessageFns<Heartbeat> = {
|
|
1098
|
+
encode(_: Heartbeat, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1099
|
+
return writer;
|
|
1100
|
+
},
|
|
1101
|
+
|
|
1102
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Heartbeat {
|
|
1103
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1104
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1105
|
+
const message = createBaseHeartbeat();
|
|
1106
|
+
while (reader.pos < end) {
|
|
1107
|
+
const tag = reader.uint32();
|
|
1108
|
+
switch (tag >>> 3) {
|
|
1109
|
+
}
|
|
1110
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1111
|
+
break;
|
|
1112
|
+
}
|
|
1113
|
+
reader.skip(tag & 7);
|
|
1114
|
+
}
|
|
1115
|
+
return message;
|
|
1116
|
+
},
|
|
1117
|
+
|
|
1118
|
+
fromJSON(_: any): Heartbeat {
|
|
1119
|
+
return {};
|
|
1120
|
+
},
|
|
1121
|
+
|
|
1122
|
+
toJSON(_: Heartbeat): unknown {
|
|
1123
|
+
const obj: any = {};
|
|
1124
|
+
return obj;
|
|
1125
|
+
},
|
|
1126
|
+
|
|
1127
|
+
create(base?: DeepPartial<Heartbeat>): Heartbeat {
|
|
1128
|
+
return Heartbeat.fromPartial(base ?? {});
|
|
1129
|
+
},
|
|
1130
|
+
fromPartial(_: DeepPartial<Heartbeat>): Heartbeat {
|
|
1131
|
+
const message = createBaseHeartbeat();
|
|
1132
|
+
return message;
|
|
1133
|
+
},
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
function createBaseRequestReconnect(): RequestReconnect {
|
|
1137
|
+
return {};
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
export const RequestReconnect: MessageFns<RequestReconnect> = {
|
|
1141
|
+
encode(_: RequestReconnect, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1142
|
+
return writer;
|
|
1143
|
+
},
|
|
1144
|
+
|
|
1145
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RequestReconnect {
|
|
1146
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1147
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1148
|
+
const message = createBaseRequestReconnect();
|
|
1149
|
+
while (reader.pos < end) {
|
|
1150
|
+
const tag = reader.uint32();
|
|
1151
|
+
switch (tag >>> 3) {
|
|
1152
|
+
}
|
|
1153
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1154
|
+
break;
|
|
1155
|
+
}
|
|
1156
|
+
reader.skip(tag & 7);
|
|
1157
|
+
}
|
|
1158
|
+
return message;
|
|
1159
|
+
},
|
|
1160
|
+
|
|
1161
|
+
fromJSON(_: any): RequestReconnect {
|
|
1162
|
+
return {};
|
|
1163
|
+
},
|
|
1164
|
+
|
|
1165
|
+
toJSON(_: RequestReconnect): unknown {
|
|
1166
|
+
const obj: any = {};
|
|
1167
|
+
return obj;
|
|
1168
|
+
},
|
|
1169
|
+
|
|
1170
|
+
create(base?: DeepPartial<RequestReconnect>): RequestReconnect {
|
|
1171
|
+
return RequestReconnect.fromPartial(base ?? {});
|
|
1172
|
+
},
|
|
1173
|
+
fromPartial(_: DeepPartial<RequestReconnect>): RequestReconnect {
|
|
1174
|
+
const message = createBaseRequestReconnect();
|
|
1175
|
+
return message;
|
|
1176
|
+
},
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
function createBaseEventProcessorInfo(): EventProcessorInfo {
|
|
1180
|
+
return {
|
|
1181
|
+
processorName: "",
|
|
1182
|
+
mode: "",
|
|
1183
|
+
activeThreads: 0,
|
|
1184
|
+
running: false,
|
|
1185
|
+
error: false,
|
|
1186
|
+
segmentStatus: [],
|
|
1187
|
+
availableThreads: 0,
|
|
1188
|
+
tokenStoreIdentifier: "",
|
|
1189
|
+
isStreamingProcessor: false,
|
|
1190
|
+
};
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
export const EventProcessorInfo: MessageFns<EventProcessorInfo> = {
|
|
1194
|
+
encode(message: EventProcessorInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1195
|
+
if (message.processorName !== "") {
|
|
1196
|
+
writer.uint32(10).string(message.processorName);
|
|
1197
|
+
}
|
|
1198
|
+
if (message.mode !== "") {
|
|
1199
|
+
writer.uint32(18).string(message.mode);
|
|
1200
|
+
}
|
|
1201
|
+
if (message.activeThreads !== 0) {
|
|
1202
|
+
writer.uint32(24).int32(message.activeThreads);
|
|
1203
|
+
}
|
|
1204
|
+
if (message.running !== false) {
|
|
1205
|
+
writer.uint32(32).bool(message.running);
|
|
1206
|
+
}
|
|
1207
|
+
if (message.error !== false) {
|
|
1208
|
+
writer.uint32(40).bool(message.error);
|
|
1209
|
+
}
|
|
1210
|
+
for (const v of message.segmentStatus) {
|
|
1211
|
+
EventProcessorInfo_SegmentStatus.encode(v!, writer.uint32(50).fork()).join();
|
|
1212
|
+
}
|
|
1213
|
+
if (message.availableThreads !== 0) {
|
|
1214
|
+
writer.uint32(56).int32(message.availableThreads);
|
|
1215
|
+
}
|
|
1216
|
+
if (message.tokenStoreIdentifier !== "") {
|
|
1217
|
+
writer.uint32(66).string(message.tokenStoreIdentifier);
|
|
1218
|
+
}
|
|
1219
|
+
if (message.isStreamingProcessor !== false) {
|
|
1220
|
+
writer.uint32(72).bool(message.isStreamingProcessor);
|
|
1221
|
+
}
|
|
1222
|
+
return writer;
|
|
1223
|
+
},
|
|
1224
|
+
|
|
1225
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorInfo {
|
|
1226
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1227
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1228
|
+
const message = createBaseEventProcessorInfo();
|
|
1229
|
+
while (reader.pos < end) {
|
|
1230
|
+
const tag = reader.uint32();
|
|
1231
|
+
switch (tag >>> 3) {
|
|
1232
|
+
case 1: {
|
|
1233
|
+
if (tag !== 10) {
|
|
1234
|
+
break;
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
message.processorName = reader.string();
|
|
1238
|
+
continue;
|
|
1239
|
+
}
|
|
1240
|
+
case 2: {
|
|
1241
|
+
if (tag !== 18) {
|
|
1242
|
+
break;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
message.mode = reader.string();
|
|
1246
|
+
continue;
|
|
1247
|
+
}
|
|
1248
|
+
case 3: {
|
|
1249
|
+
if (tag !== 24) {
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
message.activeThreads = reader.int32();
|
|
1254
|
+
continue;
|
|
1255
|
+
}
|
|
1256
|
+
case 4: {
|
|
1257
|
+
if (tag !== 32) {
|
|
1258
|
+
break;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
message.running = reader.bool();
|
|
1262
|
+
continue;
|
|
1263
|
+
}
|
|
1264
|
+
case 5: {
|
|
1265
|
+
if (tag !== 40) {
|
|
1266
|
+
break;
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
message.error = reader.bool();
|
|
1270
|
+
continue;
|
|
1271
|
+
}
|
|
1272
|
+
case 6: {
|
|
1273
|
+
if (tag !== 50) {
|
|
1274
|
+
break;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
message.segmentStatus.push(EventProcessorInfo_SegmentStatus.decode(reader, reader.uint32()));
|
|
1278
|
+
continue;
|
|
1279
|
+
}
|
|
1280
|
+
case 7: {
|
|
1281
|
+
if (tag !== 56) {
|
|
1282
|
+
break;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
message.availableThreads = reader.int32();
|
|
1286
|
+
continue;
|
|
1287
|
+
}
|
|
1288
|
+
case 8: {
|
|
1289
|
+
if (tag !== 66) {
|
|
1290
|
+
break;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
message.tokenStoreIdentifier = reader.string();
|
|
1294
|
+
continue;
|
|
1295
|
+
}
|
|
1296
|
+
case 9: {
|
|
1297
|
+
if (tag !== 72) {
|
|
1298
|
+
break;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
message.isStreamingProcessor = reader.bool();
|
|
1302
|
+
continue;
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1306
|
+
break;
|
|
1307
|
+
}
|
|
1308
|
+
reader.skip(tag & 7);
|
|
1309
|
+
}
|
|
1310
|
+
return message;
|
|
1311
|
+
},
|
|
1312
|
+
|
|
1313
|
+
fromJSON(object: any): EventProcessorInfo {
|
|
1314
|
+
return {
|
|
1315
|
+
processorName: isSet(object.processorName)
|
|
1316
|
+
? globalThis.String(object.processorName)
|
|
1317
|
+
: isSet(object.processor_name)
|
|
1318
|
+
? globalThis.String(object.processor_name)
|
|
1319
|
+
: "",
|
|
1320
|
+
mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
|
|
1321
|
+
activeThreads: isSet(object.activeThreads)
|
|
1322
|
+
? globalThis.Number(object.activeThreads)
|
|
1323
|
+
: isSet(object.active_threads)
|
|
1324
|
+
? globalThis.Number(object.active_threads)
|
|
1325
|
+
: 0,
|
|
1326
|
+
running: isSet(object.running) ? globalThis.Boolean(object.running) : false,
|
|
1327
|
+
error: isSet(object.error) ? globalThis.Boolean(object.error) : false,
|
|
1328
|
+
segmentStatus: globalThis.Array.isArray(object?.segmentStatus)
|
|
1329
|
+
? object.segmentStatus.map((e: any) => EventProcessorInfo_SegmentStatus.fromJSON(e))
|
|
1330
|
+
: globalThis.Array.isArray(object?.segment_status)
|
|
1331
|
+
? object.segment_status.map((e: any) => EventProcessorInfo_SegmentStatus.fromJSON(e))
|
|
1332
|
+
: [],
|
|
1333
|
+
availableThreads: isSet(object.availableThreads)
|
|
1334
|
+
? globalThis.Number(object.availableThreads)
|
|
1335
|
+
: isSet(object.available_threads)
|
|
1336
|
+
? globalThis.Number(object.available_threads)
|
|
1337
|
+
: 0,
|
|
1338
|
+
tokenStoreIdentifier: isSet(object.tokenStoreIdentifier)
|
|
1339
|
+
? globalThis.String(object.tokenStoreIdentifier)
|
|
1340
|
+
: isSet(object.token_store_identifier)
|
|
1341
|
+
? globalThis.String(object.token_store_identifier)
|
|
1342
|
+
: "",
|
|
1343
|
+
isStreamingProcessor: isSet(object.isStreamingProcessor)
|
|
1344
|
+
? globalThis.Boolean(object.isStreamingProcessor)
|
|
1345
|
+
: isSet(object.is_streaming_processor)
|
|
1346
|
+
? globalThis.Boolean(object.is_streaming_processor)
|
|
1347
|
+
: false,
|
|
1348
|
+
};
|
|
1349
|
+
},
|
|
1350
|
+
|
|
1351
|
+
toJSON(message: EventProcessorInfo): unknown {
|
|
1352
|
+
const obj: any = {};
|
|
1353
|
+
if (message.processorName !== "") {
|
|
1354
|
+
obj.processorName = message.processorName;
|
|
1355
|
+
}
|
|
1356
|
+
if (message.mode !== "") {
|
|
1357
|
+
obj.mode = message.mode;
|
|
1358
|
+
}
|
|
1359
|
+
if (message.activeThreads !== 0) {
|
|
1360
|
+
obj.activeThreads = Math.round(message.activeThreads);
|
|
1361
|
+
}
|
|
1362
|
+
if (message.running !== false) {
|
|
1363
|
+
obj.running = message.running;
|
|
1364
|
+
}
|
|
1365
|
+
if (message.error !== false) {
|
|
1366
|
+
obj.error = message.error;
|
|
1367
|
+
}
|
|
1368
|
+
if (message.segmentStatus?.length) {
|
|
1369
|
+
obj.segmentStatus = message.segmentStatus.map((e) => EventProcessorInfo_SegmentStatus.toJSON(e));
|
|
1370
|
+
}
|
|
1371
|
+
if (message.availableThreads !== 0) {
|
|
1372
|
+
obj.availableThreads = Math.round(message.availableThreads);
|
|
1373
|
+
}
|
|
1374
|
+
if (message.tokenStoreIdentifier !== "") {
|
|
1375
|
+
obj.tokenStoreIdentifier = message.tokenStoreIdentifier;
|
|
1376
|
+
}
|
|
1377
|
+
if (message.isStreamingProcessor !== false) {
|
|
1378
|
+
obj.isStreamingProcessor = message.isStreamingProcessor;
|
|
1379
|
+
}
|
|
1380
|
+
return obj;
|
|
1381
|
+
},
|
|
1382
|
+
|
|
1383
|
+
create(base?: DeepPartial<EventProcessorInfo>): EventProcessorInfo {
|
|
1384
|
+
return EventProcessorInfo.fromPartial(base ?? {});
|
|
1385
|
+
},
|
|
1386
|
+
fromPartial(object: DeepPartial<EventProcessorInfo>): EventProcessorInfo {
|
|
1387
|
+
const message = createBaseEventProcessorInfo();
|
|
1388
|
+
message.processorName = object.processorName ?? "";
|
|
1389
|
+
message.mode = object.mode ?? "";
|
|
1390
|
+
message.activeThreads = object.activeThreads ?? 0;
|
|
1391
|
+
message.running = object.running ?? false;
|
|
1392
|
+
message.error = object.error ?? false;
|
|
1393
|
+
message.segmentStatus = object.segmentStatus?.map((e) => EventProcessorInfo_SegmentStatus.fromPartial(e)) || [];
|
|
1394
|
+
message.availableThreads = object.availableThreads ?? 0;
|
|
1395
|
+
message.tokenStoreIdentifier = object.tokenStoreIdentifier ?? "";
|
|
1396
|
+
message.isStreamingProcessor = object.isStreamingProcessor ?? false;
|
|
1397
|
+
return message;
|
|
1398
|
+
},
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
function createBaseEventProcessorInfo_SegmentStatus(): EventProcessorInfo_SegmentStatus {
|
|
1402
|
+
return { segmentId: 0, caughtUp: false, replaying: false, onePartOf: 0, tokenPosition: 0n, errorState: "" };
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
export const EventProcessorInfo_SegmentStatus: MessageFns<EventProcessorInfo_SegmentStatus> = {
|
|
1406
|
+
encode(message: EventProcessorInfo_SegmentStatus, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1407
|
+
if (message.segmentId !== 0) {
|
|
1408
|
+
writer.uint32(8).int32(message.segmentId);
|
|
1409
|
+
}
|
|
1410
|
+
if (message.caughtUp !== false) {
|
|
1411
|
+
writer.uint32(16).bool(message.caughtUp);
|
|
1412
|
+
}
|
|
1413
|
+
if (message.replaying !== false) {
|
|
1414
|
+
writer.uint32(24).bool(message.replaying);
|
|
1415
|
+
}
|
|
1416
|
+
if (message.onePartOf !== 0) {
|
|
1417
|
+
writer.uint32(32).int32(message.onePartOf);
|
|
1418
|
+
}
|
|
1419
|
+
if (message.tokenPosition !== 0n) {
|
|
1420
|
+
if (BigInt.asIntN(64, message.tokenPosition) !== message.tokenPosition) {
|
|
1421
|
+
throw new globalThis.Error("value provided for field message.tokenPosition of type int64 too large");
|
|
1422
|
+
}
|
|
1423
|
+
writer.uint32(40).int64(message.tokenPosition);
|
|
1424
|
+
}
|
|
1425
|
+
if (message.errorState !== "") {
|
|
1426
|
+
writer.uint32(50).string(message.errorState);
|
|
1427
|
+
}
|
|
1428
|
+
return writer;
|
|
1429
|
+
},
|
|
1430
|
+
|
|
1431
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorInfo_SegmentStatus {
|
|
1432
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1433
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1434
|
+
const message = createBaseEventProcessorInfo_SegmentStatus();
|
|
1435
|
+
while (reader.pos < end) {
|
|
1436
|
+
const tag = reader.uint32();
|
|
1437
|
+
switch (tag >>> 3) {
|
|
1438
|
+
case 1: {
|
|
1439
|
+
if (tag !== 8) {
|
|
1440
|
+
break;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
message.segmentId = reader.int32();
|
|
1444
|
+
continue;
|
|
1445
|
+
}
|
|
1446
|
+
case 2: {
|
|
1447
|
+
if (tag !== 16) {
|
|
1448
|
+
break;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
message.caughtUp = reader.bool();
|
|
1452
|
+
continue;
|
|
1453
|
+
}
|
|
1454
|
+
case 3: {
|
|
1455
|
+
if (tag !== 24) {
|
|
1456
|
+
break;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
message.replaying = reader.bool();
|
|
1460
|
+
continue;
|
|
1461
|
+
}
|
|
1462
|
+
case 4: {
|
|
1463
|
+
if (tag !== 32) {
|
|
1464
|
+
break;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
message.onePartOf = reader.int32();
|
|
1468
|
+
continue;
|
|
1469
|
+
}
|
|
1470
|
+
case 5: {
|
|
1471
|
+
if (tag !== 40) {
|
|
1472
|
+
break;
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
message.tokenPosition = reader.int64() as bigint;
|
|
1476
|
+
continue;
|
|
1477
|
+
}
|
|
1478
|
+
case 6: {
|
|
1479
|
+
if (tag !== 50) {
|
|
1480
|
+
break;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
message.errorState = reader.string();
|
|
1484
|
+
continue;
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1488
|
+
break;
|
|
1489
|
+
}
|
|
1490
|
+
reader.skip(tag & 7);
|
|
1491
|
+
}
|
|
1492
|
+
return message;
|
|
1493
|
+
},
|
|
1494
|
+
|
|
1495
|
+
fromJSON(object: any): EventProcessorInfo_SegmentStatus {
|
|
1496
|
+
return {
|
|
1497
|
+
segmentId: isSet(object.segmentId)
|
|
1498
|
+
? globalThis.Number(object.segmentId)
|
|
1499
|
+
: isSet(object.segment_id)
|
|
1500
|
+
? globalThis.Number(object.segment_id)
|
|
1501
|
+
: 0,
|
|
1502
|
+
caughtUp: isSet(object.caughtUp)
|
|
1503
|
+
? globalThis.Boolean(object.caughtUp)
|
|
1504
|
+
: isSet(object.caught_up)
|
|
1505
|
+
? globalThis.Boolean(object.caught_up)
|
|
1506
|
+
: false,
|
|
1507
|
+
replaying: isSet(object.replaying) ? globalThis.Boolean(object.replaying) : false,
|
|
1508
|
+
onePartOf: isSet(object.onePartOf)
|
|
1509
|
+
? globalThis.Number(object.onePartOf)
|
|
1510
|
+
: isSet(object.one_part_of)
|
|
1511
|
+
? globalThis.Number(object.one_part_of)
|
|
1512
|
+
: 0,
|
|
1513
|
+
tokenPosition: isSet(object.tokenPosition)
|
|
1514
|
+
? BigInt(object.tokenPosition)
|
|
1515
|
+
: isSet(object.token_position)
|
|
1516
|
+
? BigInt(object.token_position)
|
|
1517
|
+
: 0n,
|
|
1518
|
+
errorState: isSet(object.errorState)
|
|
1519
|
+
? globalThis.String(object.errorState)
|
|
1520
|
+
: isSet(object.error_state)
|
|
1521
|
+
? globalThis.String(object.error_state)
|
|
1522
|
+
: "",
|
|
1523
|
+
};
|
|
1524
|
+
},
|
|
1525
|
+
|
|
1526
|
+
toJSON(message: EventProcessorInfo_SegmentStatus): unknown {
|
|
1527
|
+
const obj: any = {};
|
|
1528
|
+
if (message.segmentId !== 0) {
|
|
1529
|
+
obj.segmentId = Math.round(message.segmentId);
|
|
1530
|
+
}
|
|
1531
|
+
if (message.caughtUp !== false) {
|
|
1532
|
+
obj.caughtUp = message.caughtUp;
|
|
1533
|
+
}
|
|
1534
|
+
if (message.replaying !== false) {
|
|
1535
|
+
obj.replaying = message.replaying;
|
|
1536
|
+
}
|
|
1537
|
+
if (message.onePartOf !== 0) {
|
|
1538
|
+
obj.onePartOf = Math.round(message.onePartOf);
|
|
1539
|
+
}
|
|
1540
|
+
if (message.tokenPosition !== 0n) {
|
|
1541
|
+
obj.tokenPosition = message.tokenPosition.toString();
|
|
1542
|
+
}
|
|
1543
|
+
if (message.errorState !== "") {
|
|
1544
|
+
obj.errorState = message.errorState;
|
|
1545
|
+
}
|
|
1546
|
+
return obj;
|
|
1547
|
+
},
|
|
1548
|
+
|
|
1549
|
+
create(base?: DeepPartial<EventProcessorInfo_SegmentStatus>): EventProcessorInfo_SegmentStatus {
|
|
1550
|
+
return EventProcessorInfo_SegmentStatus.fromPartial(base ?? {});
|
|
1551
|
+
},
|
|
1552
|
+
fromPartial(object: DeepPartial<EventProcessorInfo_SegmentStatus>): EventProcessorInfo_SegmentStatus {
|
|
1553
|
+
const message = createBaseEventProcessorInfo_SegmentStatus();
|
|
1554
|
+
message.segmentId = object.segmentId ?? 0;
|
|
1555
|
+
message.caughtUp = object.caughtUp ?? false;
|
|
1556
|
+
message.replaying = object.replaying ?? false;
|
|
1557
|
+
message.onePartOf = object.onePartOf ?? 0;
|
|
1558
|
+
message.tokenPosition = object.tokenPosition ?? 0n;
|
|
1559
|
+
message.errorState = object.errorState ?? "";
|
|
1560
|
+
return message;
|
|
1561
|
+
},
|
|
1562
|
+
};
|
|
1563
|
+
|
|
1564
|
+
function createBaseEventProcessorReference(): EventProcessorReference {
|
|
1565
|
+
return { processorName: "" };
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
export const EventProcessorReference: MessageFns<EventProcessorReference> = {
|
|
1569
|
+
encode(message: EventProcessorReference, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1570
|
+
if (message.processorName !== "") {
|
|
1571
|
+
writer.uint32(10).string(message.processorName);
|
|
1572
|
+
}
|
|
1573
|
+
return writer;
|
|
1574
|
+
},
|
|
1575
|
+
|
|
1576
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorReference {
|
|
1577
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1578
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1579
|
+
const message = createBaseEventProcessorReference();
|
|
1580
|
+
while (reader.pos < end) {
|
|
1581
|
+
const tag = reader.uint32();
|
|
1582
|
+
switch (tag >>> 3) {
|
|
1583
|
+
case 1: {
|
|
1584
|
+
if (tag !== 10) {
|
|
1585
|
+
break;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
message.processorName = reader.string();
|
|
1589
|
+
continue;
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1593
|
+
break;
|
|
1594
|
+
}
|
|
1595
|
+
reader.skip(tag & 7);
|
|
1596
|
+
}
|
|
1597
|
+
return message;
|
|
1598
|
+
},
|
|
1599
|
+
|
|
1600
|
+
fromJSON(object: any): EventProcessorReference {
|
|
1601
|
+
return {
|
|
1602
|
+
processorName: isSet(object.processorName)
|
|
1603
|
+
? globalThis.String(object.processorName)
|
|
1604
|
+
: isSet(object.processor_name)
|
|
1605
|
+
? globalThis.String(object.processor_name)
|
|
1606
|
+
: "",
|
|
1607
|
+
};
|
|
1608
|
+
},
|
|
1609
|
+
|
|
1610
|
+
toJSON(message: EventProcessorReference): unknown {
|
|
1611
|
+
const obj: any = {};
|
|
1612
|
+
if (message.processorName !== "") {
|
|
1613
|
+
obj.processorName = message.processorName;
|
|
1614
|
+
}
|
|
1615
|
+
return obj;
|
|
1616
|
+
},
|
|
1617
|
+
|
|
1618
|
+
create(base?: DeepPartial<EventProcessorReference>): EventProcessorReference {
|
|
1619
|
+
return EventProcessorReference.fromPartial(base ?? {});
|
|
1620
|
+
},
|
|
1621
|
+
fromPartial(object: DeepPartial<EventProcessorReference>): EventProcessorReference {
|
|
1622
|
+
const message = createBaseEventProcessorReference();
|
|
1623
|
+
message.processorName = object.processorName ?? "";
|
|
1624
|
+
return message;
|
|
1625
|
+
},
|
|
1626
|
+
};
|
|
1627
|
+
|
|
1628
|
+
function createBaseEventProcessorSegmentReference(): EventProcessorSegmentReference {
|
|
1629
|
+
return { processorName: "", segmentIdentifier: 0 };
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
export const EventProcessorSegmentReference: MessageFns<EventProcessorSegmentReference> = {
|
|
1633
|
+
encode(message: EventProcessorSegmentReference, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1634
|
+
if (message.processorName !== "") {
|
|
1635
|
+
writer.uint32(10).string(message.processorName);
|
|
1636
|
+
}
|
|
1637
|
+
if (message.segmentIdentifier !== 0) {
|
|
1638
|
+
writer.uint32(16).int32(message.segmentIdentifier);
|
|
1639
|
+
}
|
|
1640
|
+
return writer;
|
|
1641
|
+
},
|
|
1642
|
+
|
|
1643
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorSegmentReference {
|
|
1644
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1645
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1646
|
+
const message = createBaseEventProcessorSegmentReference();
|
|
1647
|
+
while (reader.pos < end) {
|
|
1648
|
+
const tag = reader.uint32();
|
|
1649
|
+
switch (tag >>> 3) {
|
|
1650
|
+
case 1: {
|
|
1651
|
+
if (tag !== 10) {
|
|
1652
|
+
break;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
message.processorName = reader.string();
|
|
1656
|
+
continue;
|
|
1657
|
+
}
|
|
1658
|
+
case 2: {
|
|
1659
|
+
if (tag !== 16) {
|
|
1660
|
+
break;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
message.segmentIdentifier = reader.int32();
|
|
1664
|
+
continue;
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1668
|
+
break;
|
|
1669
|
+
}
|
|
1670
|
+
reader.skip(tag & 7);
|
|
1671
|
+
}
|
|
1672
|
+
return message;
|
|
1673
|
+
},
|
|
1674
|
+
|
|
1675
|
+
fromJSON(object: any): EventProcessorSegmentReference {
|
|
1676
|
+
return {
|
|
1677
|
+
processorName: isSet(object.processorName)
|
|
1678
|
+
? globalThis.String(object.processorName)
|
|
1679
|
+
: isSet(object.processor_name)
|
|
1680
|
+
? globalThis.String(object.processor_name)
|
|
1681
|
+
: "",
|
|
1682
|
+
segmentIdentifier: isSet(object.segmentIdentifier)
|
|
1683
|
+
? globalThis.Number(object.segmentIdentifier)
|
|
1684
|
+
: isSet(object.segment_identifier)
|
|
1685
|
+
? globalThis.Number(object.segment_identifier)
|
|
1686
|
+
: 0,
|
|
1687
|
+
};
|
|
1688
|
+
},
|
|
1689
|
+
|
|
1690
|
+
toJSON(message: EventProcessorSegmentReference): unknown {
|
|
1691
|
+
const obj: any = {};
|
|
1692
|
+
if (message.processorName !== "") {
|
|
1693
|
+
obj.processorName = message.processorName;
|
|
1694
|
+
}
|
|
1695
|
+
if (message.segmentIdentifier !== 0) {
|
|
1696
|
+
obj.segmentIdentifier = Math.round(message.segmentIdentifier);
|
|
1697
|
+
}
|
|
1698
|
+
return obj;
|
|
1699
|
+
},
|
|
1700
|
+
|
|
1701
|
+
create(base?: DeepPartial<EventProcessorSegmentReference>): EventProcessorSegmentReference {
|
|
1702
|
+
return EventProcessorSegmentReference.fromPartial(base ?? {});
|
|
1703
|
+
},
|
|
1704
|
+
fromPartial(object: DeepPartial<EventProcessorSegmentReference>): EventProcessorSegmentReference {
|
|
1705
|
+
const message = createBaseEventProcessorSegmentReference();
|
|
1706
|
+
message.processorName = object.processorName ?? "";
|
|
1707
|
+
message.segmentIdentifier = object.segmentIdentifier ?? 0;
|
|
1708
|
+
return message;
|
|
1709
|
+
},
|
|
1710
|
+
};
|
|
1711
|
+
|
|
1712
|
+
function createBaseInstructionResult(): InstructionResult {
|
|
1713
|
+
return { instructionId: "", success: false, error: undefined };
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
export const InstructionResult: MessageFns<InstructionResult> = {
|
|
1717
|
+
encode(message: InstructionResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1718
|
+
if (message.instructionId !== "") {
|
|
1719
|
+
writer.uint32(10).string(message.instructionId);
|
|
1720
|
+
}
|
|
1721
|
+
if (message.success !== false) {
|
|
1722
|
+
writer.uint32(16).bool(message.success);
|
|
1723
|
+
}
|
|
1724
|
+
if (message.error !== undefined) {
|
|
1725
|
+
ErrorMessage.encode(message.error, writer.uint32(26).fork()).join();
|
|
1726
|
+
}
|
|
1727
|
+
return writer;
|
|
1728
|
+
},
|
|
1729
|
+
|
|
1730
|
+
decode(input: BinaryReader | Uint8Array, length?: number): InstructionResult {
|
|
1731
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1732
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1733
|
+
const message = createBaseInstructionResult();
|
|
1734
|
+
while (reader.pos < end) {
|
|
1735
|
+
const tag = reader.uint32();
|
|
1736
|
+
switch (tag >>> 3) {
|
|
1737
|
+
case 1: {
|
|
1738
|
+
if (tag !== 10) {
|
|
1739
|
+
break;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
message.instructionId = reader.string();
|
|
1743
|
+
continue;
|
|
1744
|
+
}
|
|
1745
|
+
case 2: {
|
|
1746
|
+
if (tag !== 16) {
|
|
1747
|
+
break;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
message.success = reader.bool();
|
|
1751
|
+
continue;
|
|
1752
|
+
}
|
|
1753
|
+
case 3: {
|
|
1754
|
+
if (tag !== 26) {
|
|
1755
|
+
break;
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
message.error = ErrorMessage.decode(reader, reader.uint32());
|
|
1759
|
+
continue;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1763
|
+
break;
|
|
1764
|
+
}
|
|
1765
|
+
reader.skip(tag & 7);
|
|
1766
|
+
}
|
|
1767
|
+
return message;
|
|
1768
|
+
},
|
|
1769
|
+
|
|
1770
|
+
fromJSON(object: any): InstructionResult {
|
|
1771
|
+
return {
|
|
1772
|
+
instructionId: isSet(object.instructionId)
|
|
1773
|
+
? globalThis.String(object.instructionId)
|
|
1774
|
+
: isSet(object.instruction_id)
|
|
1775
|
+
? globalThis.String(object.instruction_id)
|
|
1776
|
+
: "",
|
|
1777
|
+
success: isSet(object.success) ? globalThis.Boolean(object.success) : false,
|
|
1778
|
+
error: isSet(object.error) ? ErrorMessage.fromJSON(object.error) : undefined,
|
|
1779
|
+
};
|
|
1780
|
+
},
|
|
1781
|
+
|
|
1782
|
+
toJSON(message: InstructionResult): unknown {
|
|
1783
|
+
const obj: any = {};
|
|
1784
|
+
if (message.instructionId !== "") {
|
|
1785
|
+
obj.instructionId = message.instructionId;
|
|
1786
|
+
}
|
|
1787
|
+
if (message.success !== false) {
|
|
1788
|
+
obj.success = message.success;
|
|
1789
|
+
}
|
|
1790
|
+
if (message.error !== undefined) {
|
|
1791
|
+
obj.error = ErrorMessage.toJSON(message.error);
|
|
1792
|
+
}
|
|
1793
|
+
return obj;
|
|
1794
|
+
},
|
|
1795
|
+
|
|
1796
|
+
create(base?: DeepPartial<InstructionResult>): InstructionResult {
|
|
1797
|
+
return InstructionResult.fromPartial(base ?? {});
|
|
1798
|
+
},
|
|
1799
|
+
fromPartial(object: DeepPartial<InstructionResult>): InstructionResult {
|
|
1800
|
+
const message = createBaseInstructionResult();
|
|
1801
|
+
message.instructionId = object.instructionId ?? "";
|
|
1802
|
+
message.success = object.success ?? false;
|
|
1803
|
+
message.error = (object.error !== undefined && object.error !== null)
|
|
1804
|
+
? ErrorMessage.fromPartial(object.error)
|
|
1805
|
+
: undefined;
|
|
1806
|
+
return message;
|
|
1807
|
+
},
|
|
1808
|
+
};
|
|
1809
|
+
|
|
1810
|
+
/**
|
|
1811
|
+
* Service for client connection lifecycle management.
|
|
1812
|
+
*
|
|
1813
|
+
* Clients connect to this service first to identify themselves,
|
|
1814
|
+
* then open a persistent stream for heartbeat and lifecycle management.
|
|
1815
|
+
*/
|
|
1816
|
+
export type PlatformServiceDefinition = typeof PlatformServiceDefinition;
|
|
1817
|
+
export const PlatformServiceDefinition = {
|
|
1818
|
+
name: "PlatformService",
|
|
1819
|
+
fullName: "kronosdb.platform.PlatformService",
|
|
1820
|
+
methods: {
|
|
1821
|
+
/**
|
|
1822
|
+
* Initial connection: client identifies itself and receives server info.
|
|
1823
|
+
* The server registers the client in the connection registry.
|
|
1824
|
+
*/
|
|
1825
|
+
getPlatformServer: {
|
|
1826
|
+
name: "GetPlatformServer",
|
|
1827
|
+
requestType: ClientIdentification as typeof ClientIdentification,
|
|
1828
|
+
requestStream: false,
|
|
1829
|
+
responseType: PlatformInfo as typeof PlatformInfo,
|
|
1830
|
+
responseStream: false,
|
|
1831
|
+
options: {},
|
|
1832
|
+
},
|
|
1833
|
+
/**
|
|
1834
|
+
* Persistent bidirectional stream for lifecycle management.
|
|
1835
|
+
* Used for heartbeat exchange, event processor status reporting,
|
|
1836
|
+
* and server-initiated instructions.
|
|
1837
|
+
*/
|
|
1838
|
+
openStream: {
|
|
1839
|
+
name: "OpenStream",
|
|
1840
|
+
requestType: PlatformInbound as typeof PlatformInbound,
|
|
1841
|
+
requestStream: true,
|
|
1842
|
+
responseType: PlatformOutbound as typeof PlatformOutbound,
|
|
1843
|
+
responseStream: true,
|
|
1844
|
+
options: {},
|
|
1845
|
+
},
|
|
1846
|
+
},
|
|
1847
|
+
} as const;
|
|
1848
|
+
|
|
1849
|
+
export interface PlatformServiceImplementation<CallContextExt = {}> {
|
|
1850
|
+
/**
|
|
1851
|
+
* Initial connection: client identifies itself and receives server info.
|
|
1852
|
+
* The server registers the client in the connection registry.
|
|
1853
|
+
*/
|
|
1854
|
+
getPlatformServer(
|
|
1855
|
+
request: ClientIdentification,
|
|
1856
|
+
context: CallContext & CallContextExt,
|
|
1857
|
+
): Promise<DeepPartial<PlatformInfo>>;
|
|
1858
|
+
/**
|
|
1859
|
+
* Persistent bidirectional stream for lifecycle management.
|
|
1860
|
+
* Used for heartbeat exchange, event processor status reporting,
|
|
1861
|
+
* and server-initiated instructions.
|
|
1862
|
+
*/
|
|
1863
|
+
openStream(
|
|
1864
|
+
request: AsyncIterable<PlatformInbound>,
|
|
1865
|
+
context: CallContext & CallContextExt,
|
|
1866
|
+
): ServerStreamingMethodResult<DeepPartial<PlatformOutbound>>;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
export interface PlatformServiceClient<CallOptionsExt = {}> {
|
|
1870
|
+
/**
|
|
1871
|
+
* Initial connection: client identifies itself and receives server info.
|
|
1872
|
+
* The server registers the client in the connection registry.
|
|
1873
|
+
*/
|
|
1874
|
+
getPlatformServer(
|
|
1875
|
+
request: DeepPartial<ClientIdentification>,
|
|
1876
|
+
options?: CallOptions & CallOptionsExt,
|
|
1877
|
+
): Promise<PlatformInfo>;
|
|
1878
|
+
/**
|
|
1879
|
+
* Persistent bidirectional stream for lifecycle management.
|
|
1880
|
+
* Used for heartbeat exchange, event processor status reporting,
|
|
1881
|
+
* and server-initiated instructions.
|
|
1882
|
+
*/
|
|
1883
|
+
openStream(
|
|
1884
|
+
request: AsyncIterable<DeepPartial<PlatformInbound>>,
|
|
1885
|
+
options?: CallOptions & CallOptionsExt,
|
|
1886
|
+
): AsyncIterable<PlatformOutbound>;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
1890
|
+
|
|
1891
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
1892
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
1893
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
1894
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
1895
|
+
: Partial<T>;
|
|
1896
|
+
|
|
1897
|
+
function isObject(value: any): boolean {
|
|
1898
|
+
return typeof value === "object" && value !== null;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
function isSet(value: any): boolean {
|
|
1902
|
+
return value !== null && value !== undefined;
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
|
|
1906
|
+
|
|
1907
|
+
export interface MessageFns<T> {
|
|
1908
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1909
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1910
|
+
fromJSON(object: any): T;
|
|
1911
|
+
toJSON(message: T): unknown;
|
|
1912
|
+
create(base?: DeepPartial<T>): T;
|
|
1913
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
1914
|
+
}
|