@cadenza.io/service 2.6.1 → 2.8.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/index.d.mts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +1126 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1126 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -192,6 +192,8 @@ type DistributedInquiryOptions = Partial<InquiryOptions> & {
|
|
|
192
192
|
perResponderTimeoutMs?: number;
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
+
type RuntimeStatusState = "healthy" | "degraded" | "overloaded" | "unavailable";
|
|
196
|
+
|
|
195
197
|
interface ServiceInstanceDescriptor {
|
|
196
198
|
uuid: string;
|
|
197
199
|
address: string;
|
|
@@ -202,6 +204,9 @@ interface ServiceInstanceDescriptor {
|
|
|
202
204
|
isActive: boolean;
|
|
203
205
|
isNonResponsive: boolean;
|
|
204
206
|
isBlocked: boolean;
|
|
207
|
+
runtimeState?: RuntimeStatusState;
|
|
208
|
+
acceptingWork?: boolean;
|
|
209
|
+
reportedAt?: string;
|
|
205
210
|
health: AnyObject;
|
|
206
211
|
exposed: boolean;
|
|
207
212
|
clientCreated?: boolean;
|
|
@@ -229,6 +234,21 @@ declare class ServiceRegistry {
|
|
|
229
234
|
private remoteIntents;
|
|
230
235
|
private remoteIntentDeputiesByKey;
|
|
231
236
|
private remoteIntentDeputiesByTask;
|
|
237
|
+
private dependeesByService;
|
|
238
|
+
private dependeeByInstance;
|
|
239
|
+
private readinessDependeesByService;
|
|
240
|
+
private readinessDependeeByInstance;
|
|
241
|
+
private lastHeartbeatAtByInstance;
|
|
242
|
+
private missedHeartbeatsByInstance;
|
|
243
|
+
private runtimeStatusFallbackInFlightByInstance;
|
|
244
|
+
private activeRoutineExecutionIds;
|
|
245
|
+
private runtimeStatusHeartbeatStarted;
|
|
246
|
+
private lastRuntimeStatusSnapshot;
|
|
247
|
+
private readonly runtimeStatusHeartbeatIntervalMs;
|
|
248
|
+
private readonly runtimeStatusMissThreshold;
|
|
249
|
+
private readonly runtimeStatusFallbackTimeoutMs;
|
|
250
|
+
private readonly degradedGraphThreshold;
|
|
251
|
+
private readonly overloadedGraphThreshold;
|
|
232
252
|
serviceName: string | null;
|
|
233
253
|
serviceInstanceId: string | null;
|
|
234
254
|
numberOfRunningGraphs: number;
|
|
@@ -252,11 +272,26 @@ declare class ServiceRegistry {
|
|
|
252
272
|
handleServiceNotRespondingTask: Task;
|
|
253
273
|
handleServiceHandshakeTask: Task;
|
|
254
274
|
collectTransportDiagnosticsTask: Task;
|
|
275
|
+
collectReadinessTask: Task;
|
|
255
276
|
private buildRemoteIntentDeputyKey;
|
|
256
277
|
private normalizeIntentMaps;
|
|
257
278
|
private registerRemoteIntentDeputy;
|
|
258
279
|
private unregisterRemoteIntentDeputy;
|
|
259
280
|
getInquiryResponderDescriptor(task: Task): InquiryResponderDescriptor;
|
|
281
|
+
private getInstance;
|
|
282
|
+
private getLocalInstance;
|
|
283
|
+
private registerDependee;
|
|
284
|
+
private unregisterDependee;
|
|
285
|
+
private getHeartbeatMisses;
|
|
286
|
+
private shouldRequireReadinessFromCommunicationTypes;
|
|
287
|
+
private resolveRuntimeStatusSnapshot;
|
|
288
|
+
private normalizeRuntimeStatusReport;
|
|
289
|
+
private applyRuntimeStatusReport;
|
|
290
|
+
private buildLocalRuntimeStatusReport;
|
|
291
|
+
private selectRuntimeStatusReportForTarget;
|
|
292
|
+
private resolveRuntimeStatusFallbackInquiry;
|
|
293
|
+
private evaluateDependencyReadinessDetail;
|
|
294
|
+
private buildLocalReadinessReport;
|
|
260
295
|
/**
|
|
261
296
|
* Initializes a private constructor for managing service instances, remote signals,
|
|
262
297
|
* service health, and handling updates or synchronization tasks. The constructor
|
package/dist/index.d.ts
CHANGED
|
@@ -192,6 +192,8 @@ type DistributedInquiryOptions = Partial<InquiryOptions> & {
|
|
|
192
192
|
perResponderTimeoutMs?: number;
|
|
193
193
|
};
|
|
194
194
|
|
|
195
|
+
type RuntimeStatusState = "healthy" | "degraded" | "overloaded" | "unavailable";
|
|
196
|
+
|
|
195
197
|
interface ServiceInstanceDescriptor {
|
|
196
198
|
uuid: string;
|
|
197
199
|
address: string;
|
|
@@ -202,6 +204,9 @@ interface ServiceInstanceDescriptor {
|
|
|
202
204
|
isActive: boolean;
|
|
203
205
|
isNonResponsive: boolean;
|
|
204
206
|
isBlocked: boolean;
|
|
207
|
+
runtimeState?: RuntimeStatusState;
|
|
208
|
+
acceptingWork?: boolean;
|
|
209
|
+
reportedAt?: string;
|
|
205
210
|
health: AnyObject;
|
|
206
211
|
exposed: boolean;
|
|
207
212
|
clientCreated?: boolean;
|
|
@@ -229,6 +234,21 @@ declare class ServiceRegistry {
|
|
|
229
234
|
private remoteIntents;
|
|
230
235
|
private remoteIntentDeputiesByKey;
|
|
231
236
|
private remoteIntentDeputiesByTask;
|
|
237
|
+
private dependeesByService;
|
|
238
|
+
private dependeeByInstance;
|
|
239
|
+
private readinessDependeesByService;
|
|
240
|
+
private readinessDependeeByInstance;
|
|
241
|
+
private lastHeartbeatAtByInstance;
|
|
242
|
+
private missedHeartbeatsByInstance;
|
|
243
|
+
private runtimeStatusFallbackInFlightByInstance;
|
|
244
|
+
private activeRoutineExecutionIds;
|
|
245
|
+
private runtimeStatusHeartbeatStarted;
|
|
246
|
+
private lastRuntimeStatusSnapshot;
|
|
247
|
+
private readonly runtimeStatusHeartbeatIntervalMs;
|
|
248
|
+
private readonly runtimeStatusMissThreshold;
|
|
249
|
+
private readonly runtimeStatusFallbackTimeoutMs;
|
|
250
|
+
private readonly degradedGraphThreshold;
|
|
251
|
+
private readonly overloadedGraphThreshold;
|
|
232
252
|
serviceName: string | null;
|
|
233
253
|
serviceInstanceId: string | null;
|
|
234
254
|
numberOfRunningGraphs: number;
|
|
@@ -252,11 +272,26 @@ declare class ServiceRegistry {
|
|
|
252
272
|
handleServiceNotRespondingTask: Task;
|
|
253
273
|
handleServiceHandshakeTask: Task;
|
|
254
274
|
collectTransportDiagnosticsTask: Task;
|
|
275
|
+
collectReadinessTask: Task;
|
|
255
276
|
private buildRemoteIntentDeputyKey;
|
|
256
277
|
private normalizeIntentMaps;
|
|
257
278
|
private registerRemoteIntentDeputy;
|
|
258
279
|
private unregisterRemoteIntentDeputy;
|
|
259
280
|
getInquiryResponderDescriptor(task: Task): InquiryResponderDescriptor;
|
|
281
|
+
private getInstance;
|
|
282
|
+
private getLocalInstance;
|
|
283
|
+
private registerDependee;
|
|
284
|
+
private unregisterDependee;
|
|
285
|
+
private getHeartbeatMisses;
|
|
286
|
+
private shouldRequireReadinessFromCommunicationTypes;
|
|
287
|
+
private resolveRuntimeStatusSnapshot;
|
|
288
|
+
private normalizeRuntimeStatusReport;
|
|
289
|
+
private applyRuntimeStatusReport;
|
|
290
|
+
private buildLocalRuntimeStatusReport;
|
|
291
|
+
private selectRuntimeStatusReportForTarget;
|
|
292
|
+
private resolveRuntimeStatusFallbackInquiry;
|
|
293
|
+
private evaluateDependencyReadinessDetail;
|
|
294
|
+
private buildLocalReadinessReport;
|
|
260
295
|
/**
|
|
261
296
|
* Initializes a private constructor for managing service instances, remote signals,
|
|
262
297
|
* service health, and handling updates or synchronization tasks. The constructor
|