@attlaz/client 1.126.0 → 1.127.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/Model/InfrastructureStatus/ObservedState.d.ts +6 -0
- package/dist/Model/InfrastructureStatus/ObservedState.js +1 -0
- package/dist/Model/InfrastructureStatus/QueueStatus.d.ts +23 -26
- package/dist/Model/InfrastructureStatus/QueueStatus.js +19 -9
- package/dist/Model/InfrastructureStatus/RunnersStatus.d.ts +32 -7
- package/dist/Model/InfrastructureStatus/RunnersStatus.js +25 -6
- package/dist/Model/InfrastructureStatus/StorageStatus.d.ts +8 -4
- package/dist/Model/InfrastructureStatus/StorageStatus.js +2 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +0 -1
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether we could see a thing, not whether it is well — verdicts live in `health_alert`.
|
|
3
|
+
* Conflating `missing` (we asked, it is not there) with `unreachable` (we could not ask) reported
|
|
4
|
+
* a live queue as deleted whenever the broker call failed.
|
|
5
|
+
*/
|
|
6
|
+
export type ObservedState = 'present' | 'missing' | 'unreachable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* mapping from losing information.
|
|
5
|
-
*/
|
|
6
|
-
export type QueueState =
|
|
7
|
-
/** The queue exists and is serving. RabbitMQ's running, idle and flow all land here. */
|
|
8
|
-
'running'
|
|
9
|
-
/** The queue exists but RabbitMQ reports it as down, crashed, stopped, minority or terminated. */
|
|
10
|
-
| 'degraded'
|
|
11
|
-
/** The queue exists and RabbitMQ reported a state we don't recognise. See `rabbit_state`. */
|
|
12
|
-
| 'unknown'
|
|
13
|
-
/** RabbitMQ answered, and there is no such queue. */
|
|
14
|
-
| 'nonexisting'
|
|
15
|
-
/** We could not ask RabbitMQ, or could not read its answer. Not the same as nonexisting. */
|
|
16
|
-
| 'unreachable';
|
|
1
|
+
import { ObservedState } from './ObservedState.js';
|
|
2
|
+
/** Kept apart from the counters: a faulted queue with nothing on it looks exactly like an idle one. */
|
|
3
|
+
export type QueueCondition = 'ok' | 'faulted' | 'unknown';
|
|
17
4
|
export declare class QueueStatus {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
5
|
+
/** Identity of what was observed, so a stored status is readable without the query behind it. */
|
|
6
|
+
name: string | null;
|
|
7
|
+
state: ObservedState;
|
|
8
|
+
/** Null unless `state` is 'present'. */
|
|
9
|
+
condition: QueueCondition | null;
|
|
10
|
+
/** Queued, not yet taken. */
|
|
11
|
+
messages_waiting: number;
|
|
12
|
+
/** Taken by a runner, not yet acknowledged. */
|
|
13
|
+
messages_processing: number;
|
|
14
|
+
messages_arriving_per_second: number;
|
|
15
|
+
/** Acknowledgements — work finished, not merely handed out. */
|
|
16
|
+
messages_completed_per_second: number;
|
|
17
|
+
/** Redeliveries: a runner died mid-job. A failed flow run is recorded elsewhere; this is not. */
|
|
18
|
+
messages_retried_per_second: number;
|
|
19
|
+
/** Compared against the pool's ready count. */
|
|
27
20
|
consumers: number;
|
|
28
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Once stored this is the FIRST time the value was seen: `isEqual` blanks it, and an unchanged
|
|
23
|
+
* status only bumps the row's `updated_at`. That is "last confirmed"; this is "unchanged since".
|
|
24
|
+
*/
|
|
25
|
+
observed_at: Date;
|
|
29
26
|
}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
export class QueueStatus {
|
|
2
|
-
|
|
2
|
+
/** Identity of what was observed, so a stored status is readable without the query behind it. */
|
|
3
|
+
name = null;
|
|
3
4
|
state;
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
/** Null unless `state` is 'present'. */
|
|
6
|
+
condition = null;
|
|
7
|
+
/** Queued, not yet taken. */
|
|
8
|
+
messages_waiting = 0;
|
|
9
|
+
/** Taken by a runner, not yet acknowledged. */
|
|
10
|
+
messages_processing = 0;
|
|
11
|
+
messages_arriving_per_second = 0;
|
|
12
|
+
/** Acknowledgements — work finished, not merely handed out. */
|
|
13
|
+
messages_completed_per_second = 0;
|
|
14
|
+
/** Redeliveries: a runner died mid-job. A failed flow run is recorded elsewhere; this is not. */
|
|
15
|
+
messages_retried_per_second = 0;
|
|
16
|
+
/** Compared against the pool's ready count. */
|
|
11
17
|
consumers = 0;
|
|
12
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Once stored this is the FIRST time the value was seen: `isEqual` blanks it, and an unchanged
|
|
20
|
+
* status only bumps the row's `updated_at`. That is "last confirmed"; this is "unchanged since".
|
|
21
|
+
*/
|
|
22
|
+
observed_at;
|
|
13
23
|
}
|
|
@@ -1,9 +1,34 @@
|
|
|
1
|
+
import { ObservedState } from './ObservedState.js';
|
|
2
|
+
/**
|
|
3
|
+
* The counts cannot express this: a new runner that never becomes ready leaves the old ones
|
|
4
|
+
* serving, so `desired` and `ready` still agree while the deploy has failed.
|
|
5
|
+
*/
|
|
6
|
+
export type RunnerRollout = 'settled' | 'in_progress' | 'failed';
|
|
7
|
+
/**
|
|
8
|
+
* A pool has four rungs — configured min/max → `desired` → `ready` → the queue's `consumers` — and
|
|
9
|
+
* each gap means something different. The last lives on QueueStatus, so "how many runners are busy"
|
|
10
|
+
* needs both.
|
|
11
|
+
*/
|
|
1
12
|
export declare class RunnersStatus {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
/** Runners are found by label, so this is the only record of which deployment answered. */
|
|
14
|
+
name: string | null;
|
|
15
|
+
state: ObservedState;
|
|
16
|
+
/** What the deployment asks for, not what the pool is configured for. Differing means it was
|
|
17
|
+
* never redeployed. */
|
|
18
|
+
desired: number;
|
|
19
|
+
ready: number;
|
|
20
|
+
rollout: RunnerRollout;
|
|
21
|
+
/** For drift against the configured image. */
|
|
22
|
+
image: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* A pool restarting every two minutes still reports ready = 2 of 2. The count alone cannot say
|
|
25
|
+
* whether that is happening now, which is what `last_restart_at` answers.
|
|
26
|
+
*/
|
|
27
|
+
restarts: number | null;
|
|
28
|
+
last_restart_at: Date | null;
|
|
29
|
+
/** Millicores, matching the unit the configuration uses. */
|
|
30
|
+
cpu_limit_millicores: number | null;
|
|
31
|
+
memory_limit_bytes: number | null;
|
|
32
|
+
/** First-seen once stored — see QueueStatus.observed_at. */
|
|
33
|
+
observed_at: Date;
|
|
9
34
|
}
|
|
@@ -1,9 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A pool has four rungs — configured min/max → `desired` → `ready` → the queue's `consumers` — and
|
|
3
|
+
* each gap means something different. The last lives on QueueStatus, so "how many runners are busy"
|
|
4
|
+
* needs both.
|
|
5
|
+
*/
|
|
1
6
|
export class RunnersStatus {
|
|
7
|
+
/** Runners are found by label, so this is the only record of which deployment answered. */
|
|
8
|
+
name = null;
|
|
2
9
|
state;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
/** What the deployment asks for, not what the pool is configured for. Differing means it was
|
|
11
|
+
* never redeployed. */
|
|
12
|
+
desired;
|
|
13
|
+
ready;
|
|
14
|
+
rollout;
|
|
15
|
+
/** For drift against the configured image. */
|
|
16
|
+
image;
|
|
17
|
+
/**
|
|
18
|
+
* A pool restarting every two minutes still reports ready = 2 of 2. The count alone cannot say
|
|
19
|
+
* whether that is happening now, which is what `last_restart_at` answers.
|
|
20
|
+
*/
|
|
21
|
+
restarts;
|
|
22
|
+
last_restart_at;
|
|
23
|
+
/** Millicores, matching the unit the configuration uses. */
|
|
24
|
+
cpu_limit_millicores;
|
|
25
|
+
memory_limit_bytes;
|
|
26
|
+
/** First-seen once stored — see QueueStatus.observed_at. */
|
|
27
|
+
observed_at;
|
|
9
28
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { ObservedState } from './ObservedState.js';
|
|
1
2
|
type StorageTypeStatus = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
/** Never 'missing' — storage is created on first use. Separates empty from unreadable. */
|
|
4
|
+
state: ObservedState;
|
|
5
|
+
used_bytes: number;
|
|
6
|
+
items: number;
|
|
7
|
+
limit_bytes: number | null;
|
|
5
8
|
};
|
|
6
9
|
export declare class StorageStatus {
|
|
7
10
|
persistent: StorageTypeStatus;
|
|
8
11
|
cache: StorageTypeStatus;
|
|
9
12
|
vault: StorageTypeStatus;
|
|
10
13
|
infrastructure: StorageTypeStatus;
|
|
11
|
-
|
|
14
|
+
/** First-seen once stored — see QueueStatus.observed_at. */
|
|
15
|
+
observed_at: Date;
|
|
12
16
|
}
|
|
13
17
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -194,8 +194,9 @@ export { DataValueCollection } from './Model/DataValueCollection.js';
|
|
|
194
194
|
export { EntityType } from './Model/EntityType.js';
|
|
195
195
|
export { InboxMessage } from './Model/Inbox/InboxMessage.js';
|
|
196
196
|
/** Infrastructure Status **/
|
|
197
|
-
export {
|
|
198
|
-
export {
|
|
197
|
+
export { ObservedState } from './Model/InfrastructureStatus/ObservedState.js';
|
|
198
|
+
export { QueueCondition, QueueStatus } from './Model/InfrastructureStatus/QueueStatus.js';
|
|
199
|
+
export { RunnerRollout, RunnersStatus } from './Model/InfrastructureStatus/RunnersStatus.js';
|
|
199
200
|
export { StorageStatus } from './Model/InfrastructureStatus/StorageStatus.js';
|
|
200
201
|
export { State } from './Model/State.js';
|
|
201
202
|
export { StateAware } from './Model/StateAware.js';
|
package/dist/index.js
CHANGED
|
@@ -157,7 +157,6 @@ export { EntityId } from './Model/EntityId.js';
|
|
|
157
157
|
export { DataValueCollection } from './Model/DataValueCollection.js';
|
|
158
158
|
export { EntityType } from './Model/EntityType.js';
|
|
159
159
|
export { InboxMessage } from './Model/Inbox/InboxMessage.js';
|
|
160
|
-
/** Infrastructure Status **/
|
|
161
160
|
export { QueueStatus } from './Model/InfrastructureStatus/QueueStatus.js';
|
|
162
161
|
export { RunnersStatus } from './Model/InfrastructureStatus/RunnersStatus.js';
|
|
163
162
|
export { StorageStatus } from './Model/InfrastructureStatus/StorageStatus.js';
|