@ludeo/cloud-common 1.2.274-beta-yahil-1 → 1.2.274
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/tsconfig.tsbuildinfo +1 -1
- package/dist/v4/events/allocate-cloud-session-failed.d.ts +10 -8
- package/dist/v4/events/allocate-cloud-session-failed.js +15 -9
- package/dist/v4/events/allocate-cloud-session-failed.js.map +1 -1
- package/dist/v4/events/ludeo-available.d.ts +2 -2
- package/dist/v4/events/ludeo-available.js +0 -2
- package/dist/v4/events/ludeo-available.js.map +1 -1
- package/package.json +1 -1
- package/src/v4/events/allocate-cloud-session-failed.ts +20 -11
- package/src/v4/events/ludeo-available.ts +5 -8
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { CloudSessionContext } from "../contexts/cloud-session-context";
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
3
|
export declare enum AllocateCloudSessionFailureCode {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
NOT_AVAILABLE_ERROR = "NOT_AVAILABLE_ERROR",
|
|
5
|
+
QUEUE_TIMEOUT_ERROR = "QUEUE_TIMEOUT_ERROR",
|
|
6
|
+
NO_AVAILABLE_POOLS_REGION_ERROR = "NO_AVAILABLE_POOLS_REGION_ERROR",
|
|
7
|
+
NO_AVAILABLE_POOLS_HARDWARE_ERROR = "NO_AVAILABLE_POOLS_HARDWARE_ERROR",
|
|
8
|
+
INVALID_REQUEST_ERROR = "INVALID_REQUEST_ERROR",
|
|
9
|
+
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR"
|
|
9
10
|
}
|
|
10
11
|
export declare class AllocateCloudSessionFailedPayload {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
code?: AllocateCloudSessionFailureCode;
|
|
13
|
+
description: string;
|
|
14
|
+
stack?: string;
|
|
15
|
+
isRetryable?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export declare class AllocateCloudSessionFailed extends LudeoEvent {
|
|
16
18
|
static readonly EVENT_NAME = "cloud-session-allocator.allocate-cloud-session-failed";
|
|
@@ -16,29 +16,35 @@ const validate_nested_type_decorator_1 = require("../../decorators/validate-nest
|
|
|
16
16
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
17
17
|
var AllocateCloudSessionFailureCode;
|
|
18
18
|
(function (AllocateCloudSessionFailureCode) {
|
|
19
|
-
AllocateCloudSessionFailureCode["
|
|
20
|
-
AllocateCloudSessionFailureCode["
|
|
21
|
-
AllocateCloudSessionFailureCode["
|
|
22
|
-
AllocateCloudSessionFailureCode["
|
|
23
|
-
AllocateCloudSessionFailureCode["
|
|
19
|
+
AllocateCloudSessionFailureCode["NOT_AVAILABLE_ERROR"] = "NOT_AVAILABLE_ERROR";
|
|
20
|
+
AllocateCloudSessionFailureCode["QUEUE_TIMEOUT_ERROR"] = "QUEUE_TIMEOUT_ERROR";
|
|
21
|
+
AllocateCloudSessionFailureCode["NO_AVAILABLE_POOLS_REGION_ERROR"] = "NO_AVAILABLE_POOLS_REGION_ERROR";
|
|
22
|
+
AllocateCloudSessionFailureCode["NO_AVAILABLE_POOLS_HARDWARE_ERROR"] = "NO_AVAILABLE_POOLS_HARDWARE_ERROR";
|
|
23
|
+
AllocateCloudSessionFailureCode["INVALID_REQUEST_ERROR"] = "INVALID_REQUEST_ERROR";
|
|
24
|
+
AllocateCloudSessionFailureCode["INTERNAL_SERVER_ERROR"] = "INTERNAL_SERVER_ERROR";
|
|
24
25
|
})(AllocateCloudSessionFailureCode || (exports.AllocateCloudSessionFailureCode = AllocateCloudSessionFailureCode = {}));
|
|
25
26
|
class AllocateCloudSessionFailedPayload {
|
|
26
27
|
}
|
|
27
28
|
exports.AllocateCloudSessionFailedPayload = AllocateCloudSessionFailedPayload;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsEnum)(AllocateCloudSessionFailureCode),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], AllocateCloudSessionFailedPayload.prototype, "code", void 0);
|
|
28
34
|
__decorate([
|
|
29
35
|
(0, class_validator_1.IsString)(),
|
|
30
36
|
__metadata("design:type", String)
|
|
31
|
-
], AllocateCloudSessionFailedPayload.prototype, "
|
|
37
|
+
], AllocateCloudSessionFailedPayload.prototype, "description", void 0);
|
|
32
38
|
__decorate([
|
|
33
39
|
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
(0, class_validator_1.
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
35
41
|
__metadata("design:type", String)
|
|
36
|
-
], AllocateCloudSessionFailedPayload.prototype, "
|
|
42
|
+
], AllocateCloudSessionFailedPayload.prototype, "stack", void 0);
|
|
37
43
|
__decorate([
|
|
38
44
|
(0, class_validator_1.IsOptional)(),
|
|
39
45
|
(0, class_validator_1.IsBoolean)(),
|
|
40
46
|
__metadata("design:type", Boolean)
|
|
41
|
-
], AllocateCloudSessionFailedPayload.prototype, "
|
|
47
|
+
], AllocateCloudSessionFailedPayload.prototype, "isRetryable", void 0);
|
|
42
48
|
class AllocateCloudSessionFailed extends ludeo_event_1.LudeoEvent {
|
|
43
49
|
constructor(payload, context) {
|
|
44
50
|
super(AllocateCloudSessionFailed.EVENT_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocate-cloud-session-failed.js","sourceRoot":"","sources":["../../../src/v4/events/allocate-cloud-session-failed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAC1E,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AAErD,IAAY,+
|
|
1
|
+
{"version":3,"file":"allocate-cloud-session-failed.js","sourceRoot":"","sources":["../../../src/v4/events/allocate-cloud-session-failed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA0E;AAC1E,6EAAwE;AACxE,oGAAqF;AACrF,yDAAqD;AAErD,IAAY,+BAaX;AAbD,WAAY,+BAA+B;IAEzC,8EAA2C,CAAA;IAE3C,8EAA2C,CAAA;IAE3C,sGAAmE,CAAA;IAEnE,0GAAuE,CAAA;IAEvE,kFAA+C,CAAA;IAE/C,kFAA+C,CAAA;AACjD,CAAC,EAbW,+BAA+B,+CAA/B,+BAA+B,QAa1C;AAED,MAAa,iCAAiC;CAmB7C;AAnBD,8EAmBC;AAfC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,EAAC,+BAA+B,CAAC;;+DACD;AAIvC;IADC,IAAA,0BAAQ,GAAE;;sEACS;AAKpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gEACI;AAKf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;sEACU;AAExB,MAAa,0BAA2B,SAAQ,wBAAU;IAIxD,YACE,OAA0C,EAC1C,OAA4B;QAE5B,KAAK,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAXH,gEAkBC;AAjBiB,qCAAU,GACxB,uDAAuD,CAAC;AAY1D;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC;8BACnD,iCAAiC;2DAAC;AAG3C;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC;8BACrC,2CAAmB;2DAAC"}
|
|
@@ -2,8 +2,8 @@ import { LudeoEvent } from "../../infra/ludeo-event";
|
|
|
2
2
|
import { CloudPoolContext } from "../contexts";
|
|
3
3
|
export declare class LudeoAvailablePayload {
|
|
4
4
|
ludeoPoolId: string;
|
|
5
|
-
gamePoolId
|
|
6
|
-
ludeoId
|
|
5
|
+
gamePoolId: string;
|
|
6
|
+
ludeoId: string;
|
|
7
7
|
}
|
|
8
8
|
export declare class LudeoAvailable extends LudeoEvent {
|
|
9
9
|
static readonly EVENT_NAME = "cloud-pools.ludeo-available";
|
|
@@ -22,12 +22,10 @@ __decorate([
|
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], LudeoAvailablePayload.prototype, "ludeoPoolId", void 0);
|
|
24
24
|
__decorate([
|
|
25
|
-
(0, class_validator_1.IsOptional)(),
|
|
26
25
|
(0, class_validator_1.IsUUID)(),
|
|
27
26
|
__metadata("design:type", String)
|
|
28
27
|
], LudeoAvailablePayload.prototype, "gamePoolId", void 0);
|
|
29
28
|
__decorate([
|
|
30
|
-
(0, class_validator_1.IsOptional)(),
|
|
31
29
|
(0, class_validator_1.IsUUID)(),
|
|
32
30
|
__metadata("design:type", String)
|
|
33
31
|
], LudeoAvailablePayload.prototype, "ludeoId", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ludeo-available.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-available.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ludeo-available.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-available.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,oGAAqF;AACrF,yDAAqD;AACrD,0CAA+C;AAE/C,MAAa,qBAAqB;CAWjC;AAXD,sDAWC;AATC;IADC,IAAA,wBAAM,GAAE;;0DACW;AAIpB;IADC,IAAA,wBAAM,GAAE;;yDACU;AAInB;IADC,IAAA,wBAAM,GAAE;;sDACO;AAGlB,MAAa,cAAe,SAAQ,wBAAU;IAG5C,YAAY,OAA8B,EAAE,OAAyB;QACnE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,wCAcC;AAbiB,yBAAU,GAAG,6BAA6B,CAAC;AAS3D;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAgB,CAAC;8BAClC,2BAAgB;+CAAC;AAG1B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC;8BACvC,qBAAqB;+CAAC"}
|
package/package.json
CHANGED
|
@@ -5,29 +5,38 @@ import { LudeoEvent } from "../../infra/ludeo-event";
|
|
|
5
5
|
|
|
6
6
|
export enum AllocateCloudSessionFailureCode {
|
|
7
7
|
// No machines and autoscale is off — nothing can ever serve this request.
|
|
8
|
-
|
|
8
|
+
NOT_AVAILABLE_ERROR = "NOT_AVAILABLE_ERROR",
|
|
9
9
|
// Held in the queue past QUEUE_MAX_WAIT_MS.
|
|
10
|
-
|
|
11
|
-
// No eligible pools matched
|
|
12
|
-
|
|
10
|
+
QUEUE_TIMEOUT_ERROR = "QUEUE_TIMEOUT_ERROR",
|
|
11
|
+
// No eligible pools matched the requested region.
|
|
12
|
+
NO_AVAILABLE_POOLS_REGION_ERROR = "NO_AVAILABLE_POOLS_REGION_ERROR",
|
|
13
|
+
// No eligible pools matched the requested hardware.
|
|
14
|
+
NO_AVAILABLE_POOLS_HARDWARE_ERROR = "NO_AVAILABLE_POOLS_HARDWARE_ERROR",
|
|
13
15
|
// Bad request payload.
|
|
14
|
-
|
|
16
|
+
INVALID_REQUEST_ERROR = "INVALID_REQUEST_ERROR",
|
|
15
17
|
// Unexpected failure.
|
|
16
|
-
|
|
18
|
+
INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export class AllocateCloudSessionFailedPayload {
|
|
22
|
+
// Structured failure code (queue V2). Omitted on the legacy path.
|
|
23
|
+
@IsOptional()
|
|
24
|
+
@IsEnum(AllocateCloudSessionFailureCode)
|
|
25
|
+
code?: AllocateCloudSessionFailureCode;
|
|
26
|
+
|
|
27
|
+
// Human-readable failure message.
|
|
20
28
|
@IsString()
|
|
21
|
-
|
|
29
|
+
description: string;
|
|
22
30
|
|
|
31
|
+
// Optional error stack for debugging (not shown to the player).
|
|
23
32
|
@IsOptional()
|
|
24
|
-
@
|
|
25
|
-
|
|
33
|
+
@IsString()
|
|
34
|
+
stack?: string;
|
|
26
35
|
|
|
27
|
-
// Whether retrying
|
|
36
|
+
// Whether retrying could plausibly succeed. NOT_AVAILABLE/INVALID_REQUEST are false.
|
|
28
37
|
@IsOptional()
|
|
29
38
|
@IsBoolean()
|
|
30
|
-
|
|
39
|
+
isRetryable?: boolean;
|
|
31
40
|
}
|
|
32
41
|
export class AllocateCloudSessionFailed extends LudeoEvent {
|
|
33
42
|
static readonly EVENT_NAME =
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
4
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
@@ -8,16 +8,13 @@ export class LudeoAvailablePayload {
|
|
|
8
8
|
@IsUUID()
|
|
9
9
|
ludeoPoolId: string;
|
|
10
10
|
|
|
11
|
-
// Parent game pool — the waiting queue this freed slot pops.
|
|
12
|
-
// backwards-compat; the allocator falls back to its ludeoPool→gamePool mapping.
|
|
13
|
-
@IsOptional()
|
|
11
|
+
// Parent game pool — the waiting queue this freed slot pops.
|
|
14
12
|
@IsUUID()
|
|
15
|
-
gamePoolId
|
|
13
|
+
gamePoolId: string;
|
|
16
14
|
|
|
17
|
-
// The ludeo this freed slot is for.
|
|
18
|
-
@IsOptional()
|
|
15
|
+
// The ludeo this freed slot is for.
|
|
19
16
|
@IsUUID()
|
|
20
|
-
ludeoId
|
|
17
|
+
ludeoId: string;
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
export class LudeoAvailable extends LudeoEvent {
|