grpc-dc 0.46.2 → 0.47.1
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.
|
@@ -0,0 +1,1017 @@
|
|
|
1
|
+
// Generated code: use without restriction (see GENERATED-CODE-LICENSE.md).
|
|
2
|
+
// @generated by protoc-gen-grpc-dc-js. DO NOT EDIT.
|
|
3
|
+
// source: kafka_streams.proto
|
|
4
|
+
|
|
5
|
+
function varintBytes(value) {
|
|
6
|
+
let n = BigInt.asUintN(64, BigInt(value));
|
|
7
|
+
const out = [];
|
|
8
|
+
while (n > 0x7fn) {
|
|
9
|
+
out.push(Number((n & 0x7fn) | 0x80n));
|
|
10
|
+
n >>= 7n;
|
|
11
|
+
}
|
|
12
|
+
out.push(Number(n));
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function zz64(v) {
|
|
17
|
+
const b = BigInt(v);
|
|
18
|
+
return (b << 1n) ^ (b >> 63n);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function unzz64(v) {
|
|
22
|
+
return (v >> 1n) ^ (-(v & 1n));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
class Reader {
|
|
26
|
+
constructor(bytes) {
|
|
27
|
+
this.bytes = bytes;
|
|
28
|
+
this.pos = 0;
|
|
29
|
+
}
|
|
30
|
+
get done() {
|
|
31
|
+
return this.pos >= this.bytes.length;
|
|
32
|
+
}
|
|
33
|
+
varint() {
|
|
34
|
+
let result = 0n;
|
|
35
|
+
let shift = 0n;
|
|
36
|
+
for (;;) {
|
|
37
|
+
if (this.pos >= this.bytes.length) throw new Error("truncated varint");
|
|
38
|
+
const byte = this.bytes[this.pos++];
|
|
39
|
+
result |= BigInt(byte & 0x7f) << shift;
|
|
40
|
+
if ((byte & 0x80) === 0) return result;
|
|
41
|
+
shift += 7n;
|
|
42
|
+
if (shift >= 64n) throw new Error("varint too long");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
take(n) {
|
|
46
|
+
const value = this.bytes.subarray(this.pos, this.pos + n);
|
|
47
|
+
if (value.length !== n) throw new Error("truncated field");
|
|
48
|
+
this.pos += n;
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
field() {
|
|
52
|
+
if (this.done) return null;
|
|
53
|
+
const start = this.pos;
|
|
54
|
+
const tag = this.varint();
|
|
55
|
+
const field = Number(tag >> 3n);
|
|
56
|
+
const wire = Number(tag & 7n);
|
|
57
|
+
const f = this._f || (this._f = [0, 0, null, null]);
|
|
58
|
+
f[0] = field;
|
|
59
|
+
f[1] = wire;
|
|
60
|
+
switch (wire) {
|
|
61
|
+
case 0:
|
|
62
|
+
f[2] = this.varint();
|
|
63
|
+
break;
|
|
64
|
+
case 2: {
|
|
65
|
+
const len = Number(this.varint());
|
|
66
|
+
f[2] = this.take(len);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case 1:
|
|
70
|
+
f[2] = this.take(8);
|
|
71
|
+
break;
|
|
72
|
+
case 5:
|
|
73
|
+
f[2] = this.take(4);
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
throw new Error("bad wire type " + wire);
|
|
77
|
+
}
|
|
78
|
+
f[3] = this.bytes.subarray(start, this.pos);
|
|
79
|
+
return f;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function concatBytes(a, b) {
|
|
84
|
+
const out = new Uint8Array(a.length + b.length);
|
|
85
|
+
out.set(a);
|
|
86
|
+
out.set(b, a.length);
|
|
87
|
+
return out;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const textEncoder = new TextEncoder();
|
|
91
|
+
const textDecoder = new TextDecoder();
|
|
92
|
+
const EMPTY_BYTES = new Uint8Array(0);
|
|
93
|
+
function putRaw(out, bytes) {
|
|
94
|
+
for (let i = 0; i < bytes.length; i++) out.push(bytes[i]);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function putTag(out, num, wire) {
|
|
98
|
+
out.push(...varintBytes((BigInt(num) << 3n) | BigInt(wire)));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function putVarintField(out, num, value) {
|
|
102
|
+
if (value === 0n) return;
|
|
103
|
+
putTag(out, num, 0);
|
|
104
|
+
out.push(...varintBytes(value));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function putBytesField(out, num, payload) {
|
|
108
|
+
putTag(out, num, 2);
|
|
109
|
+
putRaw(out, varintBytes(payload.length));
|
|
110
|
+
putRaw(out, payload);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function putStringField(out, num, value) {
|
|
114
|
+
if (!value) return;
|
|
115
|
+
putBytesField(out, num, textEncoder.encode(value));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function putFixedField(out, num, payload) {
|
|
119
|
+
putTag(out, num, payload.length === 8 ? 1 : 5);
|
|
120
|
+
out.push(...payload);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const _fixedBuf = new Uint8Array(8);
|
|
124
|
+
const _fixedView = new DataView(_fixedBuf.buffer);
|
|
125
|
+
function fixedBytes(value, size, write) {
|
|
126
|
+
write(_fixedView, value);
|
|
127
|
+
return _fixedBuf.subarray(0, size);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function readFixed(bytes, read) {
|
|
131
|
+
return read(new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export const Operator = { OPERATOR_UNSPECIFIED: 0, TOKENIZE_WORDS: 1, GROUP_BY_KEY: 2, COUNT: 3, MAP_VALUES: 4, FILTER: 5, SELECT_KEY: 6, AGGREGATE: 7, REDUCE: 8, WINDOW_TUMBLING: 9, WINDOW_HOPPING: 10, JOIN_TABLE: 11, WINDOW_SESSION: 12, WINDOW_SLIDING: 13, COGROUP: 14, JOIN_GLOBAL_TABLE: 15, PROCESS: 16, JOIN_STREAM: 17, JOIN_TABLE_TABLE: 18 };
|
|
135
|
+
|
|
136
|
+
export const Aggregator = { AGGREGATOR_UNSPECIFIED: 0, AGGREGATE_COUNT: 1, AGGREGATE_SUM: 2, AGGREGATE_MIN: 3, AGGREGATE_MAX: 4 };
|
|
137
|
+
|
|
138
|
+
export const ProcessingGuarantee = { PROCESSING_GUARANTEE_UNSPECIFIED: 0, AT_LEAST_ONCE: 1, EXACTLY_ONCE: 2 };
|
|
139
|
+
|
|
140
|
+
export class Step {
|
|
141
|
+
constructor({ operator = 0, param = "", aggregator = 0, windowSizeMs = 0n, windowAdvanceMs = 0n, graceMs = 0n, gapMs = 0n } = {}) {
|
|
142
|
+
this.operator = operator;
|
|
143
|
+
this.param = param;
|
|
144
|
+
this.aggregator = aggregator;
|
|
145
|
+
this.windowSizeMs = windowSizeMs;
|
|
146
|
+
this.windowAdvanceMs = windowAdvanceMs;
|
|
147
|
+
this.graceMs = graceMs;
|
|
148
|
+
this.gapMs = gapMs;
|
|
149
|
+
this.unknownFields = EMPTY_BYTES;
|
|
150
|
+
}
|
|
151
|
+
static encode(msg) {
|
|
152
|
+
const out = [];
|
|
153
|
+
putVarintField(out, 1, BigInt(msg.operator));
|
|
154
|
+
putStringField(out, 2, msg.param);
|
|
155
|
+
putVarintField(out, 3, BigInt(msg.aggregator));
|
|
156
|
+
putVarintField(out, 4, BigInt(msg.windowSizeMs));
|
|
157
|
+
putVarintField(out, 5, BigInt(msg.windowAdvanceMs));
|
|
158
|
+
putVarintField(out, 6, BigInt(msg.graceMs));
|
|
159
|
+
putVarintField(out, 7, BigInt(msg.gapMs));
|
|
160
|
+
putRaw(out, msg.unknownFields);
|
|
161
|
+
return new Uint8Array(out);
|
|
162
|
+
}
|
|
163
|
+
static decode(bytes) {
|
|
164
|
+
const msg = new Step();
|
|
165
|
+
Step._fill(msg, bytes);
|
|
166
|
+
return msg;
|
|
167
|
+
}
|
|
168
|
+
static decodeInto(msg, bytes) {
|
|
169
|
+
msg._reset();
|
|
170
|
+
Step._fill(msg, bytes);
|
|
171
|
+
return msg;
|
|
172
|
+
}
|
|
173
|
+
static _fill(msg, bytes) {
|
|
174
|
+
const reader = new Reader(bytes);
|
|
175
|
+
let f;
|
|
176
|
+
while ((f = reader.field()) !== null) {
|
|
177
|
+
const [num, wire, value, raw] = f;
|
|
178
|
+
switch (num) {
|
|
179
|
+
case 1: msg.operator = Number(BigInt.asIntN(32, value)); break;
|
|
180
|
+
case 2: msg.param = textDecoder.decode(value); break;
|
|
181
|
+
case 3: msg.aggregator = Number(BigInt.asIntN(32, value)); break;
|
|
182
|
+
case 4: msg.windowSizeMs = BigInt.asIntN(64, value); break;
|
|
183
|
+
case 5: msg.windowAdvanceMs = BigInt.asIntN(64, value); break;
|
|
184
|
+
case 6: msg.graceMs = BigInt.asIntN(64, value); break;
|
|
185
|
+
case 7: msg.gapMs = BigInt.asIntN(64, value); break;
|
|
186
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return msg;
|
|
190
|
+
}
|
|
191
|
+
_reset() {
|
|
192
|
+
this.operator = 0;
|
|
193
|
+
this.param = "";
|
|
194
|
+
this.aggregator = 0;
|
|
195
|
+
this.windowSizeMs = 0n;
|
|
196
|
+
this.windowAdvanceMs = 0n;
|
|
197
|
+
this.graceMs = 0n;
|
|
198
|
+
this.gapMs = 0n;
|
|
199
|
+
this.unknownFields = EMPTY_BYTES;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export class Topology {
|
|
204
|
+
constructor({ name = "", applicationId = "", sourceTopic = "", sinkTopic = "", operators = [], steps = [], processingGuarantee = 0, tableTopic = "", cogroupSources = [], stateDir = "", joinTopic = "", standbyReplicas = 0 } = {}) {
|
|
205
|
+
this.name = name;
|
|
206
|
+
this.applicationId = applicationId;
|
|
207
|
+
this.sourceTopic = sourceTopic;
|
|
208
|
+
this.sinkTopic = sinkTopic;
|
|
209
|
+
this.operators = operators;
|
|
210
|
+
this.steps = steps;
|
|
211
|
+
this.processingGuarantee = processingGuarantee;
|
|
212
|
+
this.tableTopic = tableTopic;
|
|
213
|
+
this.cogroupSources = cogroupSources;
|
|
214
|
+
this.stateDir = stateDir;
|
|
215
|
+
this.joinTopic = joinTopic;
|
|
216
|
+
this.standbyReplicas = standbyReplicas;
|
|
217
|
+
this.unknownFields = EMPTY_BYTES;
|
|
218
|
+
}
|
|
219
|
+
static encode(msg) {
|
|
220
|
+
const out = [];
|
|
221
|
+
putStringField(out, 1, msg.name);
|
|
222
|
+
putStringField(out, 2, msg.applicationId);
|
|
223
|
+
putStringField(out, 3, msg.sourceTopic);
|
|
224
|
+
putStringField(out, 4, msg.sinkTopic);
|
|
225
|
+
if (msg.operators && msg.operators.length) {
|
|
226
|
+
const payload = [];
|
|
227
|
+
for (const x of msg.operators) payload.push(...varintBytes(BigInt(x)));
|
|
228
|
+
putBytesField(out, 5, payload);
|
|
229
|
+
}
|
|
230
|
+
if (msg.steps) for (const v of msg.steps) putBytesField(out, 6, Step.encode(v));
|
|
231
|
+
putVarintField(out, 7, BigInt(msg.processingGuarantee));
|
|
232
|
+
putStringField(out, 8, msg.tableTopic);
|
|
233
|
+
if (msg.cogroupSources) for (const v of msg.cogroupSources) putBytesField(out, 9, textEncoder.encode(v));
|
|
234
|
+
putStringField(out, 10, msg.stateDir);
|
|
235
|
+
putStringField(out, 11, msg.joinTopic);
|
|
236
|
+
putVarintField(out, 12, BigInt(msg.standbyReplicas));
|
|
237
|
+
putRaw(out, msg.unknownFields);
|
|
238
|
+
return new Uint8Array(out);
|
|
239
|
+
}
|
|
240
|
+
static decode(bytes) {
|
|
241
|
+
const msg = new Topology();
|
|
242
|
+
Topology._fill(msg, bytes);
|
|
243
|
+
return msg;
|
|
244
|
+
}
|
|
245
|
+
static decodeInto(msg, bytes) {
|
|
246
|
+
msg._reset();
|
|
247
|
+
Topology._fill(msg, bytes);
|
|
248
|
+
return msg;
|
|
249
|
+
}
|
|
250
|
+
static _fill(msg, bytes) {
|
|
251
|
+
const reader = new Reader(bytes);
|
|
252
|
+
let f;
|
|
253
|
+
while ((f = reader.field()) !== null) {
|
|
254
|
+
const [num, wire, value, raw] = f;
|
|
255
|
+
switch (num) {
|
|
256
|
+
case 1: msg.name = textDecoder.decode(value); break;
|
|
257
|
+
case 2: msg.applicationId = textDecoder.decode(value); break;
|
|
258
|
+
case 3: msg.sourceTopic = textDecoder.decode(value); break;
|
|
259
|
+
case 4: msg.sinkTopic = textDecoder.decode(value); break;
|
|
260
|
+
case 5: if (wire === 2) { const r = new Reader(value); while (!r.done) msg.operators.push(Number(BigInt.asIntN(32, r.varint()))); } else msg.operators.push(Number(BigInt.asIntN(32, value))); break;
|
|
261
|
+
case 6: msg.steps.push(Step.decode(value)); break;
|
|
262
|
+
case 7: msg.processingGuarantee = Number(BigInt.asIntN(32, value)); break;
|
|
263
|
+
case 8: msg.tableTopic = textDecoder.decode(value); break;
|
|
264
|
+
case 9: msg.cogroupSources.push(textDecoder.decode(value)); break;
|
|
265
|
+
case 10: msg.stateDir = textDecoder.decode(value); break;
|
|
266
|
+
case 11: msg.joinTopic = textDecoder.decode(value); break;
|
|
267
|
+
case 12: msg.standbyReplicas = Number(BigInt.asIntN(32, value)); break;
|
|
268
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return msg;
|
|
272
|
+
}
|
|
273
|
+
_reset() {
|
|
274
|
+
this.name = "";
|
|
275
|
+
this.applicationId = "";
|
|
276
|
+
this.sourceTopic = "";
|
|
277
|
+
this.sinkTopic = "";
|
|
278
|
+
this.operators = [];
|
|
279
|
+
this.steps = [];
|
|
280
|
+
this.processingGuarantee = 0;
|
|
281
|
+
this.tableTopic = "";
|
|
282
|
+
this.cogroupSources = [];
|
|
283
|
+
this.stateDir = "";
|
|
284
|
+
this.joinTopic = "";
|
|
285
|
+
this.standbyReplicas = 0;
|
|
286
|
+
this.unknownFields = EMPTY_BYTES;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export class TopologyInfo {
|
|
291
|
+
constructor({ name = "", applicationId = "", sourceTopic = "", sinkTopic = "", state = "", recordsProcessed = 0n, error = "", assignedPartitions = [], generationId = 0, role = "" } = {}) {
|
|
292
|
+
this.name = name;
|
|
293
|
+
this.applicationId = applicationId;
|
|
294
|
+
this.sourceTopic = sourceTopic;
|
|
295
|
+
this.sinkTopic = sinkTopic;
|
|
296
|
+
this.state = state;
|
|
297
|
+
this.recordsProcessed = recordsProcessed;
|
|
298
|
+
this.error = error;
|
|
299
|
+
this.assignedPartitions = assignedPartitions;
|
|
300
|
+
this.generationId = generationId;
|
|
301
|
+
this.role = role;
|
|
302
|
+
this.unknownFields = EMPTY_BYTES;
|
|
303
|
+
}
|
|
304
|
+
static encode(msg) {
|
|
305
|
+
const out = [];
|
|
306
|
+
putStringField(out, 1, msg.name);
|
|
307
|
+
putStringField(out, 2, msg.applicationId);
|
|
308
|
+
putStringField(out, 3, msg.sourceTopic);
|
|
309
|
+
putStringField(out, 4, msg.sinkTopic);
|
|
310
|
+
putStringField(out, 5, msg.state);
|
|
311
|
+
putVarintField(out, 6, BigInt(msg.recordsProcessed));
|
|
312
|
+
putStringField(out, 7, msg.error);
|
|
313
|
+
if (msg.assignedPartitions && msg.assignedPartitions.length) {
|
|
314
|
+
const payload = [];
|
|
315
|
+
for (const x of msg.assignedPartitions) payload.push(...varintBytes(BigInt(x)));
|
|
316
|
+
putBytesField(out, 8, payload);
|
|
317
|
+
}
|
|
318
|
+
putVarintField(out, 9, BigInt(msg.generationId));
|
|
319
|
+
putStringField(out, 10, msg.role);
|
|
320
|
+
putRaw(out, msg.unknownFields);
|
|
321
|
+
return new Uint8Array(out);
|
|
322
|
+
}
|
|
323
|
+
static decode(bytes) {
|
|
324
|
+
const msg = new TopologyInfo();
|
|
325
|
+
TopologyInfo._fill(msg, bytes);
|
|
326
|
+
return msg;
|
|
327
|
+
}
|
|
328
|
+
static decodeInto(msg, bytes) {
|
|
329
|
+
msg._reset();
|
|
330
|
+
TopologyInfo._fill(msg, bytes);
|
|
331
|
+
return msg;
|
|
332
|
+
}
|
|
333
|
+
static _fill(msg, bytes) {
|
|
334
|
+
const reader = new Reader(bytes);
|
|
335
|
+
let f;
|
|
336
|
+
while ((f = reader.field()) !== null) {
|
|
337
|
+
const [num, wire, value, raw] = f;
|
|
338
|
+
switch (num) {
|
|
339
|
+
case 1: msg.name = textDecoder.decode(value); break;
|
|
340
|
+
case 2: msg.applicationId = textDecoder.decode(value); break;
|
|
341
|
+
case 3: msg.sourceTopic = textDecoder.decode(value); break;
|
|
342
|
+
case 4: msg.sinkTopic = textDecoder.decode(value); break;
|
|
343
|
+
case 5: msg.state = textDecoder.decode(value); break;
|
|
344
|
+
case 6: msg.recordsProcessed = BigInt.asIntN(64, value); break;
|
|
345
|
+
case 7: msg.error = textDecoder.decode(value); break;
|
|
346
|
+
case 8: if (wire === 2) { const r = new Reader(value); while (!r.done) msg.assignedPartitions.push(Number(BigInt.asIntN(32, r.varint()))); } else msg.assignedPartitions.push(Number(BigInt.asIntN(32, value))); break;
|
|
347
|
+
case 9: msg.generationId = Number(BigInt.asIntN(32, value)); break;
|
|
348
|
+
case 10: msg.role = textDecoder.decode(value); break;
|
|
349
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
return msg;
|
|
353
|
+
}
|
|
354
|
+
_reset() {
|
|
355
|
+
this.name = "";
|
|
356
|
+
this.applicationId = "";
|
|
357
|
+
this.sourceTopic = "";
|
|
358
|
+
this.sinkTopic = "";
|
|
359
|
+
this.state = "";
|
|
360
|
+
this.recordsProcessed = 0n;
|
|
361
|
+
this.error = "";
|
|
362
|
+
this.assignedPartitions = [];
|
|
363
|
+
this.generationId = 0;
|
|
364
|
+
this.role = "";
|
|
365
|
+
this.unknownFields = EMPTY_BYTES;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export class CreateTopologyRequest {
|
|
370
|
+
constructor({ topology = undefined } = {}) {
|
|
371
|
+
this.topology = topology;
|
|
372
|
+
this.unknownFields = EMPTY_BYTES;
|
|
373
|
+
}
|
|
374
|
+
static encode(msg) {
|
|
375
|
+
const out = [];
|
|
376
|
+
if (msg.topology) putBytesField(out, 1, Topology.encode(msg.topology));
|
|
377
|
+
putRaw(out, msg.unknownFields);
|
|
378
|
+
return new Uint8Array(out);
|
|
379
|
+
}
|
|
380
|
+
static decode(bytes) {
|
|
381
|
+
const msg = new CreateTopologyRequest();
|
|
382
|
+
CreateTopologyRequest._fill(msg, bytes);
|
|
383
|
+
return msg;
|
|
384
|
+
}
|
|
385
|
+
static decodeInto(msg, bytes) {
|
|
386
|
+
msg._reset();
|
|
387
|
+
CreateTopologyRequest._fill(msg, bytes);
|
|
388
|
+
return msg;
|
|
389
|
+
}
|
|
390
|
+
static _fill(msg, bytes) {
|
|
391
|
+
const reader = new Reader(bytes);
|
|
392
|
+
let f;
|
|
393
|
+
while ((f = reader.field()) !== null) {
|
|
394
|
+
const [num, wire, value, raw] = f;
|
|
395
|
+
switch (num) {
|
|
396
|
+
case 1: msg.topology = Topology.decode(value); break;
|
|
397
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
return msg;
|
|
401
|
+
}
|
|
402
|
+
_reset() {
|
|
403
|
+
this.topology = undefined;
|
|
404
|
+
this.unknownFields = EMPTY_BYTES;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export class DescribeTopologyRequest {
|
|
409
|
+
constructor({ name = "" } = {}) {
|
|
410
|
+
this.name = name;
|
|
411
|
+
this.unknownFields = EMPTY_BYTES;
|
|
412
|
+
}
|
|
413
|
+
static encode(msg) {
|
|
414
|
+
const out = [];
|
|
415
|
+
putStringField(out, 1, msg.name);
|
|
416
|
+
putRaw(out, msg.unknownFields);
|
|
417
|
+
return new Uint8Array(out);
|
|
418
|
+
}
|
|
419
|
+
static decode(bytes) {
|
|
420
|
+
const msg = new DescribeTopologyRequest();
|
|
421
|
+
DescribeTopologyRequest._fill(msg, bytes);
|
|
422
|
+
return msg;
|
|
423
|
+
}
|
|
424
|
+
static decodeInto(msg, bytes) {
|
|
425
|
+
msg._reset();
|
|
426
|
+
DescribeTopologyRequest._fill(msg, bytes);
|
|
427
|
+
return msg;
|
|
428
|
+
}
|
|
429
|
+
static _fill(msg, bytes) {
|
|
430
|
+
const reader = new Reader(bytes);
|
|
431
|
+
let f;
|
|
432
|
+
while ((f = reader.field()) !== null) {
|
|
433
|
+
const [num, wire, value, raw] = f;
|
|
434
|
+
switch (num) {
|
|
435
|
+
case 1: msg.name = textDecoder.decode(value); break;
|
|
436
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
return msg;
|
|
440
|
+
}
|
|
441
|
+
_reset() {
|
|
442
|
+
this.name = "";
|
|
443
|
+
this.unknownFields = EMPTY_BYTES;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export class ListTopologiesRequest {
|
|
448
|
+
constructor({ } = {}) {
|
|
449
|
+
this.unknownFields = EMPTY_BYTES;
|
|
450
|
+
}
|
|
451
|
+
static encode(msg) {
|
|
452
|
+
const out = [];
|
|
453
|
+
putRaw(out, msg.unknownFields);
|
|
454
|
+
return new Uint8Array(out);
|
|
455
|
+
}
|
|
456
|
+
static decode(bytes) {
|
|
457
|
+
const msg = new ListTopologiesRequest();
|
|
458
|
+
ListTopologiesRequest._fill(msg, bytes);
|
|
459
|
+
return msg;
|
|
460
|
+
}
|
|
461
|
+
static decodeInto(msg, bytes) {
|
|
462
|
+
msg._reset();
|
|
463
|
+
ListTopologiesRequest._fill(msg, bytes);
|
|
464
|
+
return msg;
|
|
465
|
+
}
|
|
466
|
+
static _fill(msg, bytes) {
|
|
467
|
+
const reader = new Reader(bytes);
|
|
468
|
+
let f;
|
|
469
|
+
while ((f = reader.field()) !== null) {
|
|
470
|
+
const [num, wire, value, raw] = f;
|
|
471
|
+
switch (num) {
|
|
472
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return msg;
|
|
476
|
+
}
|
|
477
|
+
_reset() {
|
|
478
|
+
this.unknownFields = EMPTY_BYTES;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export class ListTopologiesResponse {
|
|
483
|
+
constructor({ topologies = [] } = {}) {
|
|
484
|
+
this.topologies = topologies;
|
|
485
|
+
this.unknownFields = EMPTY_BYTES;
|
|
486
|
+
}
|
|
487
|
+
static encode(msg) {
|
|
488
|
+
const out = [];
|
|
489
|
+
if (msg.topologies) for (const v of msg.topologies) putBytesField(out, 1, TopologyInfo.encode(v));
|
|
490
|
+
putRaw(out, msg.unknownFields);
|
|
491
|
+
return new Uint8Array(out);
|
|
492
|
+
}
|
|
493
|
+
static decode(bytes) {
|
|
494
|
+
const msg = new ListTopologiesResponse();
|
|
495
|
+
ListTopologiesResponse._fill(msg, bytes);
|
|
496
|
+
return msg;
|
|
497
|
+
}
|
|
498
|
+
static decodeInto(msg, bytes) {
|
|
499
|
+
msg._reset();
|
|
500
|
+
ListTopologiesResponse._fill(msg, bytes);
|
|
501
|
+
return msg;
|
|
502
|
+
}
|
|
503
|
+
static _fill(msg, bytes) {
|
|
504
|
+
const reader = new Reader(bytes);
|
|
505
|
+
let f;
|
|
506
|
+
while ((f = reader.field()) !== null) {
|
|
507
|
+
const [num, wire, value, raw] = f;
|
|
508
|
+
switch (num) {
|
|
509
|
+
case 1: msg.topologies.push(TopologyInfo.decode(value)); break;
|
|
510
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
return msg;
|
|
514
|
+
}
|
|
515
|
+
_reset() {
|
|
516
|
+
this.topologies = [];
|
|
517
|
+
this.unknownFields = EMPTY_BYTES;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export class DeleteTopologyRequest {
|
|
522
|
+
constructor({ name = "" } = {}) {
|
|
523
|
+
this.name = name;
|
|
524
|
+
this.unknownFields = EMPTY_BYTES;
|
|
525
|
+
}
|
|
526
|
+
static encode(msg) {
|
|
527
|
+
const out = [];
|
|
528
|
+
putStringField(out, 1, msg.name);
|
|
529
|
+
putRaw(out, msg.unknownFields);
|
|
530
|
+
return new Uint8Array(out);
|
|
531
|
+
}
|
|
532
|
+
static decode(bytes) {
|
|
533
|
+
const msg = new DeleteTopologyRequest();
|
|
534
|
+
DeleteTopologyRequest._fill(msg, bytes);
|
|
535
|
+
return msg;
|
|
536
|
+
}
|
|
537
|
+
static decodeInto(msg, bytes) {
|
|
538
|
+
msg._reset();
|
|
539
|
+
DeleteTopologyRequest._fill(msg, bytes);
|
|
540
|
+
return msg;
|
|
541
|
+
}
|
|
542
|
+
static _fill(msg, bytes) {
|
|
543
|
+
const reader = new Reader(bytes);
|
|
544
|
+
let f;
|
|
545
|
+
while ((f = reader.field()) !== null) {
|
|
546
|
+
const [num, wire, value, raw] = f;
|
|
547
|
+
switch (num) {
|
|
548
|
+
case 1: msg.name = textDecoder.decode(value); break;
|
|
549
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return msg;
|
|
553
|
+
}
|
|
554
|
+
_reset() {
|
|
555
|
+
this.name = "";
|
|
556
|
+
this.unknownFields = EMPTY_BYTES;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export class DeleteTopologyResponse {
|
|
561
|
+
constructor({ } = {}) {
|
|
562
|
+
this.unknownFields = EMPTY_BYTES;
|
|
563
|
+
}
|
|
564
|
+
static encode(msg) {
|
|
565
|
+
const out = [];
|
|
566
|
+
putRaw(out, msg.unknownFields);
|
|
567
|
+
return new Uint8Array(out);
|
|
568
|
+
}
|
|
569
|
+
static decode(bytes) {
|
|
570
|
+
const msg = new DeleteTopologyResponse();
|
|
571
|
+
DeleteTopologyResponse._fill(msg, bytes);
|
|
572
|
+
return msg;
|
|
573
|
+
}
|
|
574
|
+
static decodeInto(msg, bytes) {
|
|
575
|
+
msg._reset();
|
|
576
|
+
DeleteTopologyResponse._fill(msg, bytes);
|
|
577
|
+
return msg;
|
|
578
|
+
}
|
|
579
|
+
static _fill(msg, bytes) {
|
|
580
|
+
const reader = new Reader(bytes);
|
|
581
|
+
let f;
|
|
582
|
+
while ((f = reader.field()) !== null) {
|
|
583
|
+
const [num, wire, value, raw] = f;
|
|
584
|
+
switch (num) {
|
|
585
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return msg;
|
|
589
|
+
}
|
|
590
|
+
_reset() {
|
|
591
|
+
this.unknownFields = EMPTY_BYTES;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
export class GetStoreValueRequest {
|
|
596
|
+
constructor({ topology = "", key = "" } = {}) {
|
|
597
|
+
this.topology = topology;
|
|
598
|
+
this.key = key;
|
|
599
|
+
this.unknownFields = EMPTY_BYTES;
|
|
600
|
+
}
|
|
601
|
+
static encode(msg) {
|
|
602
|
+
const out = [];
|
|
603
|
+
putStringField(out, 1, msg.topology);
|
|
604
|
+
putStringField(out, 2, msg.key);
|
|
605
|
+
putRaw(out, msg.unknownFields);
|
|
606
|
+
return new Uint8Array(out);
|
|
607
|
+
}
|
|
608
|
+
static decode(bytes) {
|
|
609
|
+
const msg = new GetStoreValueRequest();
|
|
610
|
+
GetStoreValueRequest._fill(msg, bytes);
|
|
611
|
+
return msg;
|
|
612
|
+
}
|
|
613
|
+
static decodeInto(msg, bytes) {
|
|
614
|
+
msg._reset();
|
|
615
|
+
GetStoreValueRequest._fill(msg, bytes);
|
|
616
|
+
return msg;
|
|
617
|
+
}
|
|
618
|
+
static _fill(msg, bytes) {
|
|
619
|
+
const reader = new Reader(bytes);
|
|
620
|
+
let f;
|
|
621
|
+
while ((f = reader.field()) !== null) {
|
|
622
|
+
const [num, wire, value, raw] = f;
|
|
623
|
+
switch (num) {
|
|
624
|
+
case 1: msg.topology = textDecoder.decode(value); break;
|
|
625
|
+
case 2: msg.key = textDecoder.decode(value); break;
|
|
626
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
return msg;
|
|
630
|
+
}
|
|
631
|
+
_reset() {
|
|
632
|
+
this.topology = "";
|
|
633
|
+
this.key = "";
|
|
634
|
+
this.unknownFields = EMPTY_BYTES;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export class GetStoreValueResponse {
|
|
639
|
+
constructor({ found = false, key = "", value = 0n } = {}) {
|
|
640
|
+
this.found = found;
|
|
641
|
+
this.key = key;
|
|
642
|
+
this.value = value;
|
|
643
|
+
this.unknownFields = EMPTY_BYTES;
|
|
644
|
+
}
|
|
645
|
+
static encode(msg) {
|
|
646
|
+
const out = [];
|
|
647
|
+
putVarintField(out, 1, (msg.found ? 1n : 0n));
|
|
648
|
+
putStringField(out, 2, msg.key);
|
|
649
|
+
putVarintField(out, 3, BigInt(msg.value));
|
|
650
|
+
putRaw(out, msg.unknownFields);
|
|
651
|
+
return new Uint8Array(out);
|
|
652
|
+
}
|
|
653
|
+
static decode(bytes) {
|
|
654
|
+
const msg = new GetStoreValueResponse();
|
|
655
|
+
GetStoreValueResponse._fill(msg, bytes);
|
|
656
|
+
return msg;
|
|
657
|
+
}
|
|
658
|
+
static decodeInto(msg, bytes) {
|
|
659
|
+
msg._reset();
|
|
660
|
+
GetStoreValueResponse._fill(msg, bytes);
|
|
661
|
+
return msg;
|
|
662
|
+
}
|
|
663
|
+
static _fill(msg, bytes) {
|
|
664
|
+
const reader = new Reader(bytes);
|
|
665
|
+
let f;
|
|
666
|
+
while ((f = reader.field()) !== null) {
|
|
667
|
+
const [num, wire, value, raw] = f;
|
|
668
|
+
switch (num) {
|
|
669
|
+
case 1: msg.found = value !== 0n; break;
|
|
670
|
+
case 2: msg.key = textDecoder.decode(value); break;
|
|
671
|
+
case 3: msg.value = BigInt.asIntN(64, value); break;
|
|
672
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
return msg;
|
|
676
|
+
}
|
|
677
|
+
_reset() {
|
|
678
|
+
this.found = false;
|
|
679
|
+
this.key = "";
|
|
680
|
+
this.value = 0n;
|
|
681
|
+
this.unknownFields = EMPTY_BYTES;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
export class FetchWindowRequest {
|
|
686
|
+
constructor({ topology = "", key = "", windowStartMs = 0n, windowEndMs = 0n } = {}) {
|
|
687
|
+
this.topology = topology;
|
|
688
|
+
this.key = key;
|
|
689
|
+
this.windowStartMs = windowStartMs;
|
|
690
|
+
this.windowEndMs = windowEndMs;
|
|
691
|
+
this.unknownFields = EMPTY_BYTES;
|
|
692
|
+
}
|
|
693
|
+
static encode(msg) {
|
|
694
|
+
const out = [];
|
|
695
|
+
putStringField(out, 1, msg.topology);
|
|
696
|
+
putStringField(out, 2, msg.key);
|
|
697
|
+
putVarintField(out, 3, BigInt(msg.windowStartMs));
|
|
698
|
+
putVarintField(out, 4, BigInt(msg.windowEndMs));
|
|
699
|
+
putRaw(out, msg.unknownFields);
|
|
700
|
+
return new Uint8Array(out);
|
|
701
|
+
}
|
|
702
|
+
static decode(bytes) {
|
|
703
|
+
const msg = new FetchWindowRequest();
|
|
704
|
+
FetchWindowRequest._fill(msg, bytes);
|
|
705
|
+
return msg;
|
|
706
|
+
}
|
|
707
|
+
static decodeInto(msg, bytes) {
|
|
708
|
+
msg._reset();
|
|
709
|
+
FetchWindowRequest._fill(msg, bytes);
|
|
710
|
+
return msg;
|
|
711
|
+
}
|
|
712
|
+
static _fill(msg, bytes) {
|
|
713
|
+
const reader = new Reader(bytes);
|
|
714
|
+
let f;
|
|
715
|
+
while ((f = reader.field()) !== null) {
|
|
716
|
+
const [num, wire, value, raw] = f;
|
|
717
|
+
switch (num) {
|
|
718
|
+
case 1: msg.topology = textDecoder.decode(value); break;
|
|
719
|
+
case 2: msg.key = textDecoder.decode(value); break;
|
|
720
|
+
case 3: msg.windowStartMs = BigInt.asIntN(64, value); break;
|
|
721
|
+
case 4: msg.windowEndMs = BigInt.asIntN(64, value); break;
|
|
722
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
return msg;
|
|
726
|
+
}
|
|
727
|
+
_reset() {
|
|
728
|
+
this.topology = "";
|
|
729
|
+
this.key = "";
|
|
730
|
+
this.windowStartMs = 0n;
|
|
731
|
+
this.windowEndMs = 0n;
|
|
732
|
+
this.unknownFields = EMPTY_BYTES;
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
export class FetchWindowResponse {
|
|
737
|
+
constructor({ found = false, key = "", windowStartMs = 0n, windowEndMs = 0n, value = 0n } = {}) {
|
|
738
|
+
this.found = found;
|
|
739
|
+
this.key = key;
|
|
740
|
+
this.windowStartMs = windowStartMs;
|
|
741
|
+
this.windowEndMs = windowEndMs;
|
|
742
|
+
this.value = value;
|
|
743
|
+
this.unknownFields = EMPTY_BYTES;
|
|
744
|
+
}
|
|
745
|
+
static encode(msg) {
|
|
746
|
+
const out = [];
|
|
747
|
+
putVarintField(out, 1, (msg.found ? 1n : 0n));
|
|
748
|
+
putStringField(out, 2, msg.key);
|
|
749
|
+
putVarintField(out, 3, BigInt(msg.windowStartMs));
|
|
750
|
+
putVarintField(out, 4, BigInt(msg.windowEndMs));
|
|
751
|
+
putVarintField(out, 5, BigInt(msg.value));
|
|
752
|
+
putRaw(out, msg.unknownFields);
|
|
753
|
+
return new Uint8Array(out);
|
|
754
|
+
}
|
|
755
|
+
static decode(bytes) {
|
|
756
|
+
const msg = new FetchWindowResponse();
|
|
757
|
+
FetchWindowResponse._fill(msg, bytes);
|
|
758
|
+
return msg;
|
|
759
|
+
}
|
|
760
|
+
static decodeInto(msg, bytes) {
|
|
761
|
+
msg._reset();
|
|
762
|
+
FetchWindowResponse._fill(msg, bytes);
|
|
763
|
+
return msg;
|
|
764
|
+
}
|
|
765
|
+
static _fill(msg, bytes) {
|
|
766
|
+
const reader = new Reader(bytes);
|
|
767
|
+
let f;
|
|
768
|
+
while ((f = reader.field()) !== null) {
|
|
769
|
+
const [num, wire, value, raw] = f;
|
|
770
|
+
switch (num) {
|
|
771
|
+
case 1: msg.found = value !== 0n; break;
|
|
772
|
+
case 2: msg.key = textDecoder.decode(value); break;
|
|
773
|
+
case 3: msg.windowStartMs = BigInt.asIntN(64, value); break;
|
|
774
|
+
case 4: msg.windowEndMs = BigInt.asIntN(64, value); break;
|
|
775
|
+
case 5: msg.value = BigInt.asIntN(64, value); break;
|
|
776
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
return msg;
|
|
780
|
+
}
|
|
781
|
+
_reset() {
|
|
782
|
+
this.found = false;
|
|
783
|
+
this.key = "";
|
|
784
|
+
this.windowStartMs = 0n;
|
|
785
|
+
this.windowEndMs = 0n;
|
|
786
|
+
this.value = 0n;
|
|
787
|
+
this.unknownFields = EMPTY_BYTES;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
export class StoreEntry {
|
|
792
|
+
constructor({ key = "", value = 0n, windowStartMs = 0n, windowEndMs = 0n } = {}) {
|
|
793
|
+
this.key = key;
|
|
794
|
+
this.value = value;
|
|
795
|
+
this.windowStartMs = windowStartMs;
|
|
796
|
+
this.windowEndMs = windowEndMs;
|
|
797
|
+
this.unknownFields = EMPTY_BYTES;
|
|
798
|
+
}
|
|
799
|
+
static encode(msg) {
|
|
800
|
+
const out = [];
|
|
801
|
+
putStringField(out, 1, msg.key);
|
|
802
|
+
putVarintField(out, 2, BigInt(msg.value));
|
|
803
|
+
putVarintField(out, 3, BigInt(msg.windowStartMs));
|
|
804
|
+
putVarintField(out, 4, BigInt(msg.windowEndMs));
|
|
805
|
+
putRaw(out, msg.unknownFields);
|
|
806
|
+
return new Uint8Array(out);
|
|
807
|
+
}
|
|
808
|
+
static decode(bytes) {
|
|
809
|
+
const msg = new StoreEntry();
|
|
810
|
+
StoreEntry._fill(msg, bytes);
|
|
811
|
+
return msg;
|
|
812
|
+
}
|
|
813
|
+
static decodeInto(msg, bytes) {
|
|
814
|
+
msg._reset();
|
|
815
|
+
StoreEntry._fill(msg, bytes);
|
|
816
|
+
return msg;
|
|
817
|
+
}
|
|
818
|
+
static _fill(msg, bytes) {
|
|
819
|
+
const reader = new Reader(bytes);
|
|
820
|
+
let f;
|
|
821
|
+
while ((f = reader.field()) !== null) {
|
|
822
|
+
const [num, wire, value, raw] = f;
|
|
823
|
+
switch (num) {
|
|
824
|
+
case 1: msg.key = textDecoder.decode(value); break;
|
|
825
|
+
case 2: msg.value = BigInt.asIntN(64, value); break;
|
|
826
|
+
case 3: msg.windowStartMs = BigInt.asIntN(64, value); break;
|
|
827
|
+
case 4: msg.windowEndMs = BigInt.asIntN(64, value); break;
|
|
828
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
return msg;
|
|
832
|
+
}
|
|
833
|
+
_reset() {
|
|
834
|
+
this.key = "";
|
|
835
|
+
this.value = 0n;
|
|
836
|
+
this.windowStartMs = 0n;
|
|
837
|
+
this.windowEndMs = 0n;
|
|
838
|
+
this.unknownFields = EMPTY_BYTES;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
export class FetchRangeRequest {
|
|
843
|
+
constructor({ topology = "", prefix = "", limit = 0 } = {}) {
|
|
844
|
+
this.topology = topology;
|
|
845
|
+
this.prefix = prefix;
|
|
846
|
+
this.limit = limit;
|
|
847
|
+
this.unknownFields = EMPTY_BYTES;
|
|
848
|
+
}
|
|
849
|
+
static encode(msg) {
|
|
850
|
+
const out = [];
|
|
851
|
+
putStringField(out, 1, msg.topology);
|
|
852
|
+
putStringField(out, 2, msg.prefix);
|
|
853
|
+
putVarintField(out, 3, BigInt(msg.limit));
|
|
854
|
+
putRaw(out, msg.unknownFields);
|
|
855
|
+
return new Uint8Array(out);
|
|
856
|
+
}
|
|
857
|
+
static decode(bytes) {
|
|
858
|
+
const msg = new FetchRangeRequest();
|
|
859
|
+
FetchRangeRequest._fill(msg, bytes);
|
|
860
|
+
return msg;
|
|
861
|
+
}
|
|
862
|
+
static decodeInto(msg, bytes) {
|
|
863
|
+
msg._reset();
|
|
864
|
+
FetchRangeRequest._fill(msg, bytes);
|
|
865
|
+
return msg;
|
|
866
|
+
}
|
|
867
|
+
static _fill(msg, bytes) {
|
|
868
|
+
const reader = new Reader(bytes);
|
|
869
|
+
let f;
|
|
870
|
+
while ((f = reader.field()) !== null) {
|
|
871
|
+
const [num, wire, value, raw] = f;
|
|
872
|
+
switch (num) {
|
|
873
|
+
case 1: msg.topology = textDecoder.decode(value); break;
|
|
874
|
+
case 2: msg.prefix = textDecoder.decode(value); break;
|
|
875
|
+
case 3: msg.limit = Number(BigInt.asIntN(32, value)); break;
|
|
876
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
return msg;
|
|
880
|
+
}
|
|
881
|
+
_reset() {
|
|
882
|
+
this.topology = "";
|
|
883
|
+
this.prefix = "";
|
|
884
|
+
this.limit = 0;
|
|
885
|
+
this.unknownFields = EMPTY_BYTES;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
export class FetchRangeResponse {
|
|
890
|
+
constructor({ entries = [] } = {}) {
|
|
891
|
+
this.entries = entries;
|
|
892
|
+
this.unknownFields = EMPTY_BYTES;
|
|
893
|
+
}
|
|
894
|
+
static encode(msg) {
|
|
895
|
+
const out = [];
|
|
896
|
+
if (msg.entries) for (const v of msg.entries) putBytesField(out, 1, StoreEntry.encode(v));
|
|
897
|
+
putRaw(out, msg.unknownFields);
|
|
898
|
+
return new Uint8Array(out);
|
|
899
|
+
}
|
|
900
|
+
static decode(bytes) {
|
|
901
|
+
const msg = new FetchRangeResponse();
|
|
902
|
+
FetchRangeResponse._fill(msg, bytes);
|
|
903
|
+
return msg;
|
|
904
|
+
}
|
|
905
|
+
static decodeInto(msg, bytes) {
|
|
906
|
+
msg._reset();
|
|
907
|
+
FetchRangeResponse._fill(msg, bytes);
|
|
908
|
+
return msg;
|
|
909
|
+
}
|
|
910
|
+
static _fill(msg, bytes) {
|
|
911
|
+
const reader = new Reader(bytes);
|
|
912
|
+
let f;
|
|
913
|
+
while ((f = reader.field()) !== null) {
|
|
914
|
+
const [num, wire, value, raw] = f;
|
|
915
|
+
switch (num) {
|
|
916
|
+
case 1: msg.entries.push(StoreEntry.decode(value)); break;
|
|
917
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
return msg;
|
|
921
|
+
}
|
|
922
|
+
_reset() {
|
|
923
|
+
this.entries = [];
|
|
924
|
+
this.unknownFields = EMPTY_BYTES;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export class FetchWindowRangeRequest {
|
|
929
|
+
constructor({ topology = "", key = "", fromMs = 0n, toMs = 0n } = {}) {
|
|
930
|
+
this.topology = topology;
|
|
931
|
+
this.key = key;
|
|
932
|
+
this.fromMs = fromMs;
|
|
933
|
+
this.toMs = toMs;
|
|
934
|
+
this.unknownFields = EMPTY_BYTES;
|
|
935
|
+
}
|
|
936
|
+
static encode(msg) {
|
|
937
|
+
const out = [];
|
|
938
|
+
putStringField(out, 1, msg.topology);
|
|
939
|
+
putStringField(out, 2, msg.key);
|
|
940
|
+
putVarintField(out, 3, BigInt(msg.fromMs));
|
|
941
|
+
putVarintField(out, 4, BigInt(msg.toMs));
|
|
942
|
+
putRaw(out, msg.unknownFields);
|
|
943
|
+
return new Uint8Array(out);
|
|
944
|
+
}
|
|
945
|
+
static decode(bytes) {
|
|
946
|
+
const msg = new FetchWindowRangeRequest();
|
|
947
|
+
FetchWindowRangeRequest._fill(msg, bytes);
|
|
948
|
+
return msg;
|
|
949
|
+
}
|
|
950
|
+
static decodeInto(msg, bytes) {
|
|
951
|
+
msg._reset();
|
|
952
|
+
FetchWindowRangeRequest._fill(msg, bytes);
|
|
953
|
+
return msg;
|
|
954
|
+
}
|
|
955
|
+
static _fill(msg, bytes) {
|
|
956
|
+
const reader = new Reader(bytes);
|
|
957
|
+
let f;
|
|
958
|
+
while ((f = reader.field()) !== null) {
|
|
959
|
+
const [num, wire, value, raw] = f;
|
|
960
|
+
switch (num) {
|
|
961
|
+
case 1: msg.topology = textDecoder.decode(value); break;
|
|
962
|
+
case 2: msg.key = textDecoder.decode(value); break;
|
|
963
|
+
case 3: msg.fromMs = BigInt.asIntN(64, value); break;
|
|
964
|
+
case 4: msg.toMs = BigInt.asIntN(64, value); break;
|
|
965
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
return msg;
|
|
969
|
+
}
|
|
970
|
+
_reset() {
|
|
971
|
+
this.topology = "";
|
|
972
|
+
this.key = "";
|
|
973
|
+
this.fromMs = 0n;
|
|
974
|
+
this.toMs = 0n;
|
|
975
|
+
this.unknownFields = EMPTY_BYTES;
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
export class FetchWindowRangeResponse {
|
|
980
|
+
constructor({ entries = [] } = {}) {
|
|
981
|
+
this.entries = entries;
|
|
982
|
+
this.unknownFields = EMPTY_BYTES;
|
|
983
|
+
}
|
|
984
|
+
static encode(msg) {
|
|
985
|
+
const out = [];
|
|
986
|
+
if (msg.entries) for (const v of msg.entries) putBytesField(out, 1, StoreEntry.encode(v));
|
|
987
|
+
putRaw(out, msg.unknownFields);
|
|
988
|
+
return new Uint8Array(out);
|
|
989
|
+
}
|
|
990
|
+
static decode(bytes) {
|
|
991
|
+
const msg = new FetchWindowRangeResponse();
|
|
992
|
+
FetchWindowRangeResponse._fill(msg, bytes);
|
|
993
|
+
return msg;
|
|
994
|
+
}
|
|
995
|
+
static decodeInto(msg, bytes) {
|
|
996
|
+
msg._reset();
|
|
997
|
+
FetchWindowRangeResponse._fill(msg, bytes);
|
|
998
|
+
return msg;
|
|
999
|
+
}
|
|
1000
|
+
static _fill(msg, bytes) {
|
|
1001
|
+
const reader = new Reader(bytes);
|
|
1002
|
+
let f;
|
|
1003
|
+
while ((f = reader.field()) !== null) {
|
|
1004
|
+
const [num, wire, value, raw] = f;
|
|
1005
|
+
switch (num) {
|
|
1006
|
+
case 1: msg.entries.push(StoreEntry.decode(value)); break;
|
|
1007
|
+
default: msg.unknownFields = concatBytes(msg.unknownFields, raw); break;
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
return msg;
|
|
1011
|
+
}
|
|
1012
|
+
_reset() {
|
|
1013
|
+
this.entries = [];
|
|
1014
|
+
this.unknownFields = EMPTY_BYTES;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
|