@kronos-ts/axon-server 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/axon-server-event-store.d.ts +16 -0
- package/dist/axon-server-event-store.d.ts.map +1 -0
- package/dist/axon-server-event-store.js +282 -0
- package/dist/axon-server-event-store.js.map +1 -0
- package/dist/axon-server-snapshot-store.d.ts +12 -0
- package/dist/axon-server-snapshot-store.d.ts.map +1 -0
- package/dist/axon-server-snapshot-store.js +88 -0
- package/dist/axon-server-snapshot-store.js.map +1 -0
- package/dist/axon-server.d.ts +115 -0
- package/dist/axon-server.d.ts.map +1 -0
- package/dist/axon-server.js +986 -0
- package/dist/axon-server.js.map +1 -0
- package/dist/connection-manager.d.ts +49 -0
- package/dist/connection-manager.d.ts.map +1 -0
- package/dist/connection-manager.js +37 -0
- package/dist/connection-manager.js.map +1 -0
- package/dist/connection.d.ts +129 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +130 -0
- package/dist/connection.js.map +1 -0
- package/dist/errors.d.ts +96 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +189 -0
- package/dist/errors.js.map +1 -0
- package/dist/event-processor-info.d.ts +35 -0
- package/dist/event-processor-info.d.ts.map +1 -0
- package/dist/event-processor-info.js +28 -0
- package/dist/event-processor-info.js.map +1 -0
- package/dist/flow-controlled-sender.d.ts +30 -0
- package/dist/flow-controlled-sender.d.ts.map +1 -0
- package/dist/flow-controlled-sender.js +60 -0
- package/dist/flow-controlled-sender.js.map +1 -0
- package/dist/generated/command.d.ts +158 -0
- package/dist/generated/command.d.ts.map +1 -0
- package/dist/generated/command.js +970 -0
- package/dist/generated/command.js.map +1 -0
- package/dist/generated/common.d.ts +130 -0
- package/dist/generated/common.d.ts.map +1 -0
- package/dist/generated/common.js +908 -0
- package/dist/generated/common.js.map +1 -0
- package/dist/generated/control.d.ts +293 -0
- package/dist/generated/control.d.ts.map +1 -0
- package/dist/generated/control.js +1938 -0
- package/dist/generated/control.js.map +1 -0
- package/dist/generated/dcb.d.ts +650 -0
- package/dist/generated/dcb.d.ts.map +1 -0
- package/dist/generated/dcb.js +2943 -0
- package/dist/generated/dcb.js.map +1 -0
- package/dist/generated/event.d.ts +667 -0
- package/dist/generated/event.d.ts.map +1 -0
- package/dist/generated/event.js +3185 -0
- package/dist/generated/event.js.map +1 -0
- package/dist/generated/google/protobuf/empty.d.ts +30 -0
- package/dist/generated/google/protobuf/empty.d.ts.map +1 -0
- package/dist/generated/google/protobuf/empty.js +46 -0
- package/dist/generated/google/protobuf/empty.js.map +1 -0
- package/dist/generated/query.d.ts +300 -0
- package/dist/generated/query.d.ts.map +1 -0
- package/dist/generated/query.js +2183 -0
- package/dist/generated/query.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/message-size.d.ts +38 -0
- package/dist/message-size.d.ts.map +1 -0
- package/dist/message-size.js +57 -0
- package/dist/message-size.js.map +1 -0
- package/dist/metadata-conversion.d.ts +11 -0
- package/dist/metadata-conversion.d.ts.map +1 -0
- package/dist/metadata-conversion.js +51 -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 +119 -0
- package/dist/platform-service.d.ts.map +1 -0
- package/dist/platform-service.js +250 -0
- package/dist/platform-service.js.map +1 -0
- package/dist/shutdown-latch.d.ts +38 -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/axon-server-event-store.ts +358 -0
- package/src/axon-server-snapshot-store.ts +118 -0
- package/src/axon-server.ts +1202 -0
- package/src/connection-manager.ts +88 -0
- package/src/connection.ts +272 -0
- package/src/errors.ts +223 -0
- package/src/event-processor-info.ts +62 -0
- package/src/flow-controlled-sender.ts +91 -0
- package/src/generated/command.ts +1231 -0
- package/src/generated/common.ts +1097 -0
- package/src/generated/control.ts +2419 -0
- package/src/generated/dcb.ts +3826 -0
- package/src/generated/event.ts +4076 -0
- package/src/generated/google/protobuf/empty.ts +84 -0
- package/src/generated/query.ts +2723 -0
- package/src/index.ts +75 -0
- package/src/message-size.ts +75 -0
- package/src/metadata-conversion.ts +46 -0
- package/src/outbound-stream.ts +52 -0
- package/src/platform-service.ts +361 -0
- package/src/shutdown-latch.ts +97 -0
|
@@ -0,0 +1,2419 @@
|
|
|
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: control.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
+
import type { CallContext, CallOptions } from "nice-grpc-common";
|
|
10
|
+
import { InstructionAck, InstructionResult } from "./common.js";
|
|
11
|
+
|
|
12
|
+
export const protobufPackage = "io.axoniq.axonserver.grpc.control";
|
|
13
|
+
|
|
14
|
+
export enum UpdateType {
|
|
15
|
+
/** ADD_COMMAND_HANDLER - a new command handler has been added */
|
|
16
|
+
ADD_COMMAND_HANDLER = 0,
|
|
17
|
+
/** REMOVE_COMMAND_HANDLER - a command handler has been removed */
|
|
18
|
+
REMOVE_COMMAND_HANDLER = 1,
|
|
19
|
+
/** ADD_QUERY_HANDLER - a new query handler has been added */
|
|
20
|
+
ADD_QUERY_HANDLER = 2,
|
|
21
|
+
/** REMOVE_QUERY_HANDLER - a query handler has been removed */
|
|
22
|
+
REMOVE_QUERY_HANDLER = 3,
|
|
23
|
+
/** RESET_ALL - reset all information in the client, new information will be sent */
|
|
24
|
+
RESET_ALL = 4,
|
|
25
|
+
UNRECOGNIZED = -1,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function updateTypeFromJSON(object: any): UpdateType {
|
|
29
|
+
switch (object) {
|
|
30
|
+
case 0:
|
|
31
|
+
case "ADD_COMMAND_HANDLER":
|
|
32
|
+
return UpdateType.ADD_COMMAND_HANDLER;
|
|
33
|
+
case 1:
|
|
34
|
+
case "REMOVE_COMMAND_HANDLER":
|
|
35
|
+
return UpdateType.REMOVE_COMMAND_HANDLER;
|
|
36
|
+
case 2:
|
|
37
|
+
case "ADD_QUERY_HANDLER":
|
|
38
|
+
return UpdateType.ADD_QUERY_HANDLER;
|
|
39
|
+
case 3:
|
|
40
|
+
case "REMOVE_QUERY_HANDLER":
|
|
41
|
+
return UpdateType.REMOVE_QUERY_HANDLER;
|
|
42
|
+
case 4:
|
|
43
|
+
case "RESET_ALL":
|
|
44
|
+
return UpdateType.RESET_ALL;
|
|
45
|
+
case -1:
|
|
46
|
+
case "UNRECOGNIZED":
|
|
47
|
+
default:
|
|
48
|
+
return UpdateType.UNRECOGNIZED;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function updateTypeToJSON(object: UpdateType): string {
|
|
53
|
+
switch (object) {
|
|
54
|
+
case UpdateType.ADD_COMMAND_HANDLER:
|
|
55
|
+
return "ADD_COMMAND_HANDLER";
|
|
56
|
+
case UpdateType.REMOVE_COMMAND_HANDLER:
|
|
57
|
+
return "REMOVE_COMMAND_HANDLER";
|
|
58
|
+
case UpdateType.ADD_QUERY_HANDLER:
|
|
59
|
+
return "ADD_QUERY_HANDLER";
|
|
60
|
+
case UpdateType.REMOVE_QUERY_HANDLER:
|
|
61
|
+
return "REMOVE_QUERY_HANDLER";
|
|
62
|
+
case UpdateType.RESET_ALL:
|
|
63
|
+
return "RESET_ALL";
|
|
64
|
+
case UpdateType.UNRECOGNIZED:
|
|
65
|
+
default:
|
|
66
|
+
return "UNRECOGNIZED";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** An instruction from Application Node to the AxonServer platform */
|
|
71
|
+
export interface PlatformInboundInstruction {
|
|
72
|
+
/**
|
|
73
|
+
* Information about the client being connected.
|
|
74
|
+
* This information is used by AxonServer to monitor the topology of connected applications.
|
|
75
|
+
*/
|
|
76
|
+
register?:
|
|
77
|
+
| ClientIdentification
|
|
78
|
+
| undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Information about Processors defined in the application.
|
|
81
|
+
* This information is used by Axon Server to monitor the progress of Event Processors across instances.
|
|
82
|
+
*/
|
|
83
|
+
eventProcessorInfo?:
|
|
84
|
+
| EventProcessorInfo
|
|
85
|
+
| undefined;
|
|
86
|
+
/** This heartbeat is used by AxonServer in order to check if the connection is still alive */
|
|
87
|
+
heartbeat?:
|
|
88
|
+
| Heartbeat
|
|
89
|
+
| undefined;
|
|
90
|
+
/** Acknowledgement of previously sent instruction via outbound stream */
|
|
91
|
+
ack?:
|
|
92
|
+
| InstructionAck
|
|
93
|
+
| undefined;
|
|
94
|
+
/** The result of the execution of an instruction */
|
|
95
|
+
result?:
|
|
96
|
+
| InstructionResult
|
|
97
|
+
| undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Subscribe to topology changes in the AxonServer cluster.
|
|
100
|
+
* This allows the client to receive updates about changes in the cluster, such as handler additions or removals.
|
|
101
|
+
*/
|
|
102
|
+
subscribeTopologyChanges?:
|
|
103
|
+
| SubscribeTopologyChanges
|
|
104
|
+
| undefined;
|
|
105
|
+
/** Unsubscribe from topology changes in the AxonServer cluster. */
|
|
106
|
+
unsubscribeTopologyChanges?:
|
|
107
|
+
| UnsubscribeTopologyChanges
|
|
108
|
+
| undefined;
|
|
109
|
+
/** Instruction identifier. If this identifier is set, this instruction will be acknowledged via outbound stream */
|
|
110
|
+
instructionId: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Message to subscribe to topology changes within the control channel's context */
|
|
114
|
+
export interface SubscribeTopologyChanges {
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Message to unsubscribe from topology changes within the control channel's context */
|
|
118
|
+
export interface UnsubscribeTopologyChanges {
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** An instruction or information from the AxonServer Platform to the Application Node */
|
|
122
|
+
export interface PlatformOutboundInstruction {
|
|
123
|
+
/** Information provided by AxonServer which provides information about the AxonServer node the application is connected with */
|
|
124
|
+
nodeNotification?:
|
|
125
|
+
| NodeInfo
|
|
126
|
+
| undefined;
|
|
127
|
+
/**
|
|
128
|
+
* A request from AxonServer to the Application to migrate its connection to another node.
|
|
129
|
+
* Clients SHOULD honor this request by closing their current connection, and using the GetPlatformServer RPC
|
|
130
|
+
* to request a new destination.
|
|
131
|
+
*/
|
|
132
|
+
requestReconnect?:
|
|
133
|
+
| RequestReconnect
|
|
134
|
+
| undefined;
|
|
135
|
+
/** Instruction from AxonServer to Pause a Streaming Event Processor. */
|
|
136
|
+
pauseEventProcessor?:
|
|
137
|
+
| EventProcessorReference
|
|
138
|
+
| undefined;
|
|
139
|
+
/** Instruction from AxonServer to Start a Streaming Event Processor. */
|
|
140
|
+
startEventProcessor?:
|
|
141
|
+
| EventProcessorReference
|
|
142
|
+
| undefined;
|
|
143
|
+
/** Instruction from AxonServer to Release a specific segment in a Streaming Event Processor */
|
|
144
|
+
releaseSegment?:
|
|
145
|
+
| EventProcessorSegmentReference
|
|
146
|
+
| undefined;
|
|
147
|
+
/** A request from AxonServer for status information of a specific Streaming Event Processor */
|
|
148
|
+
requestEventProcessorInfo?:
|
|
149
|
+
| EventProcessorReference
|
|
150
|
+
| undefined;
|
|
151
|
+
/** Instruction to split a Segment in a Streaming Event Processor */
|
|
152
|
+
splitEventProcessorSegment?:
|
|
153
|
+
| EventProcessorSegmentReference
|
|
154
|
+
| undefined;
|
|
155
|
+
/** Instruction to merge two Segments in a Streaming Event Processor */
|
|
156
|
+
mergeEventProcessorSegment?:
|
|
157
|
+
| EventProcessorSegmentReference
|
|
158
|
+
| undefined;
|
|
159
|
+
/** This heartbeat is used by AxonFramework in order to check if the connection is still alive */
|
|
160
|
+
heartbeat?:
|
|
161
|
+
| Heartbeat
|
|
162
|
+
| undefined;
|
|
163
|
+
/** Acknowledgement of previously sent instruction via inbound stream */
|
|
164
|
+
ack?:
|
|
165
|
+
| InstructionAck
|
|
166
|
+
| undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Notification of a change in the topology of the AxonServer cluster.
|
|
169
|
+
* This is used to inform clients about changes in the cluster, such as handler additions or removals.
|
|
170
|
+
*/
|
|
171
|
+
topologyChange?:
|
|
172
|
+
| TopologyChange
|
|
173
|
+
| undefined;
|
|
174
|
+
/** Instruction identifier. If this identifier is set, this instruction will be acknowledged via inbound stream */
|
|
175
|
+
instructionId: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** Message send when AxonServer requests the client to re-establish its connection with the Platform */
|
|
179
|
+
export interface RequestReconnect {
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** Message containing connection information of the node to Connect with */
|
|
183
|
+
export interface PlatformInfo {
|
|
184
|
+
/** The connection details of the node the client should connect with */
|
|
185
|
+
primary:
|
|
186
|
+
| NodeInfo
|
|
187
|
+
| undefined;
|
|
188
|
+
/**
|
|
189
|
+
* Flag indicating that the connection may be reused to connect. When true, the client _may_ reuse the connection
|
|
190
|
+
* established for the GetPlatformServer request for subsequent requests.
|
|
191
|
+
*/
|
|
192
|
+
sameConnection: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Message containing connection information for an AxonServer Node */
|
|
196
|
+
export interface NodeInfo {
|
|
197
|
+
/** The host name to use when connecting to this node */
|
|
198
|
+
hostName: string;
|
|
199
|
+
/** The port number for gRPC connections */
|
|
200
|
+
grpcPort: number;
|
|
201
|
+
/** The port number for HTTP connections */
|
|
202
|
+
httpPort: number;
|
|
203
|
+
/** The version identifier of the API */
|
|
204
|
+
version: number;
|
|
205
|
+
/** The unique name of the node to connect with, for purpose of debugging */
|
|
206
|
+
nodeName: string;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** Message containing details about the Client Application */
|
|
210
|
+
export interface ClientIdentification {
|
|
211
|
+
/** A unique identifier for this client instance. Is used to distinguish different instances of the same component */
|
|
212
|
+
clientId: string;
|
|
213
|
+
/** The name of the component. Several instances of the same component should share this name */
|
|
214
|
+
componentName: string;
|
|
215
|
+
/** Any tags associated with the client, which may provide hints and preferences for setting up connections */
|
|
216
|
+
tags: { [key: string]: string };
|
|
217
|
+
/** Axon framework version used by the client application instance */
|
|
218
|
+
version: string;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface ClientIdentification_TagsEntry {
|
|
222
|
+
key: string;
|
|
223
|
+
value: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** Message containing information about the status of an Event Processor */
|
|
227
|
+
export interface EventProcessorInfo {
|
|
228
|
+
/** The logical name of this processor. */
|
|
229
|
+
processorName: string;
|
|
230
|
+
/** The mode in which this processor is reading Events, for example: 'Tracking' or 'Subscribing' */
|
|
231
|
+
mode: string;
|
|
232
|
+
/** The number of threads currently actively processing Events */
|
|
233
|
+
activeThreads: number;
|
|
234
|
+
/** Flag indicating whether the processor is running */
|
|
235
|
+
running: boolean;
|
|
236
|
+
/** Flag indicating whether the processor, when stopped, did so because of an irrecoverable Error */
|
|
237
|
+
error: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Status details of each of the Segments for which Events are being processed. This is only provided by Streaming
|
|
240
|
+
* Event Processors.
|
|
241
|
+
*/
|
|
242
|
+
segmentStatus: EventProcessorInfo_SegmentStatus[];
|
|
243
|
+
/**
|
|
244
|
+
* The number of threads the processor has available to assign to Segments.
|
|
245
|
+
* Will report 0 if all threads are assigned a Segment.
|
|
246
|
+
*/
|
|
247
|
+
availableThreads: number;
|
|
248
|
+
/** The Token Store Identifier if available. This is only provided by Streaming Event Processors. */
|
|
249
|
+
tokenStoreIdentifier: string;
|
|
250
|
+
/**
|
|
251
|
+
* Flag indicating whether the processor is a Streaming Event Processor.
|
|
252
|
+
* This dictates whether streaming operations, like split and merge, are supported by this processor.
|
|
253
|
+
*/
|
|
254
|
+
isStreamingProcessor: boolean;
|
|
255
|
+
/** current load balancing strategy name for the event processor */
|
|
256
|
+
loadBalancingStrategyName: string;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/** Message containing information about the status of a Segment of a Streaming Event Processor */
|
|
260
|
+
export interface EventProcessorInfo_SegmentStatus {
|
|
261
|
+
/** The ID of the Segment for which the status is reported */
|
|
262
|
+
segmentId: number;
|
|
263
|
+
/** Indicates whether the Segment has "Caught Up" with the Head of the Event Stream */
|
|
264
|
+
caughtUp: boolean;
|
|
265
|
+
/** Indicates whether the Segment is "Replaying" historic events after a Reset. */
|
|
266
|
+
replaying: boolean;
|
|
267
|
+
/** The fraction this segment processes. A fraction of 2 means 1/2, 4 means 1/4, etc. */
|
|
268
|
+
onePartOf: number;
|
|
269
|
+
/** The approximate position of the token in the stream. */
|
|
270
|
+
tokenPosition: bigint;
|
|
271
|
+
/** Information about the error state of the Segment, if applicable. */
|
|
272
|
+
errorState: string;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/** Message providing reference to an Event Processor */
|
|
276
|
+
export interface EventProcessorReference {
|
|
277
|
+
/** The name of the Event Processor */
|
|
278
|
+
processorName: string;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** Message providing reference to a Segment of an Event Processor */
|
|
282
|
+
export interface EventProcessorSegmentReference {
|
|
283
|
+
/** The name of the Event Processor */
|
|
284
|
+
processorName: string;
|
|
285
|
+
/** The identifier of the Segment */
|
|
286
|
+
segmentIdentifier: number;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface Heartbeat {
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export interface TopologyChange {
|
|
293
|
+
updateType: UpdateType;
|
|
294
|
+
context: string;
|
|
295
|
+
/** The client ID of the component requesting the update */
|
|
296
|
+
clientId: string;
|
|
297
|
+
/** The client ID of the component requesting the update */
|
|
298
|
+
clientStreamId: string;
|
|
299
|
+
/** The name of the component requesting the update */
|
|
300
|
+
componentName: string;
|
|
301
|
+
/** The subscription ID to add or remove */
|
|
302
|
+
command?:
|
|
303
|
+
| CommandSubscription
|
|
304
|
+
| undefined;
|
|
305
|
+
/** The processor name to add or remove */
|
|
306
|
+
query?: QuerySubscription | undefined;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export interface CommandSubscription {
|
|
310
|
+
/** The subscription ID to add or remove */
|
|
311
|
+
name: string;
|
|
312
|
+
/** The load factor for the subscription */
|
|
313
|
+
loadFactor: number;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface QuerySubscription {
|
|
317
|
+
/** The subscription ID to add or remove */
|
|
318
|
+
name: string;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function createBasePlatformInboundInstruction(): PlatformInboundInstruction {
|
|
322
|
+
return {
|
|
323
|
+
register: undefined,
|
|
324
|
+
eventProcessorInfo: undefined,
|
|
325
|
+
heartbeat: undefined,
|
|
326
|
+
ack: undefined,
|
|
327
|
+
result: undefined,
|
|
328
|
+
subscribeTopologyChanges: undefined,
|
|
329
|
+
unsubscribeTopologyChanges: undefined,
|
|
330
|
+
instructionId: "",
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
export const PlatformInboundInstruction: MessageFns<PlatformInboundInstruction> = {
|
|
335
|
+
encode(message: PlatformInboundInstruction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
336
|
+
if (message.register !== undefined) {
|
|
337
|
+
ClientIdentification.encode(message.register, writer.uint32(10).fork()).join();
|
|
338
|
+
}
|
|
339
|
+
if (message.eventProcessorInfo !== undefined) {
|
|
340
|
+
EventProcessorInfo.encode(message.eventProcessorInfo, writer.uint32(18).fork()).join();
|
|
341
|
+
}
|
|
342
|
+
if (message.heartbeat !== undefined) {
|
|
343
|
+
Heartbeat.encode(message.heartbeat, writer.uint32(26).fork()).join();
|
|
344
|
+
}
|
|
345
|
+
if (message.ack !== undefined) {
|
|
346
|
+
InstructionAck.encode(message.ack, writer.uint32(34).fork()).join();
|
|
347
|
+
}
|
|
348
|
+
if (message.result !== undefined) {
|
|
349
|
+
InstructionResult.encode(message.result, writer.uint32(50).fork()).join();
|
|
350
|
+
}
|
|
351
|
+
if (message.subscribeTopologyChanges !== undefined) {
|
|
352
|
+
SubscribeTopologyChanges.encode(message.subscribeTopologyChanges, writer.uint32(58).fork()).join();
|
|
353
|
+
}
|
|
354
|
+
if (message.unsubscribeTopologyChanges !== undefined) {
|
|
355
|
+
UnsubscribeTopologyChanges.encode(message.unsubscribeTopologyChanges, writer.uint32(66).fork()).join();
|
|
356
|
+
}
|
|
357
|
+
if (message.instructionId !== "") {
|
|
358
|
+
writer.uint32(42).string(message.instructionId);
|
|
359
|
+
}
|
|
360
|
+
return writer;
|
|
361
|
+
},
|
|
362
|
+
|
|
363
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PlatformInboundInstruction {
|
|
364
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
365
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
366
|
+
const message = createBasePlatformInboundInstruction();
|
|
367
|
+
while (reader.pos < end) {
|
|
368
|
+
const tag = reader.uint32();
|
|
369
|
+
switch (tag >>> 3) {
|
|
370
|
+
case 1: {
|
|
371
|
+
if (tag !== 10) {
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
message.register = ClientIdentification.decode(reader, reader.uint32());
|
|
376
|
+
continue;
|
|
377
|
+
}
|
|
378
|
+
case 2: {
|
|
379
|
+
if (tag !== 18) {
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
message.eventProcessorInfo = EventProcessorInfo.decode(reader, reader.uint32());
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
case 3: {
|
|
387
|
+
if (tag !== 26) {
|
|
388
|
+
break;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
message.heartbeat = Heartbeat.decode(reader, reader.uint32());
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
case 4: {
|
|
395
|
+
if (tag !== 34) {
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
message.ack = InstructionAck.decode(reader, reader.uint32());
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
case 6: {
|
|
403
|
+
if (tag !== 50) {
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
message.result = InstructionResult.decode(reader, reader.uint32());
|
|
408
|
+
continue;
|
|
409
|
+
}
|
|
410
|
+
case 7: {
|
|
411
|
+
if (tag !== 58) {
|
|
412
|
+
break;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
message.subscribeTopologyChanges = SubscribeTopologyChanges.decode(reader, reader.uint32());
|
|
416
|
+
continue;
|
|
417
|
+
}
|
|
418
|
+
case 8: {
|
|
419
|
+
if (tag !== 66) {
|
|
420
|
+
break;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
message.unsubscribeTopologyChanges = UnsubscribeTopologyChanges.decode(reader, reader.uint32());
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
case 5: {
|
|
427
|
+
if (tag !== 42) {
|
|
428
|
+
break;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
message.instructionId = reader.string();
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
436
|
+
break;
|
|
437
|
+
}
|
|
438
|
+
reader.skip(tag & 7);
|
|
439
|
+
}
|
|
440
|
+
return message;
|
|
441
|
+
},
|
|
442
|
+
|
|
443
|
+
fromJSON(object: any): PlatformInboundInstruction {
|
|
444
|
+
return {
|
|
445
|
+
register: isSet(object.register) ? ClientIdentification.fromJSON(object.register) : undefined,
|
|
446
|
+
eventProcessorInfo: isSet(object.eventProcessorInfo)
|
|
447
|
+
? EventProcessorInfo.fromJSON(object.eventProcessorInfo)
|
|
448
|
+
: isSet(object.event_processor_info)
|
|
449
|
+
? EventProcessorInfo.fromJSON(object.event_processor_info)
|
|
450
|
+
: undefined,
|
|
451
|
+
heartbeat: isSet(object.heartbeat) ? Heartbeat.fromJSON(object.heartbeat) : undefined,
|
|
452
|
+
ack: isSet(object.ack) ? InstructionAck.fromJSON(object.ack) : undefined,
|
|
453
|
+
result: isSet(object.result) ? InstructionResult.fromJSON(object.result) : undefined,
|
|
454
|
+
subscribeTopologyChanges: isSet(object.subscribeTopologyChanges)
|
|
455
|
+
? SubscribeTopologyChanges.fromJSON(object.subscribeTopologyChanges)
|
|
456
|
+
: isSet(object.subscribe_topology_changes)
|
|
457
|
+
? SubscribeTopologyChanges.fromJSON(object.subscribe_topology_changes)
|
|
458
|
+
: undefined,
|
|
459
|
+
unsubscribeTopologyChanges: isSet(object.unsubscribeTopologyChanges)
|
|
460
|
+
? UnsubscribeTopologyChanges.fromJSON(object.unsubscribeTopologyChanges)
|
|
461
|
+
: isSet(object.unsubscribe_topology_changes)
|
|
462
|
+
? UnsubscribeTopologyChanges.fromJSON(object.unsubscribe_topology_changes)
|
|
463
|
+
: undefined,
|
|
464
|
+
instructionId: isSet(object.instructionId)
|
|
465
|
+
? globalThis.String(object.instructionId)
|
|
466
|
+
: isSet(object.instruction_id)
|
|
467
|
+
? globalThis.String(object.instruction_id)
|
|
468
|
+
: "",
|
|
469
|
+
};
|
|
470
|
+
},
|
|
471
|
+
|
|
472
|
+
toJSON(message: PlatformInboundInstruction): unknown {
|
|
473
|
+
const obj: any = {};
|
|
474
|
+
if (message.register !== undefined) {
|
|
475
|
+
obj.register = ClientIdentification.toJSON(message.register);
|
|
476
|
+
}
|
|
477
|
+
if (message.eventProcessorInfo !== undefined) {
|
|
478
|
+
obj.eventProcessorInfo = EventProcessorInfo.toJSON(message.eventProcessorInfo);
|
|
479
|
+
}
|
|
480
|
+
if (message.heartbeat !== undefined) {
|
|
481
|
+
obj.heartbeat = Heartbeat.toJSON(message.heartbeat);
|
|
482
|
+
}
|
|
483
|
+
if (message.ack !== undefined) {
|
|
484
|
+
obj.ack = InstructionAck.toJSON(message.ack);
|
|
485
|
+
}
|
|
486
|
+
if (message.result !== undefined) {
|
|
487
|
+
obj.result = InstructionResult.toJSON(message.result);
|
|
488
|
+
}
|
|
489
|
+
if (message.subscribeTopologyChanges !== undefined) {
|
|
490
|
+
obj.subscribeTopologyChanges = SubscribeTopologyChanges.toJSON(message.subscribeTopologyChanges);
|
|
491
|
+
}
|
|
492
|
+
if (message.unsubscribeTopologyChanges !== undefined) {
|
|
493
|
+
obj.unsubscribeTopologyChanges = UnsubscribeTopologyChanges.toJSON(message.unsubscribeTopologyChanges);
|
|
494
|
+
}
|
|
495
|
+
if (message.instructionId !== "") {
|
|
496
|
+
obj.instructionId = message.instructionId;
|
|
497
|
+
}
|
|
498
|
+
return obj;
|
|
499
|
+
},
|
|
500
|
+
|
|
501
|
+
create(base?: DeepPartial<PlatformInboundInstruction>): PlatformInboundInstruction {
|
|
502
|
+
return PlatformInboundInstruction.fromPartial(base ?? {});
|
|
503
|
+
},
|
|
504
|
+
fromPartial(object: DeepPartial<PlatformInboundInstruction>): PlatformInboundInstruction {
|
|
505
|
+
const message = createBasePlatformInboundInstruction();
|
|
506
|
+
message.register = (object.register !== undefined && object.register !== null)
|
|
507
|
+
? ClientIdentification.fromPartial(object.register)
|
|
508
|
+
: undefined;
|
|
509
|
+
message.eventProcessorInfo = (object.eventProcessorInfo !== undefined && object.eventProcessorInfo !== null)
|
|
510
|
+
? EventProcessorInfo.fromPartial(object.eventProcessorInfo)
|
|
511
|
+
: undefined;
|
|
512
|
+
message.heartbeat = (object.heartbeat !== undefined && object.heartbeat !== null)
|
|
513
|
+
? Heartbeat.fromPartial(object.heartbeat)
|
|
514
|
+
: undefined;
|
|
515
|
+
message.ack = (object.ack !== undefined && object.ack !== null)
|
|
516
|
+
? InstructionAck.fromPartial(object.ack)
|
|
517
|
+
: undefined;
|
|
518
|
+
message.result = (object.result !== undefined && object.result !== null)
|
|
519
|
+
? InstructionResult.fromPartial(object.result)
|
|
520
|
+
: undefined;
|
|
521
|
+
message.subscribeTopologyChanges =
|
|
522
|
+
(object.subscribeTopologyChanges !== undefined && object.subscribeTopologyChanges !== null)
|
|
523
|
+
? SubscribeTopologyChanges.fromPartial(object.subscribeTopologyChanges)
|
|
524
|
+
: undefined;
|
|
525
|
+
message.unsubscribeTopologyChanges =
|
|
526
|
+
(object.unsubscribeTopologyChanges !== undefined && object.unsubscribeTopologyChanges !== null)
|
|
527
|
+
? UnsubscribeTopologyChanges.fromPartial(object.unsubscribeTopologyChanges)
|
|
528
|
+
: undefined;
|
|
529
|
+
message.instructionId = object.instructionId ?? "";
|
|
530
|
+
return message;
|
|
531
|
+
},
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
function createBaseSubscribeTopologyChanges(): SubscribeTopologyChanges {
|
|
535
|
+
return {};
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export const SubscribeTopologyChanges: MessageFns<SubscribeTopologyChanges> = {
|
|
539
|
+
encode(_: SubscribeTopologyChanges, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
540
|
+
return writer;
|
|
541
|
+
},
|
|
542
|
+
|
|
543
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SubscribeTopologyChanges {
|
|
544
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
545
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
546
|
+
const message = createBaseSubscribeTopologyChanges();
|
|
547
|
+
while (reader.pos < end) {
|
|
548
|
+
const tag = reader.uint32();
|
|
549
|
+
switch (tag >>> 3) {
|
|
550
|
+
}
|
|
551
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
reader.skip(tag & 7);
|
|
555
|
+
}
|
|
556
|
+
return message;
|
|
557
|
+
},
|
|
558
|
+
|
|
559
|
+
fromJSON(_: any): SubscribeTopologyChanges {
|
|
560
|
+
return {};
|
|
561
|
+
},
|
|
562
|
+
|
|
563
|
+
toJSON(_: SubscribeTopologyChanges): unknown {
|
|
564
|
+
const obj: any = {};
|
|
565
|
+
return obj;
|
|
566
|
+
},
|
|
567
|
+
|
|
568
|
+
create(base?: DeepPartial<SubscribeTopologyChanges>): SubscribeTopologyChanges {
|
|
569
|
+
return SubscribeTopologyChanges.fromPartial(base ?? {});
|
|
570
|
+
},
|
|
571
|
+
fromPartial(_: DeepPartial<SubscribeTopologyChanges>): SubscribeTopologyChanges {
|
|
572
|
+
const message = createBaseSubscribeTopologyChanges();
|
|
573
|
+
return message;
|
|
574
|
+
},
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
function createBaseUnsubscribeTopologyChanges(): UnsubscribeTopologyChanges {
|
|
578
|
+
return {};
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export const UnsubscribeTopologyChanges: MessageFns<UnsubscribeTopologyChanges> = {
|
|
582
|
+
encode(_: UnsubscribeTopologyChanges, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
583
|
+
return writer;
|
|
584
|
+
},
|
|
585
|
+
|
|
586
|
+
decode(input: BinaryReader | Uint8Array, length?: number): UnsubscribeTopologyChanges {
|
|
587
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
588
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
589
|
+
const message = createBaseUnsubscribeTopologyChanges();
|
|
590
|
+
while (reader.pos < end) {
|
|
591
|
+
const tag = reader.uint32();
|
|
592
|
+
switch (tag >>> 3) {
|
|
593
|
+
}
|
|
594
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
597
|
+
reader.skip(tag & 7);
|
|
598
|
+
}
|
|
599
|
+
return message;
|
|
600
|
+
},
|
|
601
|
+
|
|
602
|
+
fromJSON(_: any): UnsubscribeTopologyChanges {
|
|
603
|
+
return {};
|
|
604
|
+
},
|
|
605
|
+
|
|
606
|
+
toJSON(_: UnsubscribeTopologyChanges): unknown {
|
|
607
|
+
const obj: any = {};
|
|
608
|
+
return obj;
|
|
609
|
+
},
|
|
610
|
+
|
|
611
|
+
create(base?: DeepPartial<UnsubscribeTopologyChanges>): UnsubscribeTopologyChanges {
|
|
612
|
+
return UnsubscribeTopologyChanges.fromPartial(base ?? {});
|
|
613
|
+
},
|
|
614
|
+
fromPartial(_: DeepPartial<UnsubscribeTopologyChanges>): UnsubscribeTopologyChanges {
|
|
615
|
+
const message = createBaseUnsubscribeTopologyChanges();
|
|
616
|
+
return message;
|
|
617
|
+
},
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
function createBasePlatformOutboundInstruction(): PlatformOutboundInstruction {
|
|
621
|
+
return {
|
|
622
|
+
nodeNotification: undefined,
|
|
623
|
+
requestReconnect: undefined,
|
|
624
|
+
pauseEventProcessor: undefined,
|
|
625
|
+
startEventProcessor: undefined,
|
|
626
|
+
releaseSegment: undefined,
|
|
627
|
+
requestEventProcessorInfo: undefined,
|
|
628
|
+
splitEventProcessorSegment: undefined,
|
|
629
|
+
mergeEventProcessorSegment: undefined,
|
|
630
|
+
heartbeat: undefined,
|
|
631
|
+
ack: undefined,
|
|
632
|
+
topologyChange: undefined,
|
|
633
|
+
instructionId: "",
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export const PlatformOutboundInstruction: MessageFns<PlatformOutboundInstruction> = {
|
|
638
|
+
encode(message: PlatformOutboundInstruction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
639
|
+
if (message.nodeNotification !== undefined) {
|
|
640
|
+
NodeInfo.encode(message.nodeNotification, writer.uint32(10).fork()).join();
|
|
641
|
+
}
|
|
642
|
+
if (message.requestReconnect !== undefined) {
|
|
643
|
+
RequestReconnect.encode(message.requestReconnect, writer.uint32(26).fork()).join();
|
|
644
|
+
}
|
|
645
|
+
if (message.pauseEventProcessor !== undefined) {
|
|
646
|
+
EventProcessorReference.encode(message.pauseEventProcessor, writer.uint32(34).fork()).join();
|
|
647
|
+
}
|
|
648
|
+
if (message.startEventProcessor !== undefined) {
|
|
649
|
+
EventProcessorReference.encode(message.startEventProcessor, writer.uint32(42).fork()).join();
|
|
650
|
+
}
|
|
651
|
+
if (message.releaseSegment !== undefined) {
|
|
652
|
+
EventProcessorSegmentReference.encode(message.releaseSegment, writer.uint32(50).fork()).join();
|
|
653
|
+
}
|
|
654
|
+
if (message.requestEventProcessorInfo !== undefined) {
|
|
655
|
+
EventProcessorReference.encode(message.requestEventProcessorInfo, writer.uint32(58).fork()).join();
|
|
656
|
+
}
|
|
657
|
+
if (message.splitEventProcessorSegment !== undefined) {
|
|
658
|
+
EventProcessorSegmentReference.encode(message.splitEventProcessorSegment, writer.uint32(66).fork()).join();
|
|
659
|
+
}
|
|
660
|
+
if (message.mergeEventProcessorSegment !== undefined) {
|
|
661
|
+
EventProcessorSegmentReference.encode(message.mergeEventProcessorSegment, writer.uint32(74).fork()).join();
|
|
662
|
+
}
|
|
663
|
+
if (message.heartbeat !== undefined) {
|
|
664
|
+
Heartbeat.encode(message.heartbeat, writer.uint32(82).fork()).join();
|
|
665
|
+
}
|
|
666
|
+
if (message.ack !== undefined) {
|
|
667
|
+
InstructionAck.encode(message.ack, writer.uint32(90).fork()).join();
|
|
668
|
+
}
|
|
669
|
+
if (message.topologyChange !== undefined) {
|
|
670
|
+
TopologyChange.encode(message.topologyChange, writer.uint32(106).fork()).join();
|
|
671
|
+
}
|
|
672
|
+
if (message.instructionId !== "") {
|
|
673
|
+
writer.uint32(98).string(message.instructionId);
|
|
674
|
+
}
|
|
675
|
+
return writer;
|
|
676
|
+
},
|
|
677
|
+
|
|
678
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PlatformOutboundInstruction {
|
|
679
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
680
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
681
|
+
const message = createBasePlatformOutboundInstruction();
|
|
682
|
+
while (reader.pos < end) {
|
|
683
|
+
const tag = reader.uint32();
|
|
684
|
+
switch (tag >>> 3) {
|
|
685
|
+
case 1: {
|
|
686
|
+
if (tag !== 10) {
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
message.nodeNotification = NodeInfo.decode(reader, reader.uint32());
|
|
691
|
+
continue;
|
|
692
|
+
}
|
|
693
|
+
case 3: {
|
|
694
|
+
if (tag !== 26) {
|
|
695
|
+
break;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
message.requestReconnect = RequestReconnect.decode(reader, reader.uint32());
|
|
699
|
+
continue;
|
|
700
|
+
}
|
|
701
|
+
case 4: {
|
|
702
|
+
if (tag !== 34) {
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
message.pauseEventProcessor = EventProcessorReference.decode(reader, reader.uint32());
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
709
|
+
case 5: {
|
|
710
|
+
if (tag !== 42) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
message.startEventProcessor = EventProcessorReference.decode(reader, reader.uint32());
|
|
715
|
+
continue;
|
|
716
|
+
}
|
|
717
|
+
case 6: {
|
|
718
|
+
if (tag !== 50) {
|
|
719
|
+
break;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
message.releaseSegment = EventProcessorSegmentReference.decode(reader, reader.uint32());
|
|
723
|
+
continue;
|
|
724
|
+
}
|
|
725
|
+
case 7: {
|
|
726
|
+
if (tag !== 58) {
|
|
727
|
+
break;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
message.requestEventProcessorInfo = EventProcessorReference.decode(reader, reader.uint32());
|
|
731
|
+
continue;
|
|
732
|
+
}
|
|
733
|
+
case 8: {
|
|
734
|
+
if (tag !== 66) {
|
|
735
|
+
break;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
message.splitEventProcessorSegment = EventProcessorSegmentReference.decode(reader, reader.uint32());
|
|
739
|
+
continue;
|
|
740
|
+
}
|
|
741
|
+
case 9: {
|
|
742
|
+
if (tag !== 74) {
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
message.mergeEventProcessorSegment = EventProcessorSegmentReference.decode(reader, reader.uint32());
|
|
747
|
+
continue;
|
|
748
|
+
}
|
|
749
|
+
case 10: {
|
|
750
|
+
if (tag !== 82) {
|
|
751
|
+
break;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
message.heartbeat = Heartbeat.decode(reader, reader.uint32());
|
|
755
|
+
continue;
|
|
756
|
+
}
|
|
757
|
+
case 11: {
|
|
758
|
+
if (tag !== 90) {
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
message.ack = InstructionAck.decode(reader, reader.uint32());
|
|
763
|
+
continue;
|
|
764
|
+
}
|
|
765
|
+
case 13: {
|
|
766
|
+
if (tag !== 106) {
|
|
767
|
+
break;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
message.topologyChange = TopologyChange.decode(reader, reader.uint32());
|
|
771
|
+
continue;
|
|
772
|
+
}
|
|
773
|
+
case 12: {
|
|
774
|
+
if (tag !== 98) {
|
|
775
|
+
break;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
message.instructionId = reader.string();
|
|
779
|
+
continue;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
reader.skip(tag & 7);
|
|
786
|
+
}
|
|
787
|
+
return message;
|
|
788
|
+
},
|
|
789
|
+
|
|
790
|
+
fromJSON(object: any): PlatformOutboundInstruction {
|
|
791
|
+
return {
|
|
792
|
+
nodeNotification: isSet(object.nodeNotification)
|
|
793
|
+
? NodeInfo.fromJSON(object.nodeNotification)
|
|
794
|
+
: isSet(object.node_notification)
|
|
795
|
+
? NodeInfo.fromJSON(object.node_notification)
|
|
796
|
+
: undefined,
|
|
797
|
+
requestReconnect: isSet(object.requestReconnect)
|
|
798
|
+
? RequestReconnect.fromJSON(object.requestReconnect)
|
|
799
|
+
: isSet(object.request_reconnect)
|
|
800
|
+
? RequestReconnect.fromJSON(object.request_reconnect)
|
|
801
|
+
: undefined,
|
|
802
|
+
pauseEventProcessor: isSet(object.pauseEventProcessor)
|
|
803
|
+
? EventProcessorReference.fromJSON(object.pauseEventProcessor)
|
|
804
|
+
: isSet(object.pause_event_processor)
|
|
805
|
+
? EventProcessorReference.fromJSON(object.pause_event_processor)
|
|
806
|
+
: undefined,
|
|
807
|
+
startEventProcessor: isSet(object.startEventProcessor)
|
|
808
|
+
? EventProcessorReference.fromJSON(object.startEventProcessor)
|
|
809
|
+
: isSet(object.start_event_processor)
|
|
810
|
+
? EventProcessorReference.fromJSON(object.start_event_processor)
|
|
811
|
+
: undefined,
|
|
812
|
+
releaseSegment: isSet(object.releaseSegment)
|
|
813
|
+
? EventProcessorSegmentReference.fromJSON(object.releaseSegment)
|
|
814
|
+
: isSet(object.release_segment)
|
|
815
|
+
? EventProcessorSegmentReference.fromJSON(object.release_segment)
|
|
816
|
+
: undefined,
|
|
817
|
+
requestEventProcessorInfo: isSet(object.requestEventProcessorInfo)
|
|
818
|
+
? EventProcessorReference.fromJSON(object.requestEventProcessorInfo)
|
|
819
|
+
: isSet(object.request_event_processor_info)
|
|
820
|
+
? EventProcessorReference.fromJSON(object.request_event_processor_info)
|
|
821
|
+
: undefined,
|
|
822
|
+
splitEventProcessorSegment: isSet(object.splitEventProcessorSegment)
|
|
823
|
+
? EventProcessorSegmentReference.fromJSON(object.splitEventProcessorSegment)
|
|
824
|
+
: isSet(object.split_event_processor_segment)
|
|
825
|
+
? EventProcessorSegmentReference.fromJSON(object.split_event_processor_segment)
|
|
826
|
+
: undefined,
|
|
827
|
+
mergeEventProcessorSegment: isSet(object.mergeEventProcessorSegment)
|
|
828
|
+
? EventProcessorSegmentReference.fromJSON(object.mergeEventProcessorSegment)
|
|
829
|
+
: isSet(object.merge_event_processor_segment)
|
|
830
|
+
? EventProcessorSegmentReference.fromJSON(object.merge_event_processor_segment)
|
|
831
|
+
: undefined,
|
|
832
|
+
heartbeat: isSet(object.heartbeat) ? Heartbeat.fromJSON(object.heartbeat) : undefined,
|
|
833
|
+
ack: isSet(object.ack) ? InstructionAck.fromJSON(object.ack) : undefined,
|
|
834
|
+
topologyChange: isSet(object.topologyChange)
|
|
835
|
+
? TopologyChange.fromJSON(object.topologyChange)
|
|
836
|
+
: isSet(object.topology_change)
|
|
837
|
+
? TopologyChange.fromJSON(object.topology_change)
|
|
838
|
+
: undefined,
|
|
839
|
+
instructionId: isSet(object.instructionId)
|
|
840
|
+
? globalThis.String(object.instructionId)
|
|
841
|
+
: isSet(object.instruction_id)
|
|
842
|
+
? globalThis.String(object.instruction_id)
|
|
843
|
+
: "",
|
|
844
|
+
};
|
|
845
|
+
},
|
|
846
|
+
|
|
847
|
+
toJSON(message: PlatformOutboundInstruction): unknown {
|
|
848
|
+
const obj: any = {};
|
|
849
|
+
if (message.nodeNotification !== undefined) {
|
|
850
|
+
obj.nodeNotification = NodeInfo.toJSON(message.nodeNotification);
|
|
851
|
+
}
|
|
852
|
+
if (message.requestReconnect !== undefined) {
|
|
853
|
+
obj.requestReconnect = RequestReconnect.toJSON(message.requestReconnect);
|
|
854
|
+
}
|
|
855
|
+
if (message.pauseEventProcessor !== undefined) {
|
|
856
|
+
obj.pauseEventProcessor = EventProcessorReference.toJSON(message.pauseEventProcessor);
|
|
857
|
+
}
|
|
858
|
+
if (message.startEventProcessor !== undefined) {
|
|
859
|
+
obj.startEventProcessor = EventProcessorReference.toJSON(message.startEventProcessor);
|
|
860
|
+
}
|
|
861
|
+
if (message.releaseSegment !== undefined) {
|
|
862
|
+
obj.releaseSegment = EventProcessorSegmentReference.toJSON(message.releaseSegment);
|
|
863
|
+
}
|
|
864
|
+
if (message.requestEventProcessorInfo !== undefined) {
|
|
865
|
+
obj.requestEventProcessorInfo = EventProcessorReference.toJSON(message.requestEventProcessorInfo);
|
|
866
|
+
}
|
|
867
|
+
if (message.splitEventProcessorSegment !== undefined) {
|
|
868
|
+
obj.splitEventProcessorSegment = EventProcessorSegmentReference.toJSON(message.splitEventProcessorSegment);
|
|
869
|
+
}
|
|
870
|
+
if (message.mergeEventProcessorSegment !== undefined) {
|
|
871
|
+
obj.mergeEventProcessorSegment = EventProcessorSegmentReference.toJSON(message.mergeEventProcessorSegment);
|
|
872
|
+
}
|
|
873
|
+
if (message.heartbeat !== undefined) {
|
|
874
|
+
obj.heartbeat = Heartbeat.toJSON(message.heartbeat);
|
|
875
|
+
}
|
|
876
|
+
if (message.ack !== undefined) {
|
|
877
|
+
obj.ack = InstructionAck.toJSON(message.ack);
|
|
878
|
+
}
|
|
879
|
+
if (message.topologyChange !== undefined) {
|
|
880
|
+
obj.topologyChange = TopologyChange.toJSON(message.topologyChange);
|
|
881
|
+
}
|
|
882
|
+
if (message.instructionId !== "") {
|
|
883
|
+
obj.instructionId = message.instructionId;
|
|
884
|
+
}
|
|
885
|
+
return obj;
|
|
886
|
+
},
|
|
887
|
+
|
|
888
|
+
create(base?: DeepPartial<PlatformOutboundInstruction>): PlatformOutboundInstruction {
|
|
889
|
+
return PlatformOutboundInstruction.fromPartial(base ?? {});
|
|
890
|
+
},
|
|
891
|
+
fromPartial(object: DeepPartial<PlatformOutboundInstruction>): PlatformOutboundInstruction {
|
|
892
|
+
const message = createBasePlatformOutboundInstruction();
|
|
893
|
+
message.nodeNotification = (object.nodeNotification !== undefined && object.nodeNotification !== null)
|
|
894
|
+
? NodeInfo.fromPartial(object.nodeNotification)
|
|
895
|
+
: undefined;
|
|
896
|
+
message.requestReconnect = (object.requestReconnect !== undefined && object.requestReconnect !== null)
|
|
897
|
+
? RequestReconnect.fromPartial(object.requestReconnect)
|
|
898
|
+
: undefined;
|
|
899
|
+
message.pauseEventProcessor = (object.pauseEventProcessor !== undefined && object.pauseEventProcessor !== null)
|
|
900
|
+
? EventProcessorReference.fromPartial(object.pauseEventProcessor)
|
|
901
|
+
: undefined;
|
|
902
|
+
message.startEventProcessor = (object.startEventProcessor !== undefined && object.startEventProcessor !== null)
|
|
903
|
+
? EventProcessorReference.fromPartial(object.startEventProcessor)
|
|
904
|
+
: undefined;
|
|
905
|
+
message.releaseSegment = (object.releaseSegment !== undefined && object.releaseSegment !== null)
|
|
906
|
+
? EventProcessorSegmentReference.fromPartial(object.releaseSegment)
|
|
907
|
+
: undefined;
|
|
908
|
+
message.requestEventProcessorInfo =
|
|
909
|
+
(object.requestEventProcessorInfo !== undefined && object.requestEventProcessorInfo !== null)
|
|
910
|
+
? EventProcessorReference.fromPartial(object.requestEventProcessorInfo)
|
|
911
|
+
: undefined;
|
|
912
|
+
message.splitEventProcessorSegment =
|
|
913
|
+
(object.splitEventProcessorSegment !== undefined && object.splitEventProcessorSegment !== null)
|
|
914
|
+
? EventProcessorSegmentReference.fromPartial(object.splitEventProcessorSegment)
|
|
915
|
+
: undefined;
|
|
916
|
+
message.mergeEventProcessorSegment =
|
|
917
|
+
(object.mergeEventProcessorSegment !== undefined && object.mergeEventProcessorSegment !== null)
|
|
918
|
+
? EventProcessorSegmentReference.fromPartial(object.mergeEventProcessorSegment)
|
|
919
|
+
: undefined;
|
|
920
|
+
message.heartbeat = (object.heartbeat !== undefined && object.heartbeat !== null)
|
|
921
|
+
? Heartbeat.fromPartial(object.heartbeat)
|
|
922
|
+
: undefined;
|
|
923
|
+
message.ack = (object.ack !== undefined && object.ack !== null)
|
|
924
|
+
? InstructionAck.fromPartial(object.ack)
|
|
925
|
+
: undefined;
|
|
926
|
+
message.topologyChange = (object.topologyChange !== undefined && object.topologyChange !== null)
|
|
927
|
+
? TopologyChange.fromPartial(object.topologyChange)
|
|
928
|
+
: undefined;
|
|
929
|
+
message.instructionId = object.instructionId ?? "";
|
|
930
|
+
return message;
|
|
931
|
+
},
|
|
932
|
+
};
|
|
933
|
+
|
|
934
|
+
function createBaseRequestReconnect(): RequestReconnect {
|
|
935
|
+
return {};
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
export const RequestReconnect: MessageFns<RequestReconnect> = {
|
|
939
|
+
encode(_: RequestReconnect, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
940
|
+
return writer;
|
|
941
|
+
},
|
|
942
|
+
|
|
943
|
+
decode(input: BinaryReader | Uint8Array, length?: number): RequestReconnect {
|
|
944
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
945
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
946
|
+
const message = createBaseRequestReconnect();
|
|
947
|
+
while (reader.pos < end) {
|
|
948
|
+
const tag = reader.uint32();
|
|
949
|
+
switch (tag >>> 3) {
|
|
950
|
+
}
|
|
951
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
reader.skip(tag & 7);
|
|
955
|
+
}
|
|
956
|
+
return message;
|
|
957
|
+
},
|
|
958
|
+
|
|
959
|
+
fromJSON(_: any): RequestReconnect {
|
|
960
|
+
return {};
|
|
961
|
+
},
|
|
962
|
+
|
|
963
|
+
toJSON(_: RequestReconnect): unknown {
|
|
964
|
+
const obj: any = {};
|
|
965
|
+
return obj;
|
|
966
|
+
},
|
|
967
|
+
|
|
968
|
+
create(base?: DeepPartial<RequestReconnect>): RequestReconnect {
|
|
969
|
+
return RequestReconnect.fromPartial(base ?? {});
|
|
970
|
+
},
|
|
971
|
+
fromPartial(_: DeepPartial<RequestReconnect>): RequestReconnect {
|
|
972
|
+
const message = createBaseRequestReconnect();
|
|
973
|
+
return message;
|
|
974
|
+
},
|
|
975
|
+
};
|
|
976
|
+
|
|
977
|
+
function createBasePlatformInfo(): PlatformInfo {
|
|
978
|
+
return { primary: undefined, sameConnection: false };
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
export const PlatformInfo: MessageFns<PlatformInfo> = {
|
|
982
|
+
encode(message: PlatformInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
983
|
+
if (message.primary !== undefined) {
|
|
984
|
+
NodeInfo.encode(message.primary, writer.uint32(10).fork()).join();
|
|
985
|
+
}
|
|
986
|
+
if (message.sameConnection !== false) {
|
|
987
|
+
writer.uint32(16).bool(message.sameConnection);
|
|
988
|
+
}
|
|
989
|
+
return writer;
|
|
990
|
+
},
|
|
991
|
+
|
|
992
|
+
decode(input: BinaryReader | Uint8Array, length?: number): PlatformInfo {
|
|
993
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
994
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
995
|
+
const message = createBasePlatformInfo();
|
|
996
|
+
while (reader.pos < end) {
|
|
997
|
+
const tag = reader.uint32();
|
|
998
|
+
switch (tag >>> 3) {
|
|
999
|
+
case 1: {
|
|
1000
|
+
if (tag !== 10) {
|
|
1001
|
+
break;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
message.primary = NodeInfo.decode(reader, reader.uint32());
|
|
1005
|
+
continue;
|
|
1006
|
+
}
|
|
1007
|
+
case 2: {
|
|
1008
|
+
if (tag !== 16) {
|
|
1009
|
+
break;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
message.sameConnection = reader.bool();
|
|
1013
|
+
continue;
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1017
|
+
break;
|
|
1018
|
+
}
|
|
1019
|
+
reader.skip(tag & 7);
|
|
1020
|
+
}
|
|
1021
|
+
return message;
|
|
1022
|
+
},
|
|
1023
|
+
|
|
1024
|
+
fromJSON(object: any): PlatformInfo {
|
|
1025
|
+
return {
|
|
1026
|
+
primary: isSet(object.primary) ? NodeInfo.fromJSON(object.primary) : undefined,
|
|
1027
|
+
sameConnection: isSet(object.sameConnection)
|
|
1028
|
+
? globalThis.Boolean(object.sameConnection)
|
|
1029
|
+
: isSet(object.same_connection)
|
|
1030
|
+
? globalThis.Boolean(object.same_connection)
|
|
1031
|
+
: false,
|
|
1032
|
+
};
|
|
1033
|
+
},
|
|
1034
|
+
|
|
1035
|
+
toJSON(message: PlatformInfo): unknown {
|
|
1036
|
+
const obj: any = {};
|
|
1037
|
+
if (message.primary !== undefined) {
|
|
1038
|
+
obj.primary = NodeInfo.toJSON(message.primary);
|
|
1039
|
+
}
|
|
1040
|
+
if (message.sameConnection !== false) {
|
|
1041
|
+
obj.sameConnection = message.sameConnection;
|
|
1042
|
+
}
|
|
1043
|
+
return obj;
|
|
1044
|
+
},
|
|
1045
|
+
|
|
1046
|
+
create(base?: DeepPartial<PlatformInfo>): PlatformInfo {
|
|
1047
|
+
return PlatformInfo.fromPartial(base ?? {});
|
|
1048
|
+
},
|
|
1049
|
+
fromPartial(object: DeepPartial<PlatformInfo>): PlatformInfo {
|
|
1050
|
+
const message = createBasePlatformInfo();
|
|
1051
|
+
message.primary = (object.primary !== undefined && object.primary !== null)
|
|
1052
|
+
? NodeInfo.fromPartial(object.primary)
|
|
1053
|
+
: undefined;
|
|
1054
|
+
message.sameConnection = object.sameConnection ?? false;
|
|
1055
|
+
return message;
|
|
1056
|
+
},
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
function createBaseNodeInfo(): NodeInfo {
|
|
1060
|
+
return { hostName: "", grpcPort: 0, httpPort: 0, version: 0, nodeName: "" };
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
export const NodeInfo: MessageFns<NodeInfo> = {
|
|
1064
|
+
encode(message: NodeInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1065
|
+
if (message.hostName !== "") {
|
|
1066
|
+
writer.uint32(10).string(message.hostName);
|
|
1067
|
+
}
|
|
1068
|
+
if (message.grpcPort !== 0) {
|
|
1069
|
+
writer.uint32(16).int32(message.grpcPort);
|
|
1070
|
+
}
|
|
1071
|
+
if (message.httpPort !== 0) {
|
|
1072
|
+
writer.uint32(24).int32(message.httpPort);
|
|
1073
|
+
}
|
|
1074
|
+
if (message.version !== 0) {
|
|
1075
|
+
writer.uint32(32).int32(message.version);
|
|
1076
|
+
}
|
|
1077
|
+
if (message.nodeName !== "") {
|
|
1078
|
+
writer.uint32(42).string(message.nodeName);
|
|
1079
|
+
}
|
|
1080
|
+
return writer;
|
|
1081
|
+
},
|
|
1082
|
+
|
|
1083
|
+
decode(input: BinaryReader | Uint8Array, length?: number): NodeInfo {
|
|
1084
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1085
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1086
|
+
const message = createBaseNodeInfo();
|
|
1087
|
+
while (reader.pos < end) {
|
|
1088
|
+
const tag = reader.uint32();
|
|
1089
|
+
switch (tag >>> 3) {
|
|
1090
|
+
case 1: {
|
|
1091
|
+
if (tag !== 10) {
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
message.hostName = reader.string();
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
case 2: {
|
|
1099
|
+
if (tag !== 16) {
|
|
1100
|
+
break;
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
message.grpcPort = reader.int32();
|
|
1104
|
+
continue;
|
|
1105
|
+
}
|
|
1106
|
+
case 3: {
|
|
1107
|
+
if (tag !== 24) {
|
|
1108
|
+
break;
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
message.httpPort = reader.int32();
|
|
1112
|
+
continue;
|
|
1113
|
+
}
|
|
1114
|
+
case 4: {
|
|
1115
|
+
if (tag !== 32) {
|
|
1116
|
+
break;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
message.version = reader.int32();
|
|
1120
|
+
continue;
|
|
1121
|
+
}
|
|
1122
|
+
case 5: {
|
|
1123
|
+
if (tag !== 42) {
|
|
1124
|
+
break;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
message.nodeName = reader.string();
|
|
1128
|
+
continue;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1132
|
+
break;
|
|
1133
|
+
}
|
|
1134
|
+
reader.skip(tag & 7);
|
|
1135
|
+
}
|
|
1136
|
+
return message;
|
|
1137
|
+
},
|
|
1138
|
+
|
|
1139
|
+
fromJSON(object: any): NodeInfo {
|
|
1140
|
+
return {
|
|
1141
|
+
hostName: isSet(object.hostName)
|
|
1142
|
+
? globalThis.String(object.hostName)
|
|
1143
|
+
: isSet(object.host_name)
|
|
1144
|
+
? globalThis.String(object.host_name)
|
|
1145
|
+
: "",
|
|
1146
|
+
grpcPort: isSet(object.grpcPort)
|
|
1147
|
+
? globalThis.Number(object.grpcPort)
|
|
1148
|
+
: isSet(object.grpc_port)
|
|
1149
|
+
? globalThis.Number(object.grpc_port)
|
|
1150
|
+
: 0,
|
|
1151
|
+
httpPort: isSet(object.httpPort)
|
|
1152
|
+
? globalThis.Number(object.httpPort)
|
|
1153
|
+
: isSet(object.http_port)
|
|
1154
|
+
? globalThis.Number(object.http_port)
|
|
1155
|
+
: 0,
|
|
1156
|
+
version: isSet(object.version) ? globalThis.Number(object.version) : 0,
|
|
1157
|
+
nodeName: isSet(object.nodeName)
|
|
1158
|
+
? globalThis.String(object.nodeName)
|
|
1159
|
+
: isSet(object.node_name)
|
|
1160
|
+
? globalThis.String(object.node_name)
|
|
1161
|
+
: "",
|
|
1162
|
+
};
|
|
1163
|
+
},
|
|
1164
|
+
|
|
1165
|
+
toJSON(message: NodeInfo): unknown {
|
|
1166
|
+
const obj: any = {};
|
|
1167
|
+
if (message.hostName !== "") {
|
|
1168
|
+
obj.hostName = message.hostName;
|
|
1169
|
+
}
|
|
1170
|
+
if (message.grpcPort !== 0) {
|
|
1171
|
+
obj.grpcPort = Math.round(message.grpcPort);
|
|
1172
|
+
}
|
|
1173
|
+
if (message.httpPort !== 0) {
|
|
1174
|
+
obj.httpPort = Math.round(message.httpPort);
|
|
1175
|
+
}
|
|
1176
|
+
if (message.version !== 0) {
|
|
1177
|
+
obj.version = Math.round(message.version);
|
|
1178
|
+
}
|
|
1179
|
+
if (message.nodeName !== "") {
|
|
1180
|
+
obj.nodeName = message.nodeName;
|
|
1181
|
+
}
|
|
1182
|
+
return obj;
|
|
1183
|
+
},
|
|
1184
|
+
|
|
1185
|
+
create(base?: DeepPartial<NodeInfo>): NodeInfo {
|
|
1186
|
+
return NodeInfo.fromPartial(base ?? {});
|
|
1187
|
+
},
|
|
1188
|
+
fromPartial(object: DeepPartial<NodeInfo>): NodeInfo {
|
|
1189
|
+
const message = createBaseNodeInfo();
|
|
1190
|
+
message.hostName = object.hostName ?? "";
|
|
1191
|
+
message.grpcPort = object.grpcPort ?? 0;
|
|
1192
|
+
message.httpPort = object.httpPort ?? 0;
|
|
1193
|
+
message.version = object.version ?? 0;
|
|
1194
|
+
message.nodeName = object.nodeName ?? "";
|
|
1195
|
+
return message;
|
|
1196
|
+
},
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1199
|
+
function createBaseClientIdentification(): ClientIdentification {
|
|
1200
|
+
return { clientId: "", componentName: "", tags: {}, version: "" };
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
export const ClientIdentification: MessageFns<ClientIdentification> = {
|
|
1204
|
+
encode(message: ClientIdentification, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1205
|
+
if (message.clientId !== "") {
|
|
1206
|
+
writer.uint32(10).string(message.clientId);
|
|
1207
|
+
}
|
|
1208
|
+
if (message.componentName !== "") {
|
|
1209
|
+
writer.uint32(18).string(message.componentName);
|
|
1210
|
+
}
|
|
1211
|
+
globalThis.Object.entries(message.tags).forEach(([key, value]: [string, string]) => {
|
|
1212
|
+
ClientIdentification_TagsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join();
|
|
1213
|
+
});
|
|
1214
|
+
if (message.version !== "") {
|
|
1215
|
+
writer.uint32(34).string(message.version);
|
|
1216
|
+
}
|
|
1217
|
+
return writer;
|
|
1218
|
+
},
|
|
1219
|
+
|
|
1220
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClientIdentification {
|
|
1221
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1222
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1223
|
+
const message = createBaseClientIdentification();
|
|
1224
|
+
while (reader.pos < end) {
|
|
1225
|
+
const tag = reader.uint32();
|
|
1226
|
+
switch (tag >>> 3) {
|
|
1227
|
+
case 1: {
|
|
1228
|
+
if (tag !== 10) {
|
|
1229
|
+
break;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
message.clientId = reader.string();
|
|
1233
|
+
continue;
|
|
1234
|
+
}
|
|
1235
|
+
case 2: {
|
|
1236
|
+
if (tag !== 18) {
|
|
1237
|
+
break;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
message.componentName = reader.string();
|
|
1241
|
+
continue;
|
|
1242
|
+
}
|
|
1243
|
+
case 3: {
|
|
1244
|
+
if (tag !== 26) {
|
|
1245
|
+
break;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
const entry3 = ClientIdentification_TagsEntry.decode(reader, reader.uint32());
|
|
1249
|
+
if (entry3.value !== undefined) {
|
|
1250
|
+
message.tags[entry3.key] = entry3.value;
|
|
1251
|
+
}
|
|
1252
|
+
continue;
|
|
1253
|
+
}
|
|
1254
|
+
case 4: {
|
|
1255
|
+
if (tag !== 34) {
|
|
1256
|
+
break;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
message.version = reader.string();
|
|
1260
|
+
continue;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1264
|
+
break;
|
|
1265
|
+
}
|
|
1266
|
+
reader.skip(tag & 7);
|
|
1267
|
+
}
|
|
1268
|
+
return message;
|
|
1269
|
+
},
|
|
1270
|
+
|
|
1271
|
+
fromJSON(object: any): ClientIdentification {
|
|
1272
|
+
return {
|
|
1273
|
+
clientId: isSet(object.clientId)
|
|
1274
|
+
? globalThis.String(object.clientId)
|
|
1275
|
+
: isSet(object.client_id)
|
|
1276
|
+
? globalThis.String(object.client_id)
|
|
1277
|
+
: "",
|
|
1278
|
+
componentName: isSet(object.componentName)
|
|
1279
|
+
? globalThis.String(object.componentName)
|
|
1280
|
+
: isSet(object.component_name)
|
|
1281
|
+
? globalThis.String(object.component_name)
|
|
1282
|
+
: "",
|
|
1283
|
+
tags: isObject(object.tags)
|
|
1284
|
+
? (globalThis.Object.entries(object.tags) as [string, any][]).reduce(
|
|
1285
|
+
(acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
1286
|
+
acc[key] = globalThis.String(value);
|
|
1287
|
+
return acc;
|
|
1288
|
+
},
|
|
1289
|
+
{},
|
|
1290
|
+
)
|
|
1291
|
+
: {},
|
|
1292
|
+
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
1293
|
+
};
|
|
1294
|
+
},
|
|
1295
|
+
|
|
1296
|
+
toJSON(message: ClientIdentification): unknown {
|
|
1297
|
+
const obj: any = {};
|
|
1298
|
+
if (message.clientId !== "") {
|
|
1299
|
+
obj.clientId = message.clientId;
|
|
1300
|
+
}
|
|
1301
|
+
if (message.componentName !== "") {
|
|
1302
|
+
obj.componentName = message.componentName;
|
|
1303
|
+
}
|
|
1304
|
+
if (message.tags) {
|
|
1305
|
+
const entries = globalThis.Object.entries(message.tags) as [string, string][];
|
|
1306
|
+
if (entries.length > 0) {
|
|
1307
|
+
obj.tags = {};
|
|
1308
|
+
entries.forEach(([k, v]) => {
|
|
1309
|
+
obj.tags[k] = v;
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
if (message.version !== "") {
|
|
1314
|
+
obj.version = message.version;
|
|
1315
|
+
}
|
|
1316
|
+
return obj;
|
|
1317
|
+
},
|
|
1318
|
+
|
|
1319
|
+
create(base?: DeepPartial<ClientIdentification>): ClientIdentification {
|
|
1320
|
+
return ClientIdentification.fromPartial(base ?? {});
|
|
1321
|
+
},
|
|
1322
|
+
fromPartial(object: DeepPartial<ClientIdentification>): ClientIdentification {
|
|
1323
|
+
const message = createBaseClientIdentification();
|
|
1324
|
+
message.clientId = object.clientId ?? "";
|
|
1325
|
+
message.componentName = object.componentName ?? "";
|
|
1326
|
+
message.tags = (globalThis.Object.entries(object.tags ?? {}) as [string, string][]).reduce(
|
|
1327
|
+
(acc: { [key: string]: string }, [key, value]: [string, string]) => {
|
|
1328
|
+
if (value !== undefined) {
|
|
1329
|
+
acc[key] = globalThis.String(value);
|
|
1330
|
+
}
|
|
1331
|
+
return acc;
|
|
1332
|
+
},
|
|
1333
|
+
{},
|
|
1334
|
+
);
|
|
1335
|
+
message.version = object.version ?? "";
|
|
1336
|
+
return message;
|
|
1337
|
+
},
|
|
1338
|
+
};
|
|
1339
|
+
|
|
1340
|
+
function createBaseClientIdentification_TagsEntry(): ClientIdentification_TagsEntry {
|
|
1341
|
+
return { key: "", value: "" };
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
export const ClientIdentification_TagsEntry: MessageFns<ClientIdentification_TagsEntry> = {
|
|
1345
|
+
encode(message: ClientIdentification_TagsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1346
|
+
if (message.key !== "") {
|
|
1347
|
+
writer.uint32(10).string(message.key);
|
|
1348
|
+
}
|
|
1349
|
+
if (message.value !== "") {
|
|
1350
|
+
writer.uint32(18).string(message.value);
|
|
1351
|
+
}
|
|
1352
|
+
return writer;
|
|
1353
|
+
},
|
|
1354
|
+
|
|
1355
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ClientIdentification_TagsEntry {
|
|
1356
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1357
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1358
|
+
const message = createBaseClientIdentification_TagsEntry();
|
|
1359
|
+
while (reader.pos < end) {
|
|
1360
|
+
const tag = reader.uint32();
|
|
1361
|
+
switch (tag >>> 3) {
|
|
1362
|
+
case 1: {
|
|
1363
|
+
if (tag !== 10) {
|
|
1364
|
+
break;
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
message.key = reader.string();
|
|
1368
|
+
continue;
|
|
1369
|
+
}
|
|
1370
|
+
case 2: {
|
|
1371
|
+
if (tag !== 18) {
|
|
1372
|
+
break;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
message.value = reader.string();
|
|
1376
|
+
continue;
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1380
|
+
break;
|
|
1381
|
+
}
|
|
1382
|
+
reader.skip(tag & 7);
|
|
1383
|
+
}
|
|
1384
|
+
return message;
|
|
1385
|
+
},
|
|
1386
|
+
|
|
1387
|
+
fromJSON(object: any): ClientIdentification_TagsEntry {
|
|
1388
|
+
return {
|
|
1389
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1390
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1391
|
+
};
|
|
1392
|
+
},
|
|
1393
|
+
|
|
1394
|
+
toJSON(message: ClientIdentification_TagsEntry): unknown {
|
|
1395
|
+
const obj: any = {};
|
|
1396
|
+
if (message.key !== "") {
|
|
1397
|
+
obj.key = message.key;
|
|
1398
|
+
}
|
|
1399
|
+
if (message.value !== "") {
|
|
1400
|
+
obj.value = message.value;
|
|
1401
|
+
}
|
|
1402
|
+
return obj;
|
|
1403
|
+
},
|
|
1404
|
+
|
|
1405
|
+
create(base?: DeepPartial<ClientIdentification_TagsEntry>): ClientIdentification_TagsEntry {
|
|
1406
|
+
return ClientIdentification_TagsEntry.fromPartial(base ?? {});
|
|
1407
|
+
},
|
|
1408
|
+
fromPartial(object: DeepPartial<ClientIdentification_TagsEntry>): ClientIdentification_TagsEntry {
|
|
1409
|
+
const message = createBaseClientIdentification_TagsEntry();
|
|
1410
|
+
message.key = object.key ?? "";
|
|
1411
|
+
message.value = object.value ?? "";
|
|
1412
|
+
return message;
|
|
1413
|
+
},
|
|
1414
|
+
};
|
|
1415
|
+
|
|
1416
|
+
function createBaseEventProcessorInfo(): EventProcessorInfo {
|
|
1417
|
+
return {
|
|
1418
|
+
processorName: "",
|
|
1419
|
+
mode: "",
|
|
1420
|
+
activeThreads: 0,
|
|
1421
|
+
running: false,
|
|
1422
|
+
error: false,
|
|
1423
|
+
segmentStatus: [],
|
|
1424
|
+
availableThreads: 0,
|
|
1425
|
+
tokenStoreIdentifier: "",
|
|
1426
|
+
isStreamingProcessor: false,
|
|
1427
|
+
loadBalancingStrategyName: "",
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
export const EventProcessorInfo: MessageFns<EventProcessorInfo> = {
|
|
1432
|
+
encode(message: EventProcessorInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1433
|
+
if (message.processorName !== "") {
|
|
1434
|
+
writer.uint32(10).string(message.processorName);
|
|
1435
|
+
}
|
|
1436
|
+
if (message.mode !== "") {
|
|
1437
|
+
writer.uint32(18).string(message.mode);
|
|
1438
|
+
}
|
|
1439
|
+
if (message.activeThreads !== 0) {
|
|
1440
|
+
writer.uint32(24).int32(message.activeThreads);
|
|
1441
|
+
}
|
|
1442
|
+
if (message.running !== false) {
|
|
1443
|
+
writer.uint32(32).bool(message.running);
|
|
1444
|
+
}
|
|
1445
|
+
if (message.error !== false) {
|
|
1446
|
+
writer.uint32(40).bool(message.error);
|
|
1447
|
+
}
|
|
1448
|
+
for (const v of message.segmentStatus) {
|
|
1449
|
+
EventProcessorInfo_SegmentStatus.encode(v!, writer.uint32(50).fork()).join();
|
|
1450
|
+
}
|
|
1451
|
+
if (message.availableThreads !== 0) {
|
|
1452
|
+
writer.uint32(56).int32(message.availableThreads);
|
|
1453
|
+
}
|
|
1454
|
+
if (message.tokenStoreIdentifier !== "") {
|
|
1455
|
+
writer.uint32(66).string(message.tokenStoreIdentifier);
|
|
1456
|
+
}
|
|
1457
|
+
if (message.isStreamingProcessor !== false) {
|
|
1458
|
+
writer.uint32(72).bool(message.isStreamingProcessor);
|
|
1459
|
+
}
|
|
1460
|
+
if (message.loadBalancingStrategyName !== "") {
|
|
1461
|
+
writer.uint32(82).string(message.loadBalancingStrategyName);
|
|
1462
|
+
}
|
|
1463
|
+
return writer;
|
|
1464
|
+
},
|
|
1465
|
+
|
|
1466
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorInfo {
|
|
1467
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1468
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1469
|
+
const message = createBaseEventProcessorInfo();
|
|
1470
|
+
while (reader.pos < end) {
|
|
1471
|
+
const tag = reader.uint32();
|
|
1472
|
+
switch (tag >>> 3) {
|
|
1473
|
+
case 1: {
|
|
1474
|
+
if (tag !== 10) {
|
|
1475
|
+
break;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
message.processorName = reader.string();
|
|
1479
|
+
continue;
|
|
1480
|
+
}
|
|
1481
|
+
case 2: {
|
|
1482
|
+
if (tag !== 18) {
|
|
1483
|
+
break;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
message.mode = reader.string();
|
|
1487
|
+
continue;
|
|
1488
|
+
}
|
|
1489
|
+
case 3: {
|
|
1490
|
+
if (tag !== 24) {
|
|
1491
|
+
break;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
message.activeThreads = reader.int32();
|
|
1495
|
+
continue;
|
|
1496
|
+
}
|
|
1497
|
+
case 4: {
|
|
1498
|
+
if (tag !== 32) {
|
|
1499
|
+
break;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
message.running = reader.bool();
|
|
1503
|
+
continue;
|
|
1504
|
+
}
|
|
1505
|
+
case 5: {
|
|
1506
|
+
if (tag !== 40) {
|
|
1507
|
+
break;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
message.error = reader.bool();
|
|
1511
|
+
continue;
|
|
1512
|
+
}
|
|
1513
|
+
case 6: {
|
|
1514
|
+
if (tag !== 50) {
|
|
1515
|
+
break;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
message.segmentStatus.push(EventProcessorInfo_SegmentStatus.decode(reader, reader.uint32()));
|
|
1519
|
+
continue;
|
|
1520
|
+
}
|
|
1521
|
+
case 7: {
|
|
1522
|
+
if (tag !== 56) {
|
|
1523
|
+
break;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
message.availableThreads = reader.int32();
|
|
1527
|
+
continue;
|
|
1528
|
+
}
|
|
1529
|
+
case 8: {
|
|
1530
|
+
if (tag !== 66) {
|
|
1531
|
+
break;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
message.tokenStoreIdentifier = reader.string();
|
|
1535
|
+
continue;
|
|
1536
|
+
}
|
|
1537
|
+
case 9: {
|
|
1538
|
+
if (tag !== 72) {
|
|
1539
|
+
break;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
message.isStreamingProcessor = reader.bool();
|
|
1543
|
+
continue;
|
|
1544
|
+
}
|
|
1545
|
+
case 10: {
|
|
1546
|
+
if (tag !== 82) {
|
|
1547
|
+
break;
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
message.loadBalancingStrategyName = reader.string();
|
|
1551
|
+
continue;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1555
|
+
break;
|
|
1556
|
+
}
|
|
1557
|
+
reader.skip(tag & 7);
|
|
1558
|
+
}
|
|
1559
|
+
return message;
|
|
1560
|
+
},
|
|
1561
|
+
|
|
1562
|
+
fromJSON(object: any): EventProcessorInfo {
|
|
1563
|
+
return {
|
|
1564
|
+
processorName: isSet(object.processorName)
|
|
1565
|
+
? globalThis.String(object.processorName)
|
|
1566
|
+
: isSet(object.processor_name)
|
|
1567
|
+
? globalThis.String(object.processor_name)
|
|
1568
|
+
: "",
|
|
1569
|
+
mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
|
|
1570
|
+
activeThreads: isSet(object.activeThreads)
|
|
1571
|
+
? globalThis.Number(object.activeThreads)
|
|
1572
|
+
: isSet(object.active_threads)
|
|
1573
|
+
? globalThis.Number(object.active_threads)
|
|
1574
|
+
: 0,
|
|
1575
|
+
running: isSet(object.running) ? globalThis.Boolean(object.running) : false,
|
|
1576
|
+
error: isSet(object.error) ? globalThis.Boolean(object.error) : false,
|
|
1577
|
+
segmentStatus: globalThis.Array.isArray(object?.segmentStatus)
|
|
1578
|
+
? object.segmentStatus.map((e: any) => EventProcessorInfo_SegmentStatus.fromJSON(e))
|
|
1579
|
+
: globalThis.Array.isArray(object?.segment_status)
|
|
1580
|
+
? object.segment_status.map((e: any) => EventProcessorInfo_SegmentStatus.fromJSON(e))
|
|
1581
|
+
: [],
|
|
1582
|
+
availableThreads: isSet(object.availableThreads)
|
|
1583
|
+
? globalThis.Number(object.availableThreads)
|
|
1584
|
+
: isSet(object.available_threads)
|
|
1585
|
+
? globalThis.Number(object.available_threads)
|
|
1586
|
+
: 0,
|
|
1587
|
+
tokenStoreIdentifier: isSet(object.tokenStoreIdentifier)
|
|
1588
|
+
? globalThis.String(object.tokenStoreIdentifier)
|
|
1589
|
+
: isSet(object.token_store_identifier)
|
|
1590
|
+
? globalThis.String(object.token_store_identifier)
|
|
1591
|
+
: "",
|
|
1592
|
+
isStreamingProcessor: isSet(object.isStreamingProcessor)
|
|
1593
|
+
? globalThis.Boolean(object.isStreamingProcessor)
|
|
1594
|
+
: isSet(object.is_streaming_processor)
|
|
1595
|
+
? globalThis.Boolean(object.is_streaming_processor)
|
|
1596
|
+
: false,
|
|
1597
|
+
loadBalancingStrategyName: isSet(object.loadBalancingStrategyName)
|
|
1598
|
+
? globalThis.String(object.loadBalancingStrategyName)
|
|
1599
|
+
: isSet(object.load_balancing_strategy_name)
|
|
1600
|
+
? globalThis.String(object.load_balancing_strategy_name)
|
|
1601
|
+
: "",
|
|
1602
|
+
};
|
|
1603
|
+
},
|
|
1604
|
+
|
|
1605
|
+
toJSON(message: EventProcessorInfo): unknown {
|
|
1606
|
+
const obj: any = {};
|
|
1607
|
+
if (message.processorName !== "") {
|
|
1608
|
+
obj.processorName = message.processorName;
|
|
1609
|
+
}
|
|
1610
|
+
if (message.mode !== "") {
|
|
1611
|
+
obj.mode = message.mode;
|
|
1612
|
+
}
|
|
1613
|
+
if (message.activeThreads !== 0) {
|
|
1614
|
+
obj.activeThreads = Math.round(message.activeThreads);
|
|
1615
|
+
}
|
|
1616
|
+
if (message.running !== false) {
|
|
1617
|
+
obj.running = message.running;
|
|
1618
|
+
}
|
|
1619
|
+
if (message.error !== false) {
|
|
1620
|
+
obj.error = message.error;
|
|
1621
|
+
}
|
|
1622
|
+
if (message.segmentStatus?.length) {
|
|
1623
|
+
obj.segmentStatus = message.segmentStatus.map((e) => EventProcessorInfo_SegmentStatus.toJSON(e));
|
|
1624
|
+
}
|
|
1625
|
+
if (message.availableThreads !== 0) {
|
|
1626
|
+
obj.availableThreads = Math.round(message.availableThreads);
|
|
1627
|
+
}
|
|
1628
|
+
if (message.tokenStoreIdentifier !== "") {
|
|
1629
|
+
obj.tokenStoreIdentifier = message.tokenStoreIdentifier;
|
|
1630
|
+
}
|
|
1631
|
+
if (message.isStreamingProcessor !== false) {
|
|
1632
|
+
obj.isStreamingProcessor = message.isStreamingProcessor;
|
|
1633
|
+
}
|
|
1634
|
+
if (message.loadBalancingStrategyName !== "") {
|
|
1635
|
+
obj.loadBalancingStrategyName = message.loadBalancingStrategyName;
|
|
1636
|
+
}
|
|
1637
|
+
return obj;
|
|
1638
|
+
},
|
|
1639
|
+
|
|
1640
|
+
create(base?: DeepPartial<EventProcessorInfo>): EventProcessorInfo {
|
|
1641
|
+
return EventProcessorInfo.fromPartial(base ?? {});
|
|
1642
|
+
},
|
|
1643
|
+
fromPartial(object: DeepPartial<EventProcessorInfo>): EventProcessorInfo {
|
|
1644
|
+
const message = createBaseEventProcessorInfo();
|
|
1645
|
+
message.processorName = object.processorName ?? "";
|
|
1646
|
+
message.mode = object.mode ?? "";
|
|
1647
|
+
message.activeThreads = object.activeThreads ?? 0;
|
|
1648
|
+
message.running = object.running ?? false;
|
|
1649
|
+
message.error = object.error ?? false;
|
|
1650
|
+
message.segmentStatus = object.segmentStatus?.map((e) => EventProcessorInfo_SegmentStatus.fromPartial(e)) || [];
|
|
1651
|
+
message.availableThreads = object.availableThreads ?? 0;
|
|
1652
|
+
message.tokenStoreIdentifier = object.tokenStoreIdentifier ?? "";
|
|
1653
|
+
message.isStreamingProcessor = object.isStreamingProcessor ?? false;
|
|
1654
|
+
message.loadBalancingStrategyName = object.loadBalancingStrategyName ?? "";
|
|
1655
|
+
return message;
|
|
1656
|
+
},
|
|
1657
|
+
};
|
|
1658
|
+
|
|
1659
|
+
function createBaseEventProcessorInfo_SegmentStatus(): EventProcessorInfo_SegmentStatus {
|
|
1660
|
+
return { segmentId: 0, caughtUp: false, replaying: false, onePartOf: 0, tokenPosition: 0n, errorState: "" };
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
export const EventProcessorInfo_SegmentStatus: MessageFns<EventProcessorInfo_SegmentStatus> = {
|
|
1664
|
+
encode(message: EventProcessorInfo_SegmentStatus, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1665
|
+
if (message.segmentId !== 0) {
|
|
1666
|
+
writer.uint32(8).int32(message.segmentId);
|
|
1667
|
+
}
|
|
1668
|
+
if (message.caughtUp !== false) {
|
|
1669
|
+
writer.uint32(16).bool(message.caughtUp);
|
|
1670
|
+
}
|
|
1671
|
+
if (message.replaying !== false) {
|
|
1672
|
+
writer.uint32(24).bool(message.replaying);
|
|
1673
|
+
}
|
|
1674
|
+
if (message.onePartOf !== 0) {
|
|
1675
|
+
writer.uint32(32).int32(message.onePartOf);
|
|
1676
|
+
}
|
|
1677
|
+
if (message.tokenPosition !== 0n) {
|
|
1678
|
+
if (BigInt.asIntN(64, message.tokenPosition) !== message.tokenPosition) {
|
|
1679
|
+
throw new globalThis.Error("value provided for field message.tokenPosition of type int64 too large");
|
|
1680
|
+
}
|
|
1681
|
+
writer.uint32(40).int64(message.tokenPosition);
|
|
1682
|
+
}
|
|
1683
|
+
if (message.errorState !== "") {
|
|
1684
|
+
writer.uint32(50).string(message.errorState);
|
|
1685
|
+
}
|
|
1686
|
+
return writer;
|
|
1687
|
+
},
|
|
1688
|
+
|
|
1689
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorInfo_SegmentStatus {
|
|
1690
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1691
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1692
|
+
const message = createBaseEventProcessorInfo_SegmentStatus();
|
|
1693
|
+
while (reader.pos < end) {
|
|
1694
|
+
const tag = reader.uint32();
|
|
1695
|
+
switch (tag >>> 3) {
|
|
1696
|
+
case 1: {
|
|
1697
|
+
if (tag !== 8) {
|
|
1698
|
+
break;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
message.segmentId = reader.int32();
|
|
1702
|
+
continue;
|
|
1703
|
+
}
|
|
1704
|
+
case 2: {
|
|
1705
|
+
if (tag !== 16) {
|
|
1706
|
+
break;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
message.caughtUp = reader.bool();
|
|
1710
|
+
continue;
|
|
1711
|
+
}
|
|
1712
|
+
case 3: {
|
|
1713
|
+
if (tag !== 24) {
|
|
1714
|
+
break;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
message.replaying = reader.bool();
|
|
1718
|
+
continue;
|
|
1719
|
+
}
|
|
1720
|
+
case 4: {
|
|
1721
|
+
if (tag !== 32) {
|
|
1722
|
+
break;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
message.onePartOf = reader.int32();
|
|
1726
|
+
continue;
|
|
1727
|
+
}
|
|
1728
|
+
case 5: {
|
|
1729
|
+
if (tag !== 40) {
|
|
1730
|
+
break;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
message.tokenPosition = reader.int64() as bigint;
|
|
1734
|
+
continue;
|
|
1735
|
+
}
|
|
1736
|
+
case 6: {
|
|
1737
|
+
if (tag !== 50) {
|
|
1738
|
+
break;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
message.errorState = reader.string();
|
|
1742
|
+
continue;
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1746
|
+
break;
|
|
1747
|
+
}
|
|
1748
|
+
reader.skip(tag & 7);
|
|
1749
|
+
}
|
|
1750
|
+
return message;
|
|
1751
|
+
},
|
|
1752
|
+
|
|
1753
|
+
fromJSON(object: any): EventProcessorInfo_SegmentStatus {
|
|
1754
|
+
return {
|
|
1755
|
+
segmentId: isSet(object.segmentId)
|
|
1756
|
+
? globalThis.Number(object.segmentId)
|
|
1757
|
+
: isSet(object.segment_id)
|
|
1758
|
+
? globalThis.Number(object.segment_id)
|
|
1759
|
+
: 0,
|
|
1760
|
+
caughtUp: isSet(object.caughtUp)
|
|
1761
|
+
? globalThis.Boolean(object.caughtUp)
|
|
1762
|
+
: isSet(object.caught_up)
|
|
1763
|
+
? globalThis.Boolean(object.caught_up)
|
|
1764
|
+
: false,
|
|
1765
|
+
replaying: isSet(object.replaying) ? globalThis.Boolean(object.replaying) : false,
|
|
1766
|
+
onePartOf: isSet(object.onePartOf)
|
|
1767
|
+
? globalThis.Number(object.onePartOf)
|
|
1768
|
+
: isSet(object.one_part_of)
|
|
1769
|
+
? globalThis.Number(object.one_part_of)
|
|
1770
|
+
: 0,
|
|
1771
|
+
tokenPosition: isSet(object.tokenPosition)
|
|
1772
|
+
? BigInt(object.tokenPosition)
|
|
1773
|
+
: isSet(object.token_position)
|
|
1774
|
+
? BigInt(object.token_position)
|
|
1775
|
+
: 0n,
|
|
1776
|
+
errorState: isSet(object.errorState)
|
|
1777
|
+
? globalThis.String(object.errorState)
|
|
1778
|
+
: isSet(object.error_state)
|
|
1779
|
+
? globalThis.String(object.error_state)
|
|
1780
|
+
: "",
|
|
1781
|
+
};
|
|
1782
|
+
},
|
|
1783
|
+
|
|
1784
|
+
toJSON(message: EventProcessorInfo_SegmentStatus): unknown {
|
|
1785
|
+
const obj: any = {};
|
|
1786
|
+
if (message.segmentId !== 0) {
|
|
1787
|
+
obj.segmentId = Math.round(message.segmentId);
|
|
1788
|
+
}
|
|
1789
|
+
if (message.caughtUp !== false) {
|
|
1790
|
+
obj.caughtUp = message.caughtUp;
|
|
1791
|
+
}
|
|
1792
|
+
if (message.replaying !== false) {
|
|
1793
|
+
obj.replaying = message.replaying;
|
|
1794
|
+
}
|
|
1795
|
+
if (message.onePartOf !== 0) {
|
|
1796
|
+
obj.onePartOf = Math.round(message.onePartOf);
|
|
1797
|
+
}
|
|
1798
|
+
if (message.tokenPosition !== 0n) {
|
|
1799
|
+
obj.tokenPosition = message.tokenPosition.toString();
|
|
1800
|
+
}
|
|
1801
|
+
if (message.errorState !== "") {
|
|
1802
|
+
obj.errorState = message.errorState;
|
|
1803
|
+
}
|
|
1804
|
+
return obj;
|
|
1805
|
+
},
|
|
1806
|
+
|
|
1807
|
+
create(base?: DeepPartial<EventProcessorInfo_SegmentStatus>): EventProcessorInfo_SegmentStatus {
|
|
1808
|
+
return EventProcessorInfo_SegmentStatus.fromPartial(base ?? {});
|
|
1809
|
+
},
|
|
1810
|
+
fromPartial(object: DeepPartial<EventProcessorInfo_SegmentStatus>): EventProcessorInfo_SegmentStatus {
|
|
1811
|
+
const message = createBaseEventProcessorInfo_SegmentStatus();
|
|
1812
|
+
message.segmentId = object.segmentId ?? 0;
|
|
1813
|
+
message.caughtUp = object.caughtUp ?? false;
|
|
1814
|
+
message.replaying = object.replaying ?? false;
|
|
1815
|
+
message.onePartOf = object.onePartOf ?? 0;
|
|
1816
|
+
message.tokenPosition = object.tokenPosition ?? 0n;
|
|
1817
|
+
message.errorState = object.errorState ?? "";
|
|
1818
|
+
return message;
|
|
1819
|
+
},
|
|
1820
|
+
};
|
|
1821
|
+
|
|
1822
|
+
function createBaseEventProcessorReference(): EventProcessorReference {
|
|
1823
|
+
return { processorName: "" };
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
export const EventProcessorReference: MessageFns<EventProcessorReference> = {
|
|
1827
|
+
encode(message: EventProcessorReference, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1828
|
+
if (message.processorName !== "") {
|
|
1829
|
+
writer.uint32(10).string(message.processorName);
|
|
1830
|
+
}
|
|
1831
|
+
return writer;
|
|
1832
|
+
},
|
|
1833
|
+
|
|
1834
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorReference {
|
|
1835
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1836
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1837
|
+
const message = createBaseEventProcessorReference();
|
|
1838
|
+
while (reader.pos < end) {
|
|
1839
|
+
const tag = reader.uint32();
|
|
1840
|
+
switch (tag >>> 3) {
|
|
1841
|
+
case 1: {
|
|
1842
|
+
if (tag !== 10) {
|
|
1843
|
+
break;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
message.processorName = reader.string();
|
|
1847
|
+
continue;
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1851
|
+
break;
|
|
1852
|
+
}
|
|
1853
|
+
reader.skip(tag & 7);
|
|
1854
|
+
}
|
|
1855
|
+
return message;
|
|
1856
|
+
},
|
|
1857
|
+
|
|
1858
|
+
fromJSON(object: any): EventProcessorReference {
|
|
1859
|
+
return {
|
|
1860
|
+
processorName: isSet(object.processorName)
|
|
1861
|
+
? globalThis.String(object.processorName)
|
|
1862
|
+
: isSet(object.processor_name)
|
|
1863
|
+
? globalThis.String(object.processor_name)
|
|
1864
|
+
: "",
|
|
1865
|
+
};
|
|
1866
|
+
},
|
|
1867
|
+
|
|
1868
|
+
toJSON(message: EventProcessorReference): unknown {
|
|
1869
|
+
const obj: any = {};
|
|
1870
|
+
if (message.processorName !== "") {
|
|
1871
|
+
obj.processorName = message.processorName;
|
|
1872
|
+
}
|
|
1873
|
+
return obj;
|
|
1874
|
+
},
|
|
1875
|
+
|
|
1876
|
+
create(base?: DeepPartial<EventProcessorReference>): EventProcessorReference {
|
|
1877
|
+
return EventProcessorReference.fromPartial(base ?? {});
|
|
1878
|
+
},
|
|
1879
|
+
fromPartial(object: DeepPartial<EventProcessorReference>): EventProcessorReference {
|
|
1880
|
+
const message = createBaseEventProcessorReference();
|
|
1881
|
+
message.processorName = object.processorName ?? "";
|
|
1882
|
+
return message;
|
|
1883
|
+
},
|
|
1884
|
+
};
|
|
1885
|
+
|
|
1886
|
+
function createBaseEventProcessorSegmentReference(): EventProcessorSegmentReference {
|
|
1887
|
+
return { processorName: "", segmentIdentifier: 0 };
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
export const EventProcessorSegmentReference: MessageFns<EventProcessorSegmentReference> = {
|
|
1891
|
+
encode(message: EventProcessorSegmentReference, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1892
|
+
if (message.processorName !== "") {
|
|
1893
|
+
writer.uint32(10).string(message.processorName);
|
|
1894
|
+
}
|
|
1895
|
+
if (message.segmentIdentifier !== 0) {
|
|
1896
|
+
writer.uint32(16).int32(message.segmentIdentifier);
|
|
1897
|
+
}
|
|
1898
|
+
return writer;
|
|
1899
|
+
},
|
|
1900
|
+
|
|
1901
|
+
decode(input: BinaryReader | Uint8Array, length?: number): EventProcessorSegmentReference {
|
|
1902
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1903
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1904
|
+
const message = createBaseEventProcessorSegmentReference();
|
|
1905
|
+
while (reader.pos < end) {
|
|
1906
|
+
const tag = reader.uint32();
|
|
1907
|
+
switch (tag >>> 3) {
|
|
1908
|
+
case 1: {
|
|
1909
|
+
if (tag !== 10) {
|
|
1910
|
+
break;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
message.processorName = reader.string();
|
|
1914
|
+
continue;
|
|
1915
|
+
}
|
|
1916
|
+
case 2: {
|
|
1917
|
+
if (tag !== 16) {
|
|
1918
|
+
break;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
message.segmentIdentifier = reader.int32();
|
|
1922
|
+
continue;
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1926
|
+
break;
|
|
1927
|
+
}
|
|
1928
|
+
reader.skip(tag & 7);
|
|
1929
|
+
}
|
|
1930
|
+
return message;
|
|
1931
|
+
},
|
|
1932
|
+
|
|
1933
|
+
fromJSON(object: any): EventProcessorSegmentReference {
|
|
1934
|
+
return {
|
|
1935
|
+
processorName: isSet(object.processorName)
|
|
1936
|
+
? globalThis.String(object.processorName)
|
|
1937
|
+
: isSet(object.processor_name)
|
|
1938
|
+
? globalThis.String(object.processor_name)
|
|
1939
|
+
: "",
|
|
1940
|
+
segmentIdentifier: isSet(object.segmentIdentifier)
|
|
1941
|
+
? globalThis.Number(object.segmentIdentifier)
|
|
1942
|
+
: isSet(object.segment_identifier)
|
|
1943
|
+
? globalThis.Number(object.segment_identifier)
|
|
1944
|
+
: 0,
|
|
1945
|
+
};
|
|
1946
|
+
},
|
|
1947
|
+
|
|
1948
|
+
toJSON(message: EventProcessorSegmentReference): unknown {
|
|
1949
|
+
const obj: any = {};
|
|
1950
|
+
if (message.processorName !== "") {
|
|
1951
|
+
obj.processorName = message.processorName;
|
|
1952
|
+
}
|
|
1953
|
+
if (message.segmentIdentifier !== 0) {
|
|
1954
|
+
obj.segmentIdentifier = Math.round(message.segmentIdentifier);
|
|
1955
|
+
}
|
|
1956
|
+
return obj;
|
|
1957
|
+
},
|
|
1958
|
+
|
|
1959
|
+
create(base?: DeepPartial<EventProcessorSegmentReference>): EventProcessorSegmentReference {
|
|
1960
|
+
return EventProcessorSegmentReference.fromPartial(base ?? {});
|
|
1961
|
+
},
|
|
1962
|
+
fromPartial(object: DeepPartial<EventProcessorSegmentReference>): EventProcessorSegmentReference {
|
|
1963
|
+
const message = createBaseEventProcessorSegmentReference();
|
|
1964
|
+
message.processorName = object.processorName ?? "";
|
|
1965
|
+
message.segmentIdentifier = object.segmentIdentifier ?? 0;
|
|
1966
|
+
return message;
|
|
1967
|
+
},
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1970
|
+
function createBaseHeartbeat(): Heartbeat {
|
|
1971
|
+
return {};
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
export const Heartbeat: MessageFns<Heartbeat> = {
|
|
1975
|
+
encode(_: Heartbeat, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1976
|
+
return writer;
|
|
1977
|
+
},
|
|
1978
|
+
|
|
1979
|
+
decode(input: BinaryReader | Uint8Array, length?: number): Heartbeat {
|
|
1980
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1981
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1982
|
+
const message = createBaseHeartbeat();
|
|
1983
|
+
while (reader.pos < end) {
|
|
1984
|
+
const tag = reader.uint32();
|
|
1985
|
+
switch (tag >>> 3) {
|
|
1986
|
+
}
|
|
1987
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1988
|
+
break;
|
|
1989
|
+
}
|
|
1990
|
+
reader.skip(tag & 7);
|
|
1991
|
+
}
|
|
1992
|
+
return message;
|
|
1993
|
+
},
|
|
1994
|
+
|
|
1995
|
+
fromJSON(_: any): Heartbeat {
|
|
1996
|
+
return {};
|
|
1997
|
+
},
|
|
1998
|
+
|
|
1999
|
+
toJSON(_: Heartbeat): unknown {
|
|
2000
|
+
const obj: any = {};
|
|
2001
|
+
return obj;
|
|
2002
|
+
},
|
|
2003
|
+
|
|
2004
|
+
create(base?: DeepPartial<Heartbeat>): Heartbeat {
|
|
2005
|
+
return Heartbeat.fromPartial(base ?? {});
|
|
2006
|
+
},
|
|
2007
|
+
fromPartial(_: DeepPartial<Heartbeat>): Heartbeat {
|
|
2008
|
+
const message = createBaseHeartbeat();
|
|
2009
|
+
return message;
|
|
2010
|
+
},
|
|
2011
|
+
};
|
|
2012
|
+
|
|
2013
|
+
function createBaseTopologyChange(): TopologyChange {
|
|
2014
|
+
return {
|
|
2015
|
+
updateType: 0,
|
|
2016
|
+
context: "",
|
|
2017
|
+
clientId: "",
|
|
2018
|
+
clientStreamId: "",
|
|
2019
|
+
componentName: "",
|
|
2020
|
+
command: undefined,
|
|
2021
|
+
query: undefined,
|
|
2022
|
+
};
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
export const TopologyChange: MessageFns<TopologyChange> = {
|
|
2026
|
+
encode(message: TopologyChange, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2027
|
+
if (message.updateType !== 0) {
|
|
2028
|
+
writer.uint32(8).int32(message.updateType);
|
|
2029
|
+
}
|
|
2030
|
+
if (message.context !== "") {
|
|
2031
|
+
writer.uint32(18).string(message.context);
|
|
2032
|
+
}
|
|
2033
|
+
if (message.clientId !== "") {
|
|
2034
|
+
writer.uint32(26).string(message.clientId);
|
|
2035
|
+
}
|
|
2036
|
+
if (message.clientStreamId !== "") {
|
|
2037
|
+
writer.uint32(34).string(message.clientStreamId);
|
|
2038
|
+
}
|
|
2039
|
+
if (message.componentName !== "") {
|
|
2040
|
+
writer.uint32(42).string(message.componentName);
|
|
2041
|
+
}
|
|
2042
|
+
if (message.command !== undefined) {
|
|
2043
|
+
CommandSubscription.encode(message.command, writer.uint32(50).fork()).join();
|
|
2044
|
+
}
|
|
2045
|
+
if (message.query !== undefined) {
|
|
2046
|
+
QuerySubscription.encode(message.query, writer.uint32(58).fork()).join();
|
|
2047
|
+
}
|
|
2048
|
+
return writer;
|
|
2049
|
+
},
|
|
2050
|
+
|
|
2051
|
+
decode(input: BinaryReader | Uint8Array, length?: number): TopologyChange {
|
|
2052
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2053
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2054
|
+
const message = createBaseTopologyChange();
|
|
2055
|
+
while (reader.pos < end) {
|
|
2056
|
+
const tag = reader.uint32();
|
|
2057
|
+
switch (tag >>> 3) {
|
|
2058
|
+
case 1: {
|
|
2059
|
+
if (tag !== 8) {
|
|
2060
|
+
break;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
message.updateType = reader.int32() as any;
|
|
2064
|
+
continue;
|
|
2065
|
+
}
|
|
2066
|
+
case 2: {
|
|
2067
|
+
if (tag !== 18) {
|
|
2068
|
+
break;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
message.context = reader.string();
|
|
2072
|
+
continue;
|
|
2073
|
+
}
|
|
2074
|
+
case 3: {
|
|
2075
|
+
if (tag !== 26) {
|
|
2076
|
+
break;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
message.clientId = reader.string();
|
|
2080
|
+
continue;
|
|
2081
|
+
}
|
|
2082
|
+
case 4: {
|
|
2083
|
+
if (tag !== 34) {
|
|
2084
|
+
break;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
message.clientStreamId = reader.string();
|
|
2088
|
+
continue;
|
|
2089
|
+
}
|
|
2090
|
+
case 5: {
|
|
2091
|
+
if (tag !== 42) {
|
|
2092
|
+
break;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
message.componentName = reader.string();
|
|
2096
|
+
continue;
|
|
2097
|
+
}
|
|
2098
|
+
case 6: {
|
|
2099
|
+
if (tag !== 50) {
|
|
2100
|
+
break;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
message.command = CommandSubscription.decode(reader, reader.uint32());
|
|
2104
|
+
continue;
|
|
2105
|
+
}
|
|
2106
|
+
case 7: {
|
|
2107
|
+
if (tag !== 58) {
|
|
2108
|
+
break;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
message.query = QuerySubscription.decode(reader, reader.uint32());
|
|
2112
|
+
continue;
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2116
|
+
break;
|
|
2117
|
+
}
|
|
2118
|
+
reader.skip(tag & 7);
|
|
2119
|
+
}
|
|
2120
|
+
return message;
|
|
2121
|
+
},
|
|
2122
|
+
|
|
2123
|
+
fromJSON(object: any): TopologyChange {
|
|
2124
|
+
return {
|
|
2125
|
+
updateType: isSet(object.updateType)
|
|
2126
|
+
? updateTypeFromJSON(object.updateType)
|
|
2127
|
+
: isSet(object.update_type)
|
|
2128
|
+
? updateTypeFromJSON(object.update_type)
|
|
2129
|
+
: 0,
|
|
2130
|
+
context: isSet(object.context) ? globalThis.String(object.context) : "",
|
|
2131
|
+
clientId: isSet(object.clientId)
|
|
2132
|
+
? globalThis.String(object.clientId)
|
|
2133
|
+
: isSet(object.client_id)
|
|
2134
|
+
? globalThis.String(object.client_id)
|
|
2135
|
+
: "",
|
|
2136
|
+
clientStreamId: isSet(object.clientStreamId)
|
|
2137
|
+
? globalThis.String(object.clientStreamId)
|
|
2138
|
+
: isSet(object.client_stream_id)
|
|
2139
|
+
? globalThis.String(object.client_stream_id)
|
|
2140
|
+
: "",
|
|
2141
|
+
componentName: isSet(object.componentName)
|
|
2142
|
+
? globalThis.String(object.componentName)
|
|
2143
|
+
: isSet(object.component_name)
|
|
2144
|
+
? globalThis.String(object.component_name)
|
|
2145
|
+
: "",
|
|
2146
|
+
command: isSet(object.command) ? CommandSubscription.fromJSON(object.command) : undefined,
|
|
2147
|
+
query: isSet(object.query) ? QuerySubscription.fromJSON(object.query) : undefined,
|
|
2148
|
+
};
|
|
2149
|
+
},
|
|
2150
|
+
|
|
2151
|
+
toJSON(message: TopologyChange): unknown {
|
|
2152
|
+
const obj: any = {};
|
|
2153
|
+
if (message.updateType !== 0) {
|
|
2154
|
+
obj.updateType = updateTypeToJSON(message.updateType);
|
|
2155
|
+
}
|
|
2156
|
+
if (message.context !== "") {
|
|
2157
|
+
obj.context = message.context;
|
|
2158
|
+
}
|
|
2159
|
+
if (message.clientId !== "") {
|
|
2160
|
+
obj.clientId = message.clientId;
|
|
2161
|
+
}
|
|
2162
|
+
if (message.clientStreamId !== "") {
|
|
2163
|
+
obj.clientStreamId = message.clientStreamId;
|
|
2164
|
+
}
|
|
2165
|
+
if (message.componentName !== "") {
|
|
2166
|
+
obj.componentName = message.componentName;
|
|
2167
|
+
}
|
|
2168
|
+
if (message.command !== undefined) {
|
|
2169
|
+
obj.command = CommandSubscription.toJSON(message.command);
|
|
2170
|
+
}
|
|
2171
|
+
if (message.query !== undefined) {
|
|
2172
|
+
obj.query = QuerySubscription.toJSON(message.query);
|
|
2173
|
+
}
|
|
2174
|
+
return obj;
|
|
2175
|
+
},
|
|
2176
|
+
|
|
2177
|
+
create(base?: DeepPartial<TopologyChange>): TopologyChange {
|
|
2178
|
+
return TopologyChange.fromPartial(base ?? {});
|
|
2179
|
+
},
|
|
2180
|
+
fromPartial(object: DeepPartial<TopologyChange>): TopologyChange {
|
|
2181
|
+
const message = createBaseTopologyChange();
|
|
2182
|
+
message.updateType = object.updateType ?? 0;
|
|
2183
|
+
message.context = object.context ?? "";
|
|
2184
|
+
message.clientId = object.clientId ?? "";
|
|
2185
|
+
message.clientStreamId = object.clientStreamId ?? "";
|
|
2186
|
+
message.componentName = object.componentName ?? "";
|
|
2187
|
+
message.command = (object.command !== undefined && object.command !== null)
|
|
2188
|
+
? CommandSubscription.fromPartial(object.command)
|
|
2189
|
+
: undefined;
|
|
2190
|
+
message.query = (object.query !== undefined && object.query !== null)
|
|
2191
|
+
? QuerySubscription.fromPartial(object.query)
|
|
2192
|
+
: undefined;
|
|
2193
|
+
return message;
|
|
2194
|
+
},
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
function createBaseCommandSubscription(): CommandSubscription {
|
|
2198
|
+
return { name: "", loadFactor: 0 };
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
export const CommandSubscription: MessageFns<CommandSubscription> = {
|
|
2202
|
+
encode(message: CommandSubscription, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2203
|
+
if (message.name !== "") {
|
|
2204
|
+
writer.uint32(10).string(message.name);
|
|
2205
|
+
}
|
|
2206
|
+
if (message.loadFactor !== 0) {
|
|
2207
|
+
writer.uint32(16).int32(message.loadFactor);
|
|
2208
|
+
}
|
|
2209
|
+
return writer;
|
|
2210
|
+
},
|
|
2211
|
+
|
|
2212
|
+
decode(input: BinaryReader | Uint8Array, length?: number): CommandSubscription {
|
|
2213
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2214
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2215
|
+
const message = createBaseCommandSubscription();
|
|
2216
|
+
while (reader.pos < end) {
|
|
2217
|
+
const tag = reader.uint32();
|
|
2218
|
+
switch (tag >>> 3) {
|
|
2219
|
+
case 1: {
|
|
2220
|
+
if (tag !== 10) {
|
|
2221
|
+
break;
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
message.name = reader.string();
|
|
2225
|
+
continue;
|
|
2226
|
+
}
|
|
2227
|
+
case 2: {
|
|
2228
|
+
if (tag !== 16) {
|
|
2229
|
+
break;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
message.loadFactor = reader.int32();
|
|
2233
|
+
continue;
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2237
|
+
break;
|
|
2238
|
+
}
|
|
2239
|
+
reader.skip(tag & 7);
|
|
2240
|
+
}
|
|
2241
|
+
return message;
|
|
2242
|
+
},
|
|
2243
|
+
|
|
2244
|
+
fromJSON(object: any): CommandSubscription {
|
|
2245
|
+
return {
|
|
2246
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2247
|
+
loadFactor: isSet(object.loadFactor)
|
|
2248
|
+
? globalThis.Number(object.loadFactor)
|
|
2249
|
+
: isSet(object.load_factor)
|
|
2250
|
+
? globalThis.Number(object.load_factor)
|
|
2251
|
+
: 0,
|
|
2252
|
+
};
|
|
2253
|
+
},
|
|
2254
|
+
|
|
2255
|
+
toJSON(message: CommandSubscription): unknown {
|
|
2256
|
+
const obj: any = {};
|
|
2257
|
+
if (message.name !== "") {
|
|
2258
|
+
obj.name = message.name;
|
|
2259
|
+
}
|
|
2260
|
+
if (message.loadFactor !== 0) {
|
|
2261
|
+
obj.loadFactor = Math.round(message.loadFactor);
|
|
2262
|
+
}
|
|
2263
|
+
return obj;
|
|
2264
|
+
},
|
|
2265
|
+
|
|
2266
|
+
create(base?: DeepPartial<CommandSubscription>): CommandSubscription {
|
|
2267
|
+
return CommandSubscription.fromPartial(base ?? {});
|
|
2268
|
+
},
|
|
2269
|
+
fromPartial(object: DeepPartial<CommandSubscription>): CommandSubscription {
|
|
2270
|
+
const message = createBaseCommandSubscription();
|
|
2271
|
+
message.name = object.name ?? "";
|
|
2272
|
+
message.loadFactor = object.loadFactor ?? 0;
|
|
2273
|
+
return message;
|
|
2274
|
+
},
|
|
2275
|
+
};
|
|
2276
|
+
|
|
2277
|
+
function createBaseQuerySubscription(): QuerySubscription {
|
|
2278
|
+
return { name: "" };
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
export const QuerySubscription: MessageFns<QuerySubscription> = {
|
|
2282
|
+
encode(message: QuerySubscription, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2283
|
+
if (message.name !== "") {
|
|
2284
|
+
writer.uint32(10).string(message.name);
|
|
2285
|
+
}
|
|
2286
|
+
return writer;
|
|
2287
|
+
},
|
|
2288
|
+
|
|
2289
|
+
decode(input: BinaryReader | Uint8Array, length?: number): QuerySubscription {
|
|
2290
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2291
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2292
|
+
const message = createBaseQuerySubscription();
|
|
2293
|
+
while (reader.pos < end) {
|
|
2294
|
+
const tag = reader.uint32();
|
|
2295
|
+
switch (tag >>> 3) {
|
|
2296
|
+
case 1: {
|
|
2297
|
+
if (tag !== 10) {
|
|
2298
|
+
break;
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
message.name = reader.string();
|
|
2302
|
+
continue;
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2306
|
+
break;
|
|
2307
|
+
}
|
|
2308
|
+
reader.skip(tag & 7);
|
|
2309
|
+
}
|
|
2310
|
+
return message;
|
|
2311
|
+
},
|
|
2312
|
+
|
|
2313
|
+
fromJSON(object: any): QuerySubscription {
|
|
2314
|
+
return { name: isSet(object.name) ? globalThis.String(object.name) : "" };
|
|
2315
|
+
},
|
|
2316
|
+
|
|
2317
|
+
toJSON(message: QuerySubscription): unknown {
|
|
2318
|
+
const obj: any = {};
|
|
2319
|
+
if (message.name !== "") {
|
|
2320
|
+
obj.name = message.name;
|
|
2321
|
+
}
|
|
2322
|
+
return obj;
|
|
2323
|
+
},
|
|
2324
|
+
|
|
2325
|
+
create(base?: DeepPartial<QuerySubscription>): QuerySubscription {
|
|
2326
|
+
return QuerySubscription.fromPartial(base ?? {});
|
|
2327
|
+
},
|
|
2328
|
+
fromPartial(object: DeepPartial<QuerySubscription>): QuerySubscription {
|
|
2329
|
+
const message = createBaseQuerySubscription();
|
|
2330
|
+
message.name = object.name ?? "";
|
|
2331
|
+
return message;
|
|
2332
|
+
},
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* Service describing operations for connecting to the AxonServer platform.
|
|
2337
|
+
*
|
|
2338
|
+
* Clients are expected to use this service on any of the Platform's Admin nodes to obtain connection information of the
|
|
2339
|
+
* node that it should set up the actual connection with. On that second node, the clients should open an instruction
|
|
2340
|
+
* stream (see OpenStream), so that AxonServer and the client application can exchange information and instructions.
|
|
2341
|
+
*/
|
|
2342
|
+
export type PlatformServiceDefinition = typeof PlatformServiceDefinition;
|
|
2343
|
+
export const PlatformServiceDefinition = {
|
|
2344
|
+
name: "PlatformService",
|
|
2345
|
+
fullName: "io.axoniq.axonserver.grpc.control.PlatformService",
|
|
2346
|
+
methods: {
|
|
2347
|
+
/** Obtains connection information for the Server that a Client should use for its connections. */
|
|
2348
|
+
getPlatformServer: {
|
|
2349
|
+
name: "GetPlatformServer",
|
|
2350
|
+
requestType: ClientIdentification as typeof ClientIdentification,
|
|
2351
|
+
requestStream: false,
|
|
2352
|
+
responseType: PlatformInfo as typeof PlatformInfo,
|
|
2353
|
+
responseStream: false,
|
|
2354
|
+
options: {},
|
|
2355
|
+
},
|
|
2356
|
+
/** Opens an instruction stream to the Platform, allowing AxonServer to provide management instructions to the application */
|
|
2357
|
+
openStream: {
|
|
2358
|
+
name: "OpenStream",
|
|
2359
|
+
requestType: PlatformInboundInstruction as typeof PlatformInboundInstruction,
|
|
2360
|
+
requestStream: true,
|
|
2361
|
+
responseType: PlatformOutboundInstruction as typeof PlatformOutboundInstruction,
|
|
2362
|
+
responseStream: true,
|
|
2363
|
+
options: {},
|
|
2364
|
+
},
|
|
2365
|
+
},
|
|
2366
|
+
} as const;
|
|
2367
|
+
|
|
2368
|
+
export interface PlatformServiceImplementation<CallContextExt = {}> {
|
|
2369
|
+
/** Obtains connection information for the Server that a Client should use for its connections. */
|
|
2370
|
+
getPlatformServer(
|
|
2371
|
+
request: ClientIdentification,
|
|
2372
|
+
context: CallContext & CallContextExt,
|
|
2373
|
+
): Promise<DeepPartial<PlatformInfo>>;
|
|
2374
|
+
/** Opens an instruction stream to the Platform, allowing AxonServer to provide management instructions to the application */
|
|
2375
|
+
openStream(
|
|
2376
|
+
request: AsyncIterable<PlatformInboundInstruction>,
|
|
2377
|
+
context: CallContext & CallContextExt,
|
|
2378
|
+
): ServerStreamingMethodResult<DeepPartial<PlatformOutboundInstruction>>;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
export interface PlatformServiceClient<CallOptionsExt = {}> {
|
|
2382
|
+
/** Obtains connection information for the Server that a Client should use for its connections. */
|
|
2383
|
+
getPlatformServer(
|
|
2384
|
+
request: DeepPartial<ClientIdentification>,
|
|
2385
|
+
options?: CallOptions & CallOptionsExt,
|
|
2386
|
+
): Promise<PlatformInfo>;
|
|
2387
|
+
/** Opens an instruction stream to the Platform, allowing AxonServer to provide management instructions to the application */
|
|
2388
|
+
openStream(
|
|
2389
|
+
request: AsyncIterable<DeepPartial<PlatformInboundInstruction>>,
|
|
2390
|
+
options?: CallOptions & CallOptionsExt,
|
|
2391
|
+
): AsyncIterable<PlatformOutboundInstruction>;
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
2395
|
+
|
|
2396
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
2397
|
+
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
2398
|
+
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
2399
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
2400
|
+
: Partial<T>;
|
|
2401
|
+
|
|
2402
|
+
function isObject(value: any): boolean {
|
|
2403
|
+
return typeof value === "object" && value !== null;
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
function isSet(value: any): boolean {
|
|
2407
|
+
return value !== null && value !== undefined;
|
|
2408
|
+
}
|
|
2409
|
+
|
|
2410
|
+
export type ServerStreamingMethodResult<Response> = { [Symbol.asyncIterator](): AsyncIterator<Response, void> };
|
|
2411
|
+
|
|
2412
|
+
export interface MessageFns<T> {
|
|
2413
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
2414
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
2415
|
+
fromJSON(object: any): T;
|
|
2416
|
+
toJSON(message: T): unknown;
|
|
2417
|
+
create(base?: DeepPartial<T>): T;
|
|
2418
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
2419
|
+
}
|