@miradorlabs/web-grpc 2.20.0 → 2.21.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/package.json
CHANGED
|
@@ -247,6 +247,46 @@ export interface SloCorridorStatus {
|
|
|
247
247
|
state: SloCorridorState;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
export interface GetSloTimelineRequest {
|
|
251
|
+
organizationId: string;
|
|
252
|
+
projectId: string;
|
|
253
|
+
sloId: string;
|
|
254
|
+
/** end_time: the timeline's right edge; truncated down to the UTC hour. Unset = now(). */
|
|
255
|
+
endTime:
|
|
256
|
+
| Date
|
|
257
|
+
| undefined;
|
|
258
|
+
/** bucket_count: number of trailing 1-hour buckets (0 = default 168 = 7d; max 2000). */
|
|
259
|
+
bucketCount: number;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface GetSloTimelineResponse {
|
|
263
|
+
status: ResponseStatus | undefined;
|
|
264
|
+
timeline: SloTimeline | undefined;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* SloTimeline is one SLO's per-hour health over a trailing window of completed UTC
|
|
269
|
+
* hours. Buckets are SPARSE: an hour with no eligible sample is omitted (render it
|
|
270
|
+
* no-data). Each bucket is the worst (lowest-compliance) corridor that hour.
|
|
271
|
+
*/
|
|
272
|
+
export interface SloTimeline {
|
|
273
|
+
sloId: string;
|
|
274
|
+
enabled: boolean;
|
|
275
|
+
target: number;
|
|
276
|
+
bucketSeconds: number;
|
|
277
|
+
windowStart: Date | undefined;
|
|
278
|
+
windowEnd: Date | undefined;
|
|
279
|
+
buckets: SloTimelineBucket[];
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface SloTimelineBucket {
|
|
283
|
+
bucketStart: Date | undefined;
|
|
284
|
+
eligibleCount: number;
|
|
285
|
+
goodCount: number;
|
|
286
|
+
compliance: number;
|
|
287
|
+
state: SloCorridorState;
|
|
288
|
+
}
|
|
289
|
+
|
|
250
290
|
function createBaseSlo(): Slo {
|
|
251
291
|
return {
|
|
252
292
|
id: "",
|
|
@@ -2249,6 +2289,548 @@ export const SloCorridorStatus: MessageFns<SloCorridorStatus> = {
|
|
|
2249
2289
|
},
|
|
2250
2290
|
};
|
|
2251
2291
|
|
|
2292
|
+
function createBaseGetSloTimelineRequest(): GetSloTimelineRequest {
|
|
2293
|
+
return { organizationId: "", projectId: "", sloId: "", endTime: undefined, bucketCount: 0 };
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
export const GetSloTimelineRequest: MessageFns<GetSloTimelineRequest> = {
|
|
2297
|
+
encode(message: GetSloTimelineRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2298
|
+
if (message.organizationId !== "") {
|
|
2299
|
+
writer.uint32(10).string(message.organizationId);
|
|
2300
|
+
}
|
|
2301
|
+
if (message.projectId !== "") {
|
|
2302
|
+
writer.uint32(18).string(message.projectId);
|
|
2303
|
+
}
|
|
2304
|
+
if (message.sloId !== "") {
|
|
2305
|
+
writer.uint32(26).string(message.sloId);
|
|
2306
|
+
}
|
|
2307
|
+
if (message.endTime !== undefined) {
|
|
2308
|
+
Timestamp.encode(toTimestamp(message.endTime), writer.uint32(34).fork()).join();
|
|
2309
|
+
}
|
|
2310
|
+
if (message.bucketCount !== 0) {
|
|
2311
|
+
writer.uint32(40).uint32(message.bucketCount);
|
|
2312
|
+
}
|
|
2313
|
+
return writer;
|
|
2314
|
+
},
|
|
2315
|
+
|
|
2316
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSloTimelineRequest {
|
|
2317
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2318
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2319
|
+
const message = createBaseGetSloTimelineRequest();
|
|
2320
|
+
while (reader.pos < end) {
|
|
2321
|
+
const tag = reader.uint32();
|
|
2322
|
+
switch (tag >>> 3) {
|
|
2323
|
+
case 1: {
|
|
2324
|
+
if (tag !== 10) {
|
|
2325
|
+
break;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
message.organizationId = reader.string();
|
|
2329
|
+
continue;
|
|
2330
|
+
}
|
|
2331
|
+
case 2: {
|
|
2332
|
+
if (tag !== 18) {
|
|
2333
|
+
break;
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
message.projectId = reader.string();
|
|
2337
|
+
continue;
|
|
2338
|
+
}
|
|
2339
|
+
case 3: {
|
|
2340
|
+
if (tag !== 26) {
|
|
2341
|
+
break;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
message.sloId = reader.string();
|
|
2345
|
+
continue;
|
|
2346
|
+
}
|
|
2347
|
+
case 4: {
|
|
2348
|
+
if (tag !== 34) {
|
|
2349
|
+
break;
|
|
2350
|
+
}
|
|
2351
|
+
|
|
2352
|
+
message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2353
|
+
continue;
|
|
2354
|
+
}
|
|
2355
|
+
case 5: {
|
|
2356
|
+
if (tag !== 40) {
|
|
2357
|
+
break;
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
message.bucketCount = reader.uint32();
|
|
2361
|
+
continue;
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2365
|
+
break;
|
|
2366
|
+
}
|
|
2367
|
+
reader.skip(tag & 7);
|
|
2368
|
+
}
|
|
2369
|
+
return message;
|
|
2370
|
+
},
|
|
2371
|
+
|
|
2372
|
+
fromJSON(object: any): GetSloTimelineRequest {
|
|
2373
|
+
return {
|
|
2374
|
+
organizationId: isSet(object.organizationId)
|
|
2375
|
+
? globalThis.String(object.organizationId)
|
|
2376
|
+
: isSet(object.organization_id)
|
|
2377
|
+
? globalThis.String(object.organization_id)
|
|
2378
|
+
: "",
|
|
2379
|
+
projectId: isSet(object.projectId)
|
|
2380
|
+
? globalThis.String(object.projectId)
|
|
2381
|
+
: isSet(object.project_id)
|
|
2382
|
+
? globalThis.String(object.project_id)
|
|
2383
|
+
: "",
|
|
2384
|
+
sloId: isSet(object.sloId)
|
|
2385
|
+
? globalThis.String(object.sloId)
|
|
2386
|
+
: isSet(object.slo_id)
|
|
2387
|
+
? globalThis.String(object.slo_id)
|
|
2388
|
+
: "",
|
|
2389
|
+
endTime: isSet(object.endTime)
|
|
2390
|
+
? fromJsonTimestamp(object.endTime)
|
|
2391
|
+
: isSet(object.end_time)
|
|
2392
|
+
? fromJsonTimestamp(object.end_time)
|
|
2393
|
+
: undefined,
|
|
2394
|
+
bucketCount: isSet(object.bucketCount)
|
|
2395
|
+
? globalThis.Number(object.bucketCount)
|
|
2396
|
+
: isSet(object.bucket_count)
|
|
2397
|
+
? globalThis.Number(object.bucket_count)
|
|
2398
|
+
: 0,
|
|
2399
|
+
};
|
|
2400
|
+
},
|
|
2401
|
+
|
|
2402
|
+
toJSON(message: GetSloTimelineRequest): unknown {
|
|
2403
|
+
const obj: any = {};
|
|
2404
|
+
if (message.organizationId !== "") {
|
|
2405
|
+
obj.organizationId = message.organizationId;
|
|
2406
|
+
}
|
|
2407
|
+
if (message.projectId !== "") {
|
|
2408
|
+
obj.projectId = message.projectId;
|
|
2409
|
+
}
|
|
2410
|
+
if (message.sloId !== "") {
|
|
2411
|
+
obj.sloId = message.sloId;
|
|
2412
|
+
}
|
|
2413
|
+
if (message.endTime !== undefined) {
|
|
2414
|
+
obj.endTime = message.endTime.toISOString();
|
|
2415
|
+
}
|
|
2416
|
+
if (message.bucketCount !== 0) {
|
|
2417
|
+
obj.bucketCount = Math.round(message.bucketCount);
|
|
2418
|
+
}
|
|
2419
|
+
return obj;
|
|
2420
|
+
},
|
|
2421
|
+
|
|
2422
|
+
create<I extends Exact<DeepPartial<GetSloTimelineRequest>, I>>(base?: I): GetSloTimelineRequest {
|
|
2423
|
+
return GetSloTimelineRequest.fromPartial(base ?? ({} as any));
|
|
2424
|
+
},
|
|
2425
|
+
fromPartial<I extends Exact<DeepPartial<GetSloTimelineRequest>, I>>(object: I): GetSloTimelineRequest {
|
|
2426
|
+
const message = createBaseGetSloTimelineRequest();
|
|
2427
|
+
message.organizationId = object.organizationId ?? "";
|
|
2428
|
+
message.projectId = object.projectId ?? "";
|
|
2429
|
+
message.sloId = object.sloId ?? "";
|
|
2430
|
+
message.endTime = object.endTime ?? undefined;
|
|
2431
|
+
message.bucketCount = object.bucketCount ?? 0;
|
|
2432
|
+
return message;
|
|
2433
|
+
},
|
|
2434
|
+
};
|
|
2435
|
+
|
|
2436
|
+
function createBaseGetSloTimelineResponse(): GetSloTimelineResponse {
|
|
2437
|
+
return { status: undefined, timeline: undefined };
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
export const GetSloTimelineResponse: MessageFns<GetSloTimelineResponse> = {
|
|
2441
|
+
encode(message: GetSloTimelineResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2442
|
+
if (message.status !== undefined) {
|
|
2443
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2444
|
+
}
|
|
2445
|
+
if (message.timeline !== undefined) {
|
|
2446
|
+
SloTimeline.encode(message.timeline, writer.uint32(18).fork()).join();
|
|
2447
|
+
}
|
|
2448
|
+
return writer;
|
|
2449
|
+
},
|
|
2450
|
+
|
|
2451
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetSloTimelineResponse {
|
|
2452
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2453
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2454
|
+
const message = createBaseGetSloTimelineResponse();
|
|
2455
|
+
while (reader.pos < end) {
|
|
2456
|
+
const tag = reader.uint32();
|
|
2457
|
+
switch (tag >>> 3) {
|
|
2458
|
+
case 1: {
|
|
2459
|
+
if (tag !== 10) {
|
|
2460
|
+
break;
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2464
|
+
continue;
|
|
2465
|
+
}
|
|
2466
|
+
case 2: {
|
|
2467
|
+
if (tag !== 18) {
|
|
2468
|
+
break;
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
message.timeline = SloTimeline.decode(reader, reader.uint32());
|
|
2472
|
+
continue;
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2476
|
+
break;
|
|
2477
|
+
}
|
|
2478
|
+
reader.skip(tag & 7);
|
|
2479
|
+
}
|
|
2480
|
+
return message;
|
|
2481
|
+
},
|
|
2482
|
+
|
|
2483
|
+
fromJSON(object: any): GetSloTimelineResponse {
|
|
2484
|
+
return {
|
|
2485
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2486
|
+
timeline: isSet(object.timeline) ? SloTimeline.fromJSON(object.timeline) : undefined,
|
|
2487
|
+
};
|
|
2488
|
+
},
|
|
2489
|
+
|
|
2490
|
+
toJSON(message: GetSloTimelineResponse): unknown {
|
|
2491
|
+
const obj: any = {};
|
|
2492
|
+
if (message.status !== undefined) {
|
|
2493
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
2494
|
+
}
|
|
2495
|
+
if (message.timeline !== undefined) {
|
|
2496
|
+
obj.timeline = SloTimeline.toJSON(message.timeline);
|
|
2497
|
+
}
|
|
2498
|
+
return obj;
|
|
2499
|
+
},
|
|
2500
|
+
|
|
2501
|
+
create<I extends Exact<DeepPartial<GetSloTimelineResponse>, I>>(base?: I): GetSloTimelineResponse {
|
|
2502
|
+
return GetSloTimelineResponse.fromPartial(base ?? ({} as any));
|
|
2503
|
+
},
|
|
2504
|
+
fromPartial<I extends Exact<DeepPartial<GetSloTimelineResponse>, I>>(object: I): GetSloTimelineResponse {
|
|
2505
|
+
const message = createBaseGetSloTimelineResponse();
|
|
2506
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
2507
|
+
? ResponseStatus.fromPartial(object.status)
|
|
2508
|
+
: undefined;
|
|
2509
|
+
message.timeline = (object.timeline !== undefined && object.timeline !== null)
|
|
2510
|
+
? SloTimeline.fromPartial(object.timeline)
|
|
2511
|
+
: undefined;
|
|
2512
|
+
return message;
|
|
2513
|
+
},
|
|
2514
|
+
};
|
|
2515
|
+
|
|
2516
|
+
function createBaseSloTimeline(): SloTimeline {
|
|
2517
|
+
return {
|
|
2518
|
+
sloId: "",
|
|
2519
|
+
enabled: false,
|
|
2520
|
+
target: 0,
|
|
2521
|
+
bucketSeconds: 0,
|
|
2522
|
+
windowStart: undefined,
|
|
2523
|
+
windowEnd: undefined,
|
|
2524
|
+
buckets: [],
|
|
2525
|
+
};
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
export const SloTimeline: MessageFns<SloTimeline> = {
|
|
2529
|
+
encode(message: SloTimeline, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2530
|
+
if (message.sloId !== "") {
|
|
2531
|
+
writer.uint32(10).string(message.sloId);
|
|
2532
|
+
}
|
|
2533
|
+
if (message.enabled !== false) {
|
|
2534
|
+
writer.uint32(16).bool(message.enabled);
|
|
2535
|
+
}
|
|
2536
|
+
if (message.target !== 0) {
|
|
2537
|
+
writer.uint32(25).double(message.target);
|
|
2538
|
+
}
|
|
2539
|
+
if (message.bucketSeconds !== 0) {
|
|
2540
|
+
writer.uint32(32).int64(message.bucketSeconds);
|
|
2541
|
+
}
|
|
2542
|
+
if (message.windowStart !== undefined) {
|
|
2543
|
+
Timestamp.encode(toTimestamp(message.windowStart), writer.uint32(42).fork()).join();
|
|
2544
|
+
}
|
|
2545
|
+
if (message.windowEnd !== undefined) {
|
|
2546
|
+
Timestamp.encode(toTimestamp(message.windowEnd), writer.uint32(50).fork()).join();
|
|
2547
|
+
}
|
|
2548
|
+
for (const v of message.buckets) {
|
|
2549
|
+
SloTimelineBucket.encode(v!, writer.uint32(58).fork()).join();
|
|
2550
|
+
}
|
|
2551
|
+
return writer;
|
|
2552
|
+
},
|
|
2553
|
+
|
|
2554
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SloTimeline {
|
|
2555
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2556
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2557
|
+
const message = createBaseSloTimeline();
|
|
2558
|
+
while (reader.pos < end) {
|
|
2559
|
+
const tag = reader.uint32();
|
|
2560
|
+
switch (tag >>> 3) {
|
|
2561
|
+
case 1: {
|
|
2562
|
+
if (tag !== 10) {
|
|
2563
|
+
break;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
message.sloId = reader.string();
|
|
2567
|
+
continue;
|
|
2568
|
+
}
|
|
2569
|
+
case 2: {
|
|
2570
|
+
if (tag !== 16) {
|
|
2571
|
+
break;
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
message.enabled = reader.bool();
|
|
2575
|
+
continue;
|
|
2576
|
+
}
|
|
2577
|
+
case 3: {
|
|
2578
|
+
if (tag !== 25) {
|
|
2579
|
+
break;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
message.target = reader.double();
|
|
2583
|
+
continue;
|
|
2584
|
+
}
|
|
2585
|
+
case 4: {
|
|
2586
|
+
if (tag !== 32) {
|
|
2587
|
+
break;
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
message.bucketSeconds = longToNumber(reader.int64());
|
|
2591
|
+
continue;
|
|
2592
|
+
}
|
|
2593
|
+
case 5: {
|
|
2594
|
+
if (tag !== 42) {
|
|
2595
|
+
break;
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
message.windowStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2599
|
+
continue;
|
|
2600
|
+
}
|
|
2601
|
+
case 6: {
|
|
2602
|
+
if (tag !== 50) {
|
|
2603
|
+
break;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
message.windowEnd = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2607
|
+
continue;
|
|
2608
|
+
}
|
|
2609
|
+
case 7: {
|
|
2610
|
+
if (tag !== 58) {
|
|
2611
|
+
break;
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
message.buckets.push(SloTimelineBucket.decode(reader, reader.uint32()));
|
|
2615
|
+
continue;
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2619
|
+
break;
|
|
2620
|
+
}
|
|
2621
|
+
reader.skip(tag & 7);
|
|
2622
|
+
}
|
|
2623
|
+
return message;
|
|
2624
|
+
},
|
|
2625
|
+
|
|
2626
|
+
fromJSON(object: any): SloTimeline {
|
|
2627
|
+
return {
|
|
2628
|
+
sloId: isSet(object.sloId)
|
|
2629
|
+
? globalThis.String(object.sloId)
|
|
2630
|
+
: isSet(object.slo_id)
|
|
2631
|
+
? globalThis.String(object.slo_id)
|
|
2632
|
+
: "",
|
|
2633
|
+
enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
|
|
2634
|
+
target: isSet(object.target) ? globalThis.Number(object.target) : 0,
|
|
2635
|
+
bucketSeconds: isSet(object.bucketSeconds)
|
|
2636
|
+
? globalThis.Number(object.bucketSeconds)
|
|
2637
|
+
: isSet(object.bucket_seconds)
|
|
2638
|
+
? globalThis.Number(object.bucket_seconds)
|
|
2639
|
+
: 0,
|
|
2640
|
+
windowStart: isSet(object.windowStart)
|
|
2641
|
+
? fromJsonTimestamp(object.windowStart)
|
|
2642
|
+
: isSet(object.window_start)
|
|
2643
|
+
? fromJsonTimestamp(object.window_start)
|
|
2644
|
+
: undefined,
|
|
2645
|
+
windowEnd: isSet(object.windowEnd)
|
|
2646
|
+
? fromJsonTimestamp(object.windowEnd)
|
|
2647
|
+
: isSet(object.window_end)
|
|
2648
|
+
? fromJsonTimestamp(object.window_end)
|
|
2649
|
+
: undefined,
|
|
2650
|
+
buckets: globalThis.Array.isArray(object?.buckets)
|
|
2651
|
+
? object.buckets.map((e: any) => SloTimelineBucket.fromJSON(e))
|
|
2652
|
+
: [],
|
|
2653
|
+
};
|
|
2654
|
+
},
|
|
2655
|
+
|
|
2656
|
+
toJSON(message: SloTimeline): unknown {
|
|
2657
|
+
const obj: any = {};
|
|
2658
|
+
if (message.sloId !== "") {
|
|
2659
|
+
obj.sloId = message.sloId;
|
|
2660
|
+
}
|
|
2661
|
+
if (message.enabled !== false) {
|
|
2662
|
+
obj.enabled = message.enabled;
|
|
2663
|
+
}
|
|
2664
|
+
if (message.target !== 0) {
|
|
2665
|
+
obj.target = message.target;
|
|
2666
|
+
}
|
|
2667
|
+
if (message.bucketSeconds !== 0) {
|
|
2668
|
+
obj.bucketSeconds = Math.round(message.bucketSeconds);
|
|
2669
|
+
}
|
|
2670
|
+
if (message.windowStart !== undefined) {
|
|
2671
|
+
obj.windowStart = message.windowStart.toISOString();
|
|
2672
|
+
}
|
|
2673
|
+
if (message.windowEnd !== undefined) {
|
|
2674
|
+
obj.windowEnd = message.windowEnd.toISOString();
|
|
2675
|
+
}
|
|
2676
|
+
if (message.buckets?.length) {
|
|
2677
|
+
obj.buckets = message.buckets.map((e) => SloTimelineBucket.toJSON(e));
|
|
2678
|
+
}
|
|
2679
|
+
return obj;
|
|
2680
|
+
},
|
|
2681
|
+
|
|
2682
|
+
create<I extends Exact<DeepPartial<SloTimeline>, I>>(base?: I): SloTimeline {
|
|
2683
|
+
return SloTimeline.fromPartial(base ?? ({} as any));
|
|
2684
|
+
},
|
|
2685
|
+
fromPartial<I extends Exact<DeepPartial<SloTimeline>, I>>(object: I): SloTimeline {
|
|
2686
|
+
const message = createBaseSloTimeline();
|
|
2687
|
+
message.sloId = object.sloId ?? "";
|
|
2688
|
+
message.enabled = object.enabled ?? false;
|
|
2689
|
+
message.target = object.target ?? 0;
|
|
2690
|
+
message.bucketSeconds = object.bucketSeconds ?? 0;
|
|
2691
|
+
message.windowStart = object.windowStart ?? undefined;
|
|
2692
|
+
message.windowEnd = object.windowEnd ?? undefined;
|
|
2693
|
+
message.buckets = object.buckets?.map((e) => SloTimelineBucket.fromPartial(e)) || [];
|
|
2694
|
+
return message;
|
|
2695
|
+
},
|
|
2696
|
+
};
|
|
2697
|
+
|
|
2698
|
+
function createBaseSloTimelineBucket(): SloTimelineBucket {
|
|
2699
|
+
return { bucketStart: undefined, eligibleCount: 0, goodCount: 0, compliance: 0, state: 0 };
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
export const SloTimelineBucket: MessageFns<SloTimelineBucket> = {
|
|
2703
|
+
encode(message: SloTimelineBucket, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2704
|
+
if (message.bucketStart !== undefined) {
|
|
2705
|
+
Timestamp.encode(toTimestamp(message.bucketStart), writer.uint32(10).fork()).join();
|
|
2706
|
+
}
|
|
2707
|
+
if (message.eligibleCount !== 0) {
|
|
2708
|
+
writer.uint32(16).uint64(message.eligibleCount);
|
|
2709
|
+
}
|
|
2710
|
+
if (message.goodCount !== 0) {
|
|
2711
|
+
writer.uint32(24).uint64(message.goodCount);
|
|
2712
|
+
}
|
|
2713
|
+
if (message.compliance !== 0) {
|
|
2714
|
+
writer.uint32(33).double(message.compliance);
|
|
2715
|
+
}
|
|
2716
|
+
if (message.state !== 0) {
|
|
2717
|
+
writer.uint32(40).int32(message.state);
|
|
2718
|
+
}
|
|
2719
|
+
return writer;
|
|
2720
|
+
},
|
|
2721
|
+
|
|
2722
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SloTimelineBucket {
|
|
2723
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2724
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2725
|
+
const message = createBaseSloTimelineBucket();
|
|
2726
|
+
while (reader.pos < end) {
|
|
2727
|
+
const tag = reader.uint32();
|
|
2728
|
+
switch (tag >>> 3) {
|
|
2729
|
+
case 1: {
|
|
2730
|
+
if (tag !== 10) {
|
|
2731
|
+
break;
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
message.bucketStart = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2735
|
+
continue;
|
|
2736
|
+
}
|
|
2737
|
+
case 2: {
|
|
2738
|
+
if (tag !== 16) {
|
|
2739
|
+
break;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
message.eligibleCount = longToNumber(reader.uint64());
|
|
2743
|
+
continue;
|
|
2744
|
+
}
|
|
2745
|
+
case 3: {
|
|
2746
|
+
if (tag !== 24) {
|
|
2747
|
+
break;
|
|
2748
|
+
}
|
|
2749
|
+
|
|
2750
|
+
message.goodCount = longToNumber(reader.uint64());
|
|
2751
|
+
continue;
|
|
2752
|
+
}
|
|
2753
|
+
case 4: {
|
|
2754
|
+
if (tag !== 33) {
|
|
2755
|
+
break;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
message.compliance = reader.double();
|
|
2759
|
+
continue;
|
|
2760
|
+
}
|
|
2761
|
+
case 5: {
|
|
2762
|
+
if (tag !== 40) {
|
|
2763
|
+
break;
|
|
2764
|
+
}
|
|
2765
|
+
|
|
2766
|
+
message.state = reader.int32() as any;
|
|
2767
|
+
continue;
|
|
2768
|
+
}
|
|
2769
|
+
}
|
|
2770
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2771
|
+
break;
|
|
2772
|
+
}
|
|
2773
|
+
reader.skip(tag & 7);
|
|
2774
|
+
}
|
|
2775
|
+
return message;
|
|
2776
|
+
},
|
|
2777
|
+
|
|
2778
|
+
fromJSON(object: any): SloTimelineBucket {
|
|
2779
|
+
return {
|
|
2780
|
+
bucketStart: isSet(object.bucketStart)
|
|
2781
|
+
? fromJsonTimestamp(object.bucketStart)
|
|
2782
|
+
: isSet(object.bucket_start)
|
|
2783
|
+
? fromJsonTimestamp(object.bucket_start)
|
|
2784
|
+
: undefined,
|
|
2785
|
+
eligibleCount: isSet(object.eligibleCount)
|
|
2786
|
+
? globalThis.Number(object.eligibleCount)
|
|
2787
|
+
: isSet(object.eligible_count)
|
|
2788
|
+
? globalThis.Number(object.eligible_count)
|
|
2789
|
+
: 0,
|
|
2790
|
+
goodCount: isSet(object.goodCount)
|
|
2791
|
+
? globalThis.Number(object.goodCount)
|
|
2792
|
+
: isSet(object.good_count)
|
|
2793
|
+
? globalThis.Number(object.good_count)
|
|
2794
|
+
: 0,
|
|
2795
|
+
compliance: isSet(object.compliance) ? globalThis.Number(object.compliance) : 0,
|
|
2796
|
+
state: isSet(object.state) ? sloCorridorStateFromJSON(object.state) : 0,
|
|
2797
|
+
};
|
|
2798
|
+
},
|
|
2799
|
+
|
|
2800
|
+
toJSON(message: SloTimelineBucket): unknown {
|
|
2801
|
+
const obj: any = {};
|
|
2802
|
+
if (message.bucketStart !== undefined) {
|
|
2803
|
+
obj.bucketStart = message.bucketStart.toISOString();
|
|
2804
|
+
}
|
|
2805
|
+
if (message.eligibleCount !== 0) {
|
|
2806
|
+
obj.eligibleCount = Math.round(message.eligibleCount);
|
|
2807
|
+
}
|
|
2808
|
+
if (message.goodCount !== 0) {
|
|
2809
|
+
obj.goodCount = Math.round(message.goodCount);
|
|
2810
|
+
}
|
|
2811
|
+
if (message.compliance !== 0) {
|
|
2812
|
+
obj.compliance = message.compliance;
|
|
2813
|
+
}
|
|
2814
|
+
if (message.state !== 0) {
|
|
2815
|
+
obj.state = sloCorridorStateToJSON(message.state);
|
|
2816
|
+
}
|
|
2817
|
+
return obj;
|
|
2818
|
+
},
|
|
2819
|
+
|
|
2820
|
+
create<I extends Exact<DeepPartial<SloTimelineBucket>, I>>(base?: I): SloTimelineBucket {
|
|
2821
|
+
return SloTimelineBucket.fromPartial(base ?? ({} as any));
|
|
2822
|
+
},
|
|
2823
|
+
fromPartial<I extends Exact<DeepPartial<SloTimelineBucket>, I>>(object: I): SloTimelineBucket {
|
|
2824
|
+
const message = createBaseSloTimelineBucket();
|
|
2825
|
+
message.bucketStart = object.bucketStart ?? undefined;
|
|
2826
|
+
message.eligibleCount = object.eligibleCount ?? 0;
|
|
2827
|
+
message.goodCount = object.goodCount ?? 0;
|
|
2828
|
+
message.compliance = object.compliance ?? 0;
|
|
2829
|
+
message.state = object.state ?? 0;
|
|
2830
|
+
return message;
|
|
2831
|
+
},
|
|
2832
|
+
};
|
|
2833
|
+
|
|
2252
2834
|
/** SloGatewayService provides web client access to SLO definitions. */
|
|
2253
2835
|
export interface SloGatewayService {
|
|
2254
2836
|
CreateSlo(request: CreateSloRequest, metadata?: Metadata): Promise<CreateSloResponse>;
|
|
@@ -2257,6 +2839,7 @@ export interface SloGatewayService {
|
|
|
2257
2839
|
UpdateSlo(request: UpdateSloRequest, metadata?: Metadata): Promise<UpdateSloResponse>;
|
|
2258
2840
|
DeleteSlo(request: DeleteSloRequest, metadata?: Metadata): Promise<DeleteSloResponse>;
|
|
2259
2841
|
GetSloStatus(request: GetSloStatusRequest, metadata?: Metadata): Promise<GetSloStatusResponse>;
|
|
2842
|
+
GetSloTimeline(request: GetSloTimelineRequest, metadata?: Metadata): Promise<GetSloTimelineResponse>;
|
|
2260
2843
|
}
|
|
2261
2844
|
|
|
2262
2845
|
export const SloGatewayServiceServiceName = "gateway.web.v1.SloGatewayService";
|
|
@@ -2272,6 +2855,7 @@ export class SloGatewayServiceClientImpl implements SloGatewayService {
|
|
|
2272
2855
|
this.UpdateSlo = this.UpdateSlo.bind(this);
|
|
2273
2856
|
this.DeleteSlo = this.DeleteSlo.bind(this);
|
|
2274
2857
|
this.GetSloStatus = this.GetSloStatus.bind(this);
|
|
2858
|
+
this.GetSloTimeline = this.GetSloTimeline.bind(this);
|
|
2275
2859
|
}
|
|
2276
2860
|
CreateSlo(request: CreateSloRequest, metadata?: Metadata): Promise<CreateSloResponse> {
|
|
2277
2861
|
const data = CreateSloRequest.encode(request).finish();
|
|
@@ -2308,6 +2892,12 @@ export class SloGatewayServiceClientImpl implements SloGatewayService {
|
|
|
2308
2892
|
const promise = this.rpc.request(this.service, "GetSloStatus", data, metadata);
|
|
2309
2893
|
return promise.then((data) => GetSloStatusResponse.decode(new BinaryReader(data)));
|
|
2310
2894
|
}
|
|
2895
|
+
|
|
2896
|
+
GetSloTimeline(request: GetSloTimelineRequest, metadata?: Metadata): Promise<GetSloTimelineResponse> {
|
|
2897
|
+
const data = GetSloTimelineRequest.encode(request).finish();
|
|
2898
|
+
const promise = this.rpc.request(this.service, "GetSloTimeline", data, metadata);
|
|
2899
|
+
return promise.then((data) => GetSloTimelineResponse.decode(new BinaryReader(data)));
|
|
2900
|
+
}
|
|
2311
2901
|
}
|
|
2312
2902
|
|
|
2313
2903
|
interface Rpc {
|
|
@@ -94,6 +94,28 @@ function deserialize_gateway_web_v1_GetSloStatusResponse(buffer_arg) {
|
|
|
94
94
|
return proto_gateway_web_v1_slo_gateway_pb.GetSloStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
function serialize_gateway_web_v1_GetSloTimelineRequest(arg) {
|
|
98
|
+
if (!(arg instanceof proto_gateway_web_v1_slo_gateway_pb.GetSloTimelineRequest)) {
|
|
99
|
+
throw new Error('Expected argument of type gateway.web.v1.GetSloTimelineRequest');
|
|
100
|
+
}
|
|
101
|
+
return Buffer.from(arg.serializeBinary());
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function deserialize_gateway_web_v1_GetSloTimelineRequest(buffer_arg) {
|
|
105
|
+
return proto_gateway_web_v1_slo_gateway_pb.GetSloTimelineRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function serialize_gateway_web_v1_GetSloTimelineResponse(arg) {
|
|
109
|
+
if (!(arg instanceof proto_gateway_web_v1_slo_gateway_pb.GetSloTimelineResponse)) {
|
|
110
|
+
throw new Error('Expected argument of type gateway.web.v1.GetSloTimelineResponse');
|
|
111
|
+
}
|
|
112
|
+
return Buffer.from(arg.serializeBinary());
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function deserialize_gateway_web_v1_GetSloTimelineResponse(buffer_arg) {
|
|
116
|
+
return proto_gateway_web_v1_slo_gateway_pb.GetSloTimelineResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
117
|
+
}
|
|
118
|
+
|
|
97
119
|
function serialize_gateway_web_v1_ListSlosRequest(arg) {
|
|
98
120
|
if (!(arg instanceof proto_gateway_web_v1_slo_gateway_pb.ListSlosRequest)) {
|
|
99
121
|
throw new Error('Expected argument of type gateway.web.v1.ListSlosRequest');
|
|
@@ -207,6 +229,17 @@ var SloGatewayServiceService = exports.SloGatewayServiceService = {
|
|
|
207
229
|
responseSerialize: serialize_gateway_web_v1_GetSloStatusResponse,
|
|
208
230
|
responseDeserialize: deserialize_gateway_web_v1_GetSloStatusResponse,
|
|
209
231
|
},
|
|
232
|
+
getSloTimeline: {
|
|
233
|
+
path: '/gateway.web.v1.SloGatewayService/GetSloTimeline',
|
|
234
|
+
requestStream: false,
|
|
235
|
+
responseStream: false,
|
|
236
|
+
requestType: proto_gateway_web_v1_slo_gateway_pb.GetSloTimelineRequest,
|
|
237
|
+
responseType: proto_gateway_web_v1_slo_gateway_pb.GetSloTimelineResponse,
|
|
238
|
+
requestSerialize: serialize_gateway_web_v1_GetSloTimelineRequest,
|
|
239
|
+
requestDeserialize: deserialize_gateway_web_v1_GetSloTimelineRequest,
|
|
240
|
+
responseSerialize: serialize_gateway_web_v1_GetSloTimelineResponse,
|
|
241
|
+
responseDeserialize: deserialize_gateway_web_v1_GetSloTimelineResponse,
|
|
242
|
+
},
|
|
210
243
|
};
|
|
211
244
|
|
|
212
245
|
exports.SloGatewayServiceClient = grpc.makeGenericClientConstructor(SloGatewayServiceService, 'SloGatewayService');
|