@jfvilas/kwirth-common 0.3.63 → 0.3.65
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/AlertMessage.d.ts +14 -0
- package/dist/AlertMessage.js +9 -0
- package/dist/IChannel.d.ts +3 -2
- package/dist/InstanceConfig.d.ts +3 -26
- package/dist/InstanceConfig.js +16 -18
- package/dist/InstanceMessage.d.ts +18 -5
- package/dist/InstanceMessage.js +18 -1
- package/dist/LogMessage.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InstanceMessage } from "./InstanceMessage";
|
|
2
|
+
export declare enum AlertSeverityEnum {
|
|
3
|
+
INFO = "info",
|
|
4
|
+
WARNING = "warning",
|
|
5
|
+
ERROR = "error"
|
|
6
|
+
}
|
|
7
|
+
export interface AlertMessage extends InstanceMessage {
|
|
8
|
+
timestamp?: Date;
|
|
9
|
+
severity: AlertSeverityEnum;
|
|
10
|
+
namespace: string;
|
|
11
|
+
pod: string;
|
|
12
|
+
container: string;
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AlertSeverityEnum = void 0;
|
|
4
|
+
var AlertSeverityEnum;
|
|
5
|
+
(function (AlertSeverityEnum) {
|
|
6
|
+
AlertSeverityEnum["INFO"] = "info";
|
|
7
|
+
AlertSeverityEnum["WARNING"] = "warning";
|
|
8
|
+
AlertSeverityEnum["ERROR"] = "error";
|
|
9
|
+
})(AlertSeverityEnum || (exports.AlertSeverityEnum = AlertSeverityEnum = {}));
|
package/dist/IChannel.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { InstanceConfig
|
|
1
|
+
import { InstanceConfig } from './InstanceConfig';
|
|
2
2
|
import WebSocket from 'ws';
|
|
3
|
+
import { InstanceMessageActionEnum } from './InstanceMessage';
|
|
3
4
|
type ChannelData = {
|
|
4
5
|
id: string;
|
|
5
6
|
pauseable: boolean;
|
|
@@ -10,7 +11,7 @@ interface IChannel {
|
|
|
10
11
|
getChannelData(): ChannelData;
|
|
11
12
|
getChannelScopeLevel(scope: string): number;
|
|
12
13
|
startInstance(webSocket: WebSocket, instanceConfig: InstanceConfig, podNamespace: string, podName: string, containerName: string): void;
|
|
13
|
-
pauseContinueInstance(webSocket: WebSocket, instanceConfig: InstanceConfig, action:
|
|
14
|
+
pauseContinueInstance(webSocket: WebSocket, instanceConfig: InstanceConfig, action: InstanceMessageActionEnum): void;
|
|
14
15
|
modifyInstance(webSocket: WebSocket, instanceConfig: InstanceConfig): void;
|
|
15
16
|
containsInstance(instanceId: string): boolean;
|
|
16
17
|
stopInstance(webSocket: WebSocket, instanceConfig: InstanceConfig): void;
|
package/dist/InstanceConfig.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InstanceMessage } from "./InstanceMessage";
|
|
1
2
|
export declare enum InstanceConfigChannelEnum {
|
|
2
3
|
NONE = "none",
|
|
3
4
|
LOG = "log",
|
|
@@ -6,25 +7,10 @@ export declare enum InstanceConfigChannelEnum {
|
|
|
6
7
|
ALARM = "alarm",
|
|
7
8
|
ALERT = "alert"
|
|
8
9
|
}
|
|
9
|
-
export declare enum InstanceConfigActionEnum {
|
|
10
|
-
NONE = "none",
|
|
11
|
-
START = "start",
|
|
12
|
-
STOP = "stop",
|
|
13
|
-
PAUSE = "pause",
|
|
14
|
-
CONTINUE = "continue",
|
|
15
|
-
MODIFY = "modify",
|
|
16
|
-
PING = "ping",
|
|
17
|
-
RECONNECT = "reconnect"
|
|
18
|
-
}
|
|
19
10
|
export declare enum InstanceConfigObjectEnum {
|
|
20
11
|
PODS = "pods",
|
|
21
12
|
EVENTS = "events"
|
|
22
13
|
}
|
|
23
|
-
export declare enum InstanceConfigFlowEnum {
|
|
24
|
-
REQUEST = "request",
|
|
25
|
-
RESPONSE = "response",
|
|
26
|
-
UNSOLICITED = "unsolicited"
|
|
27
|
-
}
|
|
28
14
|
export declare enum InstanceConfigViewEnum {
|
|
29
15
|
NONE = "none",
|
|
30
16
|
CLUSTER = "cluster",
|
|
@@ -45,12 +31,8 @@ export declare enum InstanceConfigScopeEnum {
|
|
|
45
31
|
CREATE = "create",
|
|
46
32
|
SUBSCRIBE = "subscribe"
|
|
47
33
|
}
|
|
48
|
-
export interface InstanceConfig {
|
|
49
|
-
channel: string;
|
|
34
|
+
export interface InstanceConfig extends InstanceMessage {
|
|
50
35
|
objects: InstanceConfigObjectEnum;
|
|
51
|
-
action: InstanceConfigActionEnum;
|
|
52
|
-
flow: InstanceConfigFlowEnum;
|
|
53
|
-
instance: string;
|
|
54
36
|
accessKey: string;
|
|
55
37
|
scope: string;
|
|
56
38
|
view: InstanceConfigViewEnum;
|
|
@@ -61,11 +43,6 @@ export interface InstanceConfig {
|
|
|
61
43
|
reconnectKey?: string;
|
|
62
44
|
data?: any;
|
|
63
45
|
}
|
|
64
|
-
export interface InstanceConfigResponse {
|
|
65
|
-
action: InstanceConfigActionEnum;
|
|
66
|
-
flow: InstanceConfigFlowEnum;
|
|
67
|
-
channel: string;
|
|
68
|
-
instance: string;
|
|
69
|
-
type: string;
|
|
46
|
+
export interface InstanceConfigResponse extends InstanceMessage {
|
|
70
47
|
text: string;
|
|
71
48
|
}
|
package/dist/InstanceConfig.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InstanceConfigScopeEnum = exports.InstanceConfigViewEnum = exports.
|
|
3
|
+
exports.InstanceConfigScopeEnum = exports.InstanceConfigViewEnum = exports.InstanceConfigObjectEnum = exports.InstanceConfigChannelEnum = void 0;
|
|
4
4
|
var InstanceConfigChannelEnum;
|
|
5
5
|
(function (InstanceConfigChannelEnum) {
|
|
6
6
|
InstanceConfigChannelEnum["NONE"] = "none";
|
|
@@ -10,28 +10,26 @@ var InstanceConfigChannelEnum;
|
|
|
10
10
|
InstanceConfigChannelEnum["ALARM"] = "alarm";
|
|
11
11
|
InstanceConfigChannelEnum["ALERT"] = "alert";
|
|
12
12
|
})(InstanceConfigChannelEnum || (exports.InstanceConfigChannelEnum = InstanceConfigChannelEnum = {}));
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})(InstanceConfigActionEnum || (exports.InstanceConfigActionEnum = InstanceConfigActionEnum = {}));
|
|
13
|
+
// export enum InstanceConfigActionEnum {
|
|
14
|
+
// NONE = 'none',
|
|
15
|
+
// START = 'start',
|
|
16
|
+
// STOP = 'stop',
|
|
17
|
+
// PAUSE = 'pause',
|
|
18
|
+
// CONTINUE = 'continue',
|
|
19
|
+
// MODIFY = 'modify',
|
|
20
|
+
// PING = 'ping',
|
|
21
|
+
// RECONNECT = 'reconnect'
|
|
22
|
+
// }
|
|
24
23
|
var InstanceConfigObjectEnum;
|
|
25
24
|
(function (InstanceConfigObjectEnum) {
|
|
26
25
|
InstanceConfigObjectEnum["PODS"] = "pods";
|
|
27
26
|
InstanceConfigObjectEnum["EVENTS"] = "events";
|
|
28
27
|
})(InstanceConfigObjectEnum || (exports.InstanceConfigObjectEnum = InstanceConfigObjectEnum = {}));
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})(InstanceConfigFlowEnum || (exports.InstanceConfigFlowEnum = InstanceConfigFlowEnum = {}));
|
|
28
|
+
// export enum InstanceConfigFlowEnum {
|
|
29
|
+
// REQUEST = 'request',
|
|
30
|
+
// RESPONSE = 'response',
|
|
31
|
+
// UNSOLICITED = 'unsolicited'
|
|
32
|
+
// }
|
|
35
33
|
var InstanceConfigViewEnum;
|
|
36
34
|
(function (InstanceConfigViewEnum) {
|
|
37
35
|
InstanceConfigViewEnum["NONE"] = "none";
|
|
@@ -2,12 +2,25 @@ export declare enum InstanceMessageTypeEnum {
|
|
|
2
2
|
DATA = "data",
|
|
3
3
|
SIGNAL = "signal"
|
|
4
4
|
}
|
|
5
|
+
export declare enum InstanceMessageActionEnum {
|
|
6
|
+
NONE = "none",
|
|
7
|
+
START = "start",
|
|
8
|
+
STOP = "stop",
|
|
9
|
+
PAUSE = "pause",
|
|
10
|
+
CONTINUE = "continue",
|
|
11
|
+
MODIFY = "modify",
|
|
12
|
+
PING = "ping",
|
|
13
|
+
RECONNECT = "reconnect"
|
|
14
|
+
}
|
|
15
|
+
export declare enum InstanceMessageFlowEnum {
|
|
16
|
+
REQUEST = "request",
|
|
17
|
+
RESPONSE = "response",
|
|
18
|
+
UNSOLICITED = "unsolicited"
|
|
19
|
+
}
|
|
5
20
|
export interface InstanceMessage {
|
|
21
|
+
action: InstanceMessageActionEnum;
|
|
22
|
+
flow: InstanceMessageFlowEnum;
|
|
23
|
+
type: InstanceMessageTypeEnum;
|
|
6
24
|
channel: string;
|
|
7
25
|
instance: string;
|
|
8
|
-
reconnectKey?: string;
|
|
9
|
-
type: InstanceMessageTypeEnum;
|
|
10
|
-
namespace?: string;
|
|
11
|
-
pod?: string;
|
|
12
|
-
container?: string;
|
|
13
26
|
}
|
package/dist/InstanceMessage.js
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InstanceMessageTypeEnum = void 0;
|
|
3
|
+
exports.InstanceMessageFlowEnum = exports.InstanceMessageActionEnum = exports.InstanceMessageTypeEnum = void 0;
|
|
4
4
|
var InstanceMessageTypeEnum;
|
|
5
5
|
(function (InstanceMessageTypeEnum) {
|
|
6
6
|
InstanceMessageTypeEnum["DATA"] = "data";
|
|
7
7
|
InstanceMessageTypeEnum["SIGNAL"] = "signal";
|
|
8
8
|
})(InstanceMessageTypeEnum || (exports.InstanceMessageTypeEnum = InstanceMessageTypeEnum = {}));
|
|
9
|
+
var InstanceMessageActionEnum;
|
|
10
|
+
(function (InstanceMessageActionEnum) {
|
|
11
|
+
InstanceMessageActionEnum["NONE"] = "none";
|
|
12
|
+
InstanceMessageActionEnum["START"] = "start";
|
|
13
|
+
InstanceMessageActionEnum["STOP"] = "stop";
|
|
14
|
+
InstanceMessageActionEnum["PAUSE"] = "pause";
|
|
15
|
+
InstanceMessageActionEnum["CONTINUE"] = "continue";
|
|
16
|
+
InstanceMessageActionEnum["MODIFY"] = "modify";
|
|
17
|
+
InstanceMessageActionEnum["PING"] = "ping";
|
|
18
|
+
InstanceMessageActionEnum["RECONNECT"] = "reconnect";
|
|
19
|
+
})(InstanceMessageActionEnum || (exports.InstanceMessageActionEnum = InstanceMessageActionEnum = {}));
|
|
20
|
+
var InstanceMessageFlowEnum;
|
|
21
|
+
(function (InstanceMessageFlowEnum) {
|
|
22
|
+
InstanceMessageFlowEnum["REQUEST"] = "request";
|
|
23
|
+
InstanceMessageFlowEnum["RESPONSE"] = "response";
|
|
24
|
+
InstanceMessageFlowEnum["UNSOLICITED"] = "unsolicited";
|
|
25
|
+
})(InstanceMessageFlowEnum || (exports.InstanceMessageFlowEnum = InstanceMessageFlowEnum = {}));
|
package/dist/LogMessage.d.ts
CHANGED