@firestartr/cli 3.1.0 → 3.1.1-snapshot-pagination-fix
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/build/index.js +866 -130
- package/build/packages/cdk8s_renderer/src/utils/fileIgnore.d.ts +3 -0
- package/build/packages/cdk8s_renderer/src/validations/references.d.ts +1 -0
- package/build/packages/operator/src/processItem.d.ts +14 -0
- package/build/packages/operator/src/processItem.diagnostic.d.ts +31 -2
- package/package.json +1 -1
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { WorkItem } from './informer';
|
|
2
2
|
import { DeferredSchedulingBookkeeper } from './processItem.blocks';
|
|
3
|
+
import type { DiagnosticQueueSnapshot } from './processItem.diagnostic';
|
|
4
|
+
/**
|
|
5
|
+
* Number of concurrent processing slots, used by startup wiring that needs the
|
|
6
|
+
* same capacity the processor loop uses.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getMaxSlots(): number;
|
|
3
9
|
export declare function getQueueMetrics(): {
|
|
4
10
|
nItems: number;
|
|
5
11
|
nItemsFinished: number;
|
|
@@ -19,6 +25,14 @@ export declare function getQueueMetrics(): {
|
|
|
19
25
|
unknown: number;
|
|
20
26
|
};
|
|
21
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Queue state for the diagnostic file. Counts come from the existing metrics
|
|
30
|
+
* seam (`getQueueMetrics`) so scheduling state is never counted twice, and only
|
|
31
|
+
* the fields the diagnostic file documents differently are derived here: `blocked`
|
|
32
|
+
* keeps the historical `isBlocked` meaning instead of the parent-aware gauge,
|
|
33
|
+
* and `slots` needs the per-slot assignment the gauge does not expose.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getOperatorQueueSnapshot(): DiagnosticQueueSnapshot;
|
|
22
36
|
/**
|
|
23
37
|
* Pushes a WorkItem to the queue
|
|
24
38
|
* @param {WorkItem} workItem - WorkItem to process
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/**
|
|
4
|
+
* Queue state the diagnostic file needs. Producers own the queue and expose it
|
|
5
|
+
* through this seam, so this module never reaches into queue internals.
|
|
6
|
+
*/
|
|
7
|
+
export interface DiagnosticQueueSnapshot {
|
|
8
|
+
total: number;
|
|
9
|
+
pending: number;
|
|
10
|
+
processing: number;
|
|
11
|
+
finished: number;
|
|
12
|
+
blocked: number;
|
|
13
|
+
deadLetter: number;
|
|
14
|
+
/** `slot-<id>` -> `"<kind>/<name>"` for the work item that slot is running. */
|
|
15
|
+
slots: Record<string, string>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Reads `OPERATOR_DIAGNOSTIC_INTERVAL_SECONDS`, falling back to the default for
|
|
19
|
+
* absent or unusable values so a typo cannot disable diagnostics.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getDiagnosticIntervalSeconds(env?: NodeJS.ProcessEnv): number;
|
|
22
|
+
/**
|
|
23
|
+
* Starts the periodic diagnostic writer and writes the first snapshot right
|
|
24
|
+
* away, so the file exists before any work item arrives.
|
|
25
|
+
*
|
|
26
|
+
* Idempotent: a second call while a writer is running is a no-op, so the
|
|
27
|
+
* startup path and the in-loop call never race on the same file.
|
|
28
|
+
*
|
|
29
|
+
* @returns whether this call started the writer.
|
|
30
|
+
*/
|
|
31
|
+
export declare function startDiagnosticFile(source: () => DiagnosticQueueSnapshot, maxSlots: number, env?: NodeJS.ProcessEnv): boolean;
|
|
32
|
+
export declare function stopDiagnosticFile(): void;
|
|
4
33
|
/** @internal for testing */
|
|
5
34
|
export declare function getDiagnosticTimer(): NodeJS.Timeout | undefined;
|