@ludeo/cloud-common 1.1.103 → 1.1.105
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/v3/events/index.d.ts +2 -0
- package/dist/v3/events/index.js +2 -0
- package/dist/v3/events/index.js.map +1 -1
- package/dist/v3/events/pool-status.d.ts +1 -0
- package/dist/v3/events/pool-status.js +5 -0
- package/dist/v3/events/pool-status.js.map +1 -1
- package/dist/v3/events/terminate-stale-games.d.ts +11 -0
- package/dist/v3/events/terminate-stale-games.js +41 -0
- package/dist/v3/events/terminate-stale-games.js.map +1 -0
- package/dist/v3/events/terminate-stale-machines.d.ts +11 -0
- package/dist/v3/events/terminate-stale-machines.js +41 -0
- package/dist/v3/events/terminate-stale-machines.js.map +1 -0
- package/package.json +1 -1
- package/src/v3/events/index.ts +2 -0
- package/src/v3/events/pool-status.ts +5 -0
- package/src/v3/events/terminate-stale-games.ts +28 -0
- package/src/v3/events/terminate-stale-machines.ts +28 -0
|
@@ -43,6 +43,8 @@ export * from "./terminate-games-request";
|
|
|
43
43
|
export * from "./terminate-machine-resource-request";
|
|
44
44
|
export * from "./terminate-machine-resource-batch-request";
|
|
45
45
|
export * from "./terminate-machines-request";
|
|
46
|
+
export * from "./terminate-stale-games";
|
|
47
|
+
export * from "./terminate-stale-machines";
|
|
46
48
|
export * from "./prepare-cloud-machine-auth";
|
|
47
49
|
export * from "./prepare-cloud-machine-auth-failed";
|
|
48
50
|
export * from "./token-required.event";
|
package/dist/v3/events/index.js
CHANGED
|
@@ -59,6 +59,8 @@ __exportStar(require("./terminate-games-request"), exports);
|
|
|
59
59
|
__exportStar(require("./terminate-machine-resource-request"), exports);
|
|
60
60
|
__exportStar(require("./terminate-machine-resource-batch-request"), exports);
|
|
61
61
|
__exportStar(require("./terminate-machines-request"), exports);
|
|
62
|
+
__exportStar(require("./terminate-stale-games"), exports);
|
|
63
|
+
__exportStar(require("./terminate-stale-machines"), exports);
|
|
62
64
|
__exportStar(require("./prepare-cloud-machine-auth"), exports);
|
|
63
65
|
__exportStar(require("./prepare-cloud-machine-auth-failed"), exports);
|
|
64
66
|
__exportStar(require("./token-required.event"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,oFAAkE;AAClE,uFAAqE;AACrE,sEAAoD;AACpD,8EAA4D;AAC5D,yEAAuD;AACvD,6DAA2C;AAC3C,+DAA6C;AAC7C,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,uEAAqD;AACrD,6EAA2D;AAC3D,+DAA6C;AAC7C,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,+DAA6C;AAC7C,gEAA8C;AAC9C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v3/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAwC;AACxC,mEAAiD;AACjD,6DAA2C;AAC3C,iEAA+C;AAC/C,yDAAuC;AACvC,0EAAwD;AACxD,oEAAkD;AAClD,4DAA0C;AAC1C,+DAA6C;AAC7C,4DAA0C;AAC1C,oEAAkD;AAClD,qEAAmD;AACnD,6EAA2D;AAC3D,mEAAiD;AACjD,2EAAyD;AACzD,sEAAoD;AACpD,8EAA4D;AAC5D,6DAA2C;AAC3C,qEAAmD;AACnD,iEAA+C;AAC/C,+DAA6C;AAC7C,uEAAqD;AACrD,iEAA+C;AAC/C,yEAAuD;AACvD,+DAA6C;AAC7C,oFAAkE;AAClE,uFAAqE;AACrE,sEAAoD;AACpD,8EAA4D;AAC5D,yEAAuD;AACvD,6DAA2C;AAC3C,+DAA6C;AAC7C,gDAA8B;AAC9B,4DAA0C;AAC1C,6CAA2B;AAC3B,oDAAkC;AAClC,8DAA4C;AAC5C,mEAAiD;AACjD,4DAA0C;AAC1C,2DAAyC;AACzC,oEAAkD;AAClD,4DAA0C;AAC1C,uEAAqD;AACrD,6EAA2D;AAC3D,+DAA6C;AAC7C,0DAAwC;AACxC,6DAA2C;AAC3C,+DAA6C;AAC7C,sEAAoD;AACpD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAChD,mEAAiD;AACjD,+DAA6C;AAC7C,gEAA8C;AAC9C,oEAAkD;AAClD,0DAAwC;AACxC,4DAA0C"}
|
|
@@ -8,6 +8,7 @@ export type PoolStatusEventPayloadV1 = Record<string, string | number>;
|
|
|
8
8
|
export declare class PoolStatusEventPayload {
|
|
9
9
|
games: PoolStatusEventPayloadV1[];
|
|
10
10
|
machines: PoolStatusEventPayloadV1[];
|
|
11
|
+
requestId: string;
|
|
11
12
|
}
|
|
12
13
|
export declare class PoolStatusEvent extends LudeoEvent {
|
|
13
14
|
static readonly EVENT_NAME = "cloud-pools.pool-status";
|
|
@@ -10,6 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PoolStatusEvent = exports.PoolStatusEventPayload = exports.PoolStatusEventPoolV2 = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
13
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
14
15
|
const types_1 = require("../types");
|
|
15
16
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
@@ -23,6 +24,10 @@ __decorate([
|
|
|
23
24
|
class PoolStatusEventPayload {
|
|
24
25
|
}
|
|
25
26
|
exports.PoolStatusEventPayload = PoolStatusEventPayload;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsUUID)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], PoolStatusEventPayload.prototype, "requestId", void 0);
|
|
26
31
|
class PoolStatusEvent extends ludeo_event_1.LudeoEvent {
|
|
27
32
|
constructor(payload) {
|
|
28
33
|
super(PoolStatusEvent.EVENT_NAME);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v3/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAAqD;AACrD,oCAAuE;AACvE,oGAAqF;AAKrF,MAAa,qBAAqB;CAKjC;AALD,sDAKC;AAHC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;8BACjC,0BAAkB;yDAAC;AAQjC,MAAa,sBAAsB;
|
|
1
|
+
{"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v3/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AAEzC,yDAAqD;AACrD,oCAAuE;AACvE,oGAAqF;AAKrF,MAAa,qBAAqB;CAKjC;AALD,sDAKC;AAHC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;8BACjC,0BAAkB;yDAAC;AAQjC,MAAa,sBAAsB;CAOlC;AAPD,wDAOC;AADC;IADC,IAAA,wBAAM,GAAE;;yDACS;AAGpB,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YAAY,OAA+B;QACzC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,0CAUC;AATiB,0BAAU,GAAG,yBAAyB,CAAC;AAQvD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACxC,sBAAsB;gDAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudPoolContext } from "../contexts";
|
|
3
|
+
export declare class TerminateStaleGamesRequestPayload {
|
|
4
|
+
poolId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class TerminateStaleGames extends LudeoEvent {
|
|
7
|
+
static readonly EVENT_NAME = "cloud-pools.terminate-stale-games";
|
|
8
|
+
constructor(payload: TerminateStaleGamesRequestPayload, context: CloudPoolContext);
|
|
9
|
+
context: CloudPoolContext;
|
|
10
|
+
payload: TerminateStaleGamesRequestPayload;
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TerminateStaleGames = exports.TerminateStaleGamesRequestPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const contexts_1 = require("../contexts");
|
|
16
|
+
const decorators_1 = require("../../decorators");
|
|
17
|
+
class TerminateStaleGamesRequestPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.TerminateStaleGamesRequestPayload = TerminateStaleGamesRequestPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TerminateStaleGamesRequestPayload.prototype, "poolId", void 0);
|
|
24
|
+
class TerminateStaleGames extends ludeo_event_1.LudeoEvent {
|
|
25
|
+
constructor(payload, context) {
|
|
26
|
+
super(TerminateStaleGames.EVENT_NAME);
|
|
27
|
+
this.payload = payload;
|
|
28
|
+
this.context = context;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TerminateStaleGames = TerminateStaleGames;
|
|
32
|
+
TerminateStaleGames.EVENT_NAME = "cloud-pools.terminate-stale-games";
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, decorators_1.ValidateNestedType)(() => contexts_1.CloudPoolContext),
|
|
35
|
+
__metadata("design:type", contexts_1.CloudPoolContext)
|
|
36
|
+
], TerminateStaleGames.prototype, "context", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, decorators_1.ValidateNestedType)(() => TerminateStaleGamesRequestPayload),
|
|
39
|
+
__metadata("design:type", TerminateStaleGamesRequestPayload)
|
|
40
|
+
], TerminateStaleGames.prototype, "payload", void 0);
|
|
41
|
+
//# sourceMappingURL=terminate-stale-games.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminate-stale-games.js","sourceRoot":"","sources":["../../../src/v3/events/terminate-stale-games.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAC3C,yDAAqD;AACrD,0CAA+C;AAC/C,iDAAsD;AAEtD,MAAa,iCAAiC;CAG7C;AAHD,8EAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;iEACI;AAGjB,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YACE,OAA0C,EAC1C,OAAyB;QAEzB,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kDAiBC;AAhBiB,8BAAU,GAAG,mCAAmC,CAAC;AAYjE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,2BAAgB,CAAC;8BAClC,2BAAgB;oDAAC;AAG1B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC;8BACnD,iCAAiC;oDAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
|
+
import { CloudPoolContext } from "../contexts";
|
|
3
|
+
export declare class TerminateStaleMachinesRequestPayload {
|
|
4
|
+
poolId: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class TerminateStaleMachines extends LudeoEvent {
|
|
7
|
+
static readonly EVENT_NAME = "cloud-pools.terminate-stale-machines";
|
|
8
|
+
constructor(payload: TerminateStaleMachinesRequestPayload, context: CloudPoolContext);
|
|
9
|
+
context: CloudPoolContext;
|
|
10
|
+
payload: TerminateStaleMachinesRequestPayload;
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.TerminateStaleMachines = exports.TerminateStaleMachinesRequestPayload = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
|
+
const contexts_1 = require("../contexts");
|
|
16
|
+
const decorators_1 = require("../../decorators");
|
|
17
|
+
class TerminateStaleMachinesRequestPayload {
|
|
18
|
+
}
|
|
19
|
+
exports.TerminateStaleMachinesRequestPayload = TerminateStaleMachinesRequestPayload;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], TerminateStaleMachinesRequestPayload.prototype, "poolId", void 0);
|
|
24
|
+
class TerminateStaleMachines extends ludeo_event_1.LudeoEvent {
|
|
25
|
+
constructor(payload, context) {
|
|
26
|
+
super(TerminateStaleMachines.EVENT_NAME);
|
|
27
|
+
this.payload = payload;
|
|
28
|
+
this.context = context;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.TerminateStaleMachines = TerminateStaleMachines;
|
|
32
|
+
TerminateStaleMachines.EVENT_NAME = "cloud-pools.terminate-stale-machines";
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, decorators_1.ValidateNestedType)(() => contexts_1.CloudPoolContext),
|
|
35
|
+
__metadata("design:type", contexts_1.CloudPoolContext)
|
|
36
|
+
], TerminateStaleMachines.prototype, "context", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, decorators_1.ValidateNestedType)(() => TerminateStaleMachinesRequestPayload),
|
|
39
|
+
__metadata("design:type", TerminateStaleMachinesRequestPayload)
|
|
40
|
+
], TerminateStaleMachines.prototype, "payload", void 0);
|
|
41
|
+
//# sourceMappingURL=terminate-stale-machines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminate-stale-machines.js","sourceRoot":"","sources":["../../../src/v3/events/terminate-stale-machines.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA2C;AAC3C,yDAAqD;AACrD,0CAA+C;AAC/C,iDAAsD;AAEtD,MAAa,oCAAoC;CAGhD;AAHD,oFAGC;AADC;IADC,IAAA,0BAAQ,GAAE;;oEACI;AAGjB,MAAa,sBAAuB,SAAQ,wBAAU;IAGpD,YACE,OAA6C,EAC7C,OAAyB;QAEzB,KAAK,CAAC,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,wDAiBC;AAhBiB,iCAAU,GAAG,sCAAsC,CAAC;AAYpE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,2BAAgB,CAAC;8BAClC,2BAAgB;uDAAC;AAG1B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,oCAAoC,CAAC;8BACtD,oCAAoC;uDAAC"}
|
package/package.json
CHANGED
package/src/v3/events/index.ts
CHANGED
|
@@ -43,6 +43,8 @@ export * from "./terminate-games-request";
|
|
|
43
43
|
export * from "./terminate-machine-resource-request";
|
|
44
44
|
export * from "./terminate-machine-resource-batch-request";
|
|
45
45
|
export * from "./terminate-machines-request";
|
|
46
|
+
export * from "./terminate-stale-games";
|
|
47
|
+
export * from "./terminate-stale-machines";
|
|
46
48
|
export * from "./prepare-cloud-machine-auth";
|
|
47
49
|
export * from "./prepare-cloud-machine-auth-failed";
|
|
48
50
|
export * from "./token-required.event";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IsUUID } from "class-validator";
|
|
2
|
+
|
|
1
3
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
2
4
|
import { CloudResourcesStatusMap, BasePoolAttributes } from "../types";
|
|
3
5
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
@@ -19,6 +21,9 @@ export class PoolStatusEventPayload {
|
|
|
19
21
|
games: PoolStatusEventPayloadV1[];
|
|
20
22
|
|
|
21
23
|
machines: PoolStatusEventPayloadV1[];
|
|
24
|
+
|
|
25
|
+
@IsUUID()
|
|
26
|
+
requestId: string;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
export class PoolStatusEvent extends LudeoEvent {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IsString } from "class-validator";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
import { CloudPoolContext } from "../contexts";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators";
|
|
5
|
+
|
|
6
|
+
export class TerminateStaleGamesRequestPayload {
|
|
7
|
+
@IsString()
|
|
8
|
+
poolId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class TerminateStaleGames extends LudeoEvent {
|
|
12
|
+
static readonly EVENT_NAME = "cloud-pools.terminate-stale-games";
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
payload: TerminateStaleGamesRequestPayload,
|
|
16
|
+
context: CloudPoolContext
|
|
17
|
+
) {
|
|
18
|
+
super(TerminateStaleGames.EVENT_NAME);
|
|
19
|
+
this.payload = payload;
|
|
20
|
+
this.context = context;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@ValidateNestedType(() => CloudPoolContext)
|
|
24
|
+
context: CloudPoolContext;
|
|
25
|
+
|
|
26
|
+
@ValidateNestedType(() => TerminateStaleGamesRequestPayload)
|
|
27
|
+
payload: TerminateStaleGamesRequestPayload;
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IsString } from "class-validator";
|
|
2
|
+
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
|
+
import { CloudPoolContext } from "../contexts";
|
|
4
|
+
import { ValidateNestedType } from "../../decorators";
|
|
5
|
+
|
|
6
|
+
export class TerminateStaleMachinesRequestPayload {
|
|
7
|
+
@IsString()
|
|
8
|
+
poolId: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class TerminateStaleMachines extends LudeoEvent {
|
|
12
|
+
static readonly EVENT_NAME = "cloud-pools.terminate-stale-machines";
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
payload: TerminateStaleMachinesRequestPayload,
|
|
16
|
+
context: CloudPoolContext
|
|
17
|
+
) {
|
|
18
|
+
super(TerminateStaleMachines.EVENT_NAME);
|
|
19
|
+
this.payload = payload;
|
|
20
|
+
this.context = context;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@ValidateNestedType(() => CloudPoolContext)
|
|
24
|
+
context: CloudPoolContext;
|
|
25
|
+
|
|
26
|
+
@ValidateNestedType(() => TerminateStaleMachinesRequestPayload)
|
|
27
|
+
payload: TerminateStaleMachinesRequestPayload;
|
|
28
|
+
}
|