@kwirthmagnify/kwirth-common 0.5.4 → 0.5.7
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/Channel.d.ts +2 -0
- package/dist/Daemon.d.ts +47 -0
- package/dist/Daemon.js +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/Channel.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ISenderAccess } from './Sender';
|
|
2
|
+
import { IDaemonManager } from './Daemon';
|
|
2
3
|
declare enum ClusterTypeEnum {
|
|
3
4
|
KUBERNETES = "kubernetes",
|
|
4
5
|
DOCKER = "docker"
|
|
@@ -49,5 +50,6 @@ interface IBackChannelObject {
|
|
|
49
50
|
logWarning?(message: unknown): void;
|
|
50
51
|
logError?(message: unknown): void;
|
|
51
52
|
senders?: ISenderAccess;
|
|
53
|
+
daemonManager?: IDaemonManager;
|
|
52
54
|
}
|
|
53
55
|
export { ClusterTypeEnum, KwirthData, BackChannelData, EClusterType, IBackChannelRequirements, IBackChannelObject };
|
package/dist/Daemon.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ISenderAccess } from './Sender';
|
|
2
|
+
import { EInstanceConfigObject, EInstanceConfigView } from './InstanceConfig';
|
|
3
|
+
export interface IDaemonInstanceConfig {
|
|
4
|
+
id: string;
|
|
5
|
+
daemonId: string;
|
|
6
|
+
description: string;
|
|
7
|
+
view: EInstanceConfigView;
|
|
8
|
+
namespace: string;
|
|
9
|
+
group?: string;
|
|
10
|
+
pod?: string;
|
|
11
|
+
container?: string;
|
|
12
|
+
objects?: EInstanceConfigObject;
|
|
13
|
+
data?: unknown;
|
|
14
|
+
started?: boolean;
|
|
15
|
+
createdAt?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface BackDaemonData {
|
|
18
|
+
id: string;
|
|
19
|
+
resourced: boolean;
|
|
20
|
+
cluster: boolean;
|
|
21
|
+
sources: string[];
|
|
22
|
+
}
|
|
23
|
+
export interface IBackDaemonRequirements {
|
|
24
|
+
storage: boolean;
|
|
25
|
+
providers: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface IBackDaemonObject {
|
|
28
|
+
writeStorage?(id: string, secret: boolean, data: unknown): Promise<void>;
|
|
29
|
+
readStorage?(id: string, secret: boolean): Promise<unknown>;
|
|
30
|
+
logInfo?(message: unknown): void;
|
|
31
|
+
logTrace?(message: unknown): void;
|
|
32
|
+
logWarning?(message: unknown): void;
|
|
33
|
+
logError?(message: unknown): void;
|
|
34
|
+
senders?: ISenderAccess;
|
|
35
|
+
}
|
|
36
|
+
export interface IDaemonEvent {
|
|
37
|
+
instanceId: string;
|
|
38
|
+
type: string;
|
|
39
|
+
data: unknown;
|
|
40
|
+
}
|
|
41
|
+
export interface IDaemonManager {
|
|
42
|
+
createInstance(daemonId: string, instanceConfig: IDaemonInstanceConfig): Promise<void>;
|
|
43
|
+
stopInstance(instanceId: string): Promise<void>;
|
|
44
|
+
listInstances(daemonId?: string): IDaemonInstanceConfig[];
|
|
45
|
+
subscribe(instanceId: string, callback: (event: IDaemonEvent) => void): () => void;
|
|
46
|
+
sendCommand(instanceId: string, command: string, data: unknown): Promise<unknown>;
|
|
47
|
+
}
|
package/dist/Daemon.js
ADDED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED