@dxos/cli 0.1.46-next.c3cc04c → 0.1.48-next.4b7ebc3
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/README.md +1 -1
- package/config/config-default.yml +2 -0
- package/config/config-dev.yml +2 -0
- package/config/config-local.yml +2 -0
- package/config/config-staging.yml +2 -0
- package/config/config.yml +2 -0
- package/dist/src/base-command.d.ts +2 -1
- package/dist/src/base-command.d.ts.map +1 -1
- package/dist/src/base-command.js +28 -7
- package/dist/src/base-command.js.map +1 -1
- package/dist/src/commands/tunnel/list.js +2 -2
- package/dist/src/commands/tunnel/list.js.map +1 -1
- package/dist/src/commands/tunnel/set.js +2 -2
- package/dist/src/commands/tunnel/set.js.map +1 -1
- package/dist/src/daemon/faas/api.d.ts +346 -0
- package/dist/src/daemon/faas/api.d.ts.map +1 -0
- package/dist/src/daemon/faas/api.js +11 -0
- package/dist/src/daemon/faas/api.js.map +1 -0
- package/dist/src/daemon/faas/connector.d.ts +46 -0
- package/dist/src/daemon/faas/connector.d.ts.map +1 -0
- package/dist/src/daemon/faas/connector.js +185 -0
- package/dist/src/daemon/faas/connector.js.map +1 -0
- package/dist/src/daemon/run-services.d.ts.map +1 -1
- package/dist/src/daemon/run-services.js +21 -11
- package/dist/src/daemon/run-services.js.map +1 -1
- package/dist/src/util/index.d.ts +2 -1
- package/dist/src/util/index.d.ts.map +1 -1
- package/dist/src/util/index.js +2 -1
- package/dist/src/util/index.js.map +1 -1
- package/dist/src/util/publish/common.d.ts +0 -7
- package/dist/src/util/publish/common.d.ts.map +1 -1
- package/dist/src/util/publish/common.js +2 -26
- package/dist/src/util/publish/common.js.map +1 -1
- package/dist/src/util/telemetryrc.json +1 -1
- package/dist/src/util/tunnel/common.d.ts +8 -0
- package/dist/src/util/tunnel/common.d.ts.map +1 -0
- package/dist/src/util/tunnel/common.js +32 -0
- package/dist/src/util/tunnel/common.js.map +1 -0
- package/dist/src/util/tunnel/index.d.ts +3 -0
- package/dist/src/util/tunnel/index.d.ts.map +1 -0
- package/dist/src/util/tunnel/index.js +22 -0
- package/dist/src/util/tunnel/index.js.map +1 -0
- package/dist/src/util/tunnel/tunnel-rpc-peer.d.ts +15 -0
- package/dist/src/util/tunnel/tunnel-rpc-peer.d.ts.map +1 -0
- package/dist/src/util/tunnel/tunnel-rpc-peer.js +89 -0
- package/dist/src/util/tunnel/tunnel-rpc-peer.js.map +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +22 -19
package/README.md
CHANGED
package/config/config-dev.yml
CHANGED
package/config/config-local.yml
CHANGED
package/config/config.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command, Config as OclifConfig } from '@oclif/core';
|
|
2
2
|
import { Client, Config } from '@dxos/client';
|
|
3
3
|
import { Daemon } from './daemon';
|
|
4
|
-
import { PublisherRpcPeer, SupervisorRpcPeer, TelemetryContext } from './util';
|
|
4
|
+
import { PublisherRpcPeer, SupervisorRpcPeer, TunnelRpcPeer, TelemetryContext } from './util';
|
|
5
5
|
export declare abstract class BaseCommand extends Command {
|
|
6
6
|
private _clientConfig?;
|
|
7
7
|
private _client?;
|
|
@@ -39,6 +39,7 @@ export declare abstract class BaseCommand extends Command {
|
|
|
39
39
|
* Convenience function to wrap command passing in kube publisher.
|
|
40
40
|
*/
|
|
41
41
|
execWithPublisher<T>(callback: (rpc: PublisherRpcPeer) => Promise<T | undefined>): Promise<T | undefined>;
|
|
42
|
+
execWithTunneling<T>(callback: (rpc: TunnelRpcPeer) => Promise<T | undefined>): Promise<T | undefined>;
|
|
42
43
|
execWithSupervisor<T>(callback: (rpc: SupervisorRpcPeer) => Promise<T | undefined>): Promise<T | undefined>;
|
|
43
44
|
addToTelemetryContext(values: object): void;
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.d.ts","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EA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AC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAe/F,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAgBrG;;OAEG;IACG,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAyBzG,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAyBtG,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IA0BjH,qBAAqB,CAAC,MAAM,EAAE,MAAM;CAUrC"}
|
package/dist/src/base-command.js
CHANGED
|
@@ -151,7 +151,7 @@ class BaseCommand extends core_1.Command {
|
|
|
151
151
|
}
|
|
152
152
|
catch (err) {
|
|
153
153
|
Sentry.captureException(err);
|
|
154
|
-
log_1.log.error(`Invalid config file: ${configFile}`, err, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
154
|
+
log_1.log.error(`Invalid config file: ${configFile}`, err, { file: "packages/devtools/cli/src/base-command.ts", line: 194, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
155
155
|
process.exit(1);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
@@ -186,10 +186,10 @@ class BaseCommand extends core_1.Command {
|
|
|
186
186
|
});
|
|
187
187
|
(0, node_assert_1.default)(this._clientConfig);
|
|
188
188
|
if (!this._client) {
|
|
189
|
-
(0, log_1.log)('Creating client...', {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
189
|
+
(0, log_1.log)('Creating client...', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 233, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
190
190
|
this._client = new client_1.Client({ config: this._clientConfig, services: (0, client_1.fromCliEnv)(flags.profile) });
|
|
191
191
|
await this._client.initialize();
|
|
192
|
-
(0, log_1.log)('Initialized', {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
192
|
+
(0, log_1.log)('Initialized', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 236, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
193
193
|
}
|
|
194
194
|
return this._client;
|
|
195
195
|
}
|
|
@@ -200,9 +200,9 @@ class BaseCommand extends core_1.Command {
|
|
|
200
200
|
try {
|
|
201
201
|
const client = await this.getClient();
|
|
202
202
|
const value = await callback(client);
|
|
203
|
-
(0, log_1.log)('Destroying...', {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
203
|
+
(0, log_1.log)('Destroying...', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 249, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
204
204
|
await client.destroy();
|
|
205
|
-
(0, log_1.log)('Done', {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
205
|
+
(0, log_1.log)('Done', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 252, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
206
206
|
return value;
|
|
207
207
|
}
|
|
208
208
|
catch (err) {
|
|
@@ -215,9 +215,9 @@ class BaseCommand extends core_1.Command {
|
|
|
215
215
|
const daemon = new forever_1.ForeverDaemon();
|
|
216
216
|
await daemon.connect();
|
|
217
217
|
const value = await callback(daemon);
|
|
218
|
-
(0, log_1.log)('Disconnecting...', {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
218
|
+
(0, log_1.log)('Disconnecting...', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 265, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
219
219
|
await daemon.disconnect();
|
|
220
|
-
(0, log_1.log)('Done', {}, { file: "packages/devtools/cli/src/base-command.ts", line:
|
|
220
|
+
(0, log_1.log)('Done', {}, { file: "packages/devtools/cli/src/base-command.ts", line: 268, scope: this, bugcheck: "If you see this message then it means that the source code preprocessor for @dxos/log is broken. It probably has misinterpreted an unrelated call for a logger invocation.", callSite: (fn, args) => fn(...args) });
|
|
221
221
|
return value;
|
|
222
222
|
}
|
|
223
223
|
catch (err) {
|
|
@@ -249,6 +249,27 @@ class BaseCommand extends core_1.Command {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
+
async execWithTunneling(callback) {
|
|
253
|
+
let rpc;
|
|
254
|
+
try {
|
|
255
|
+
(0, node_assert_1.default)(this._clientConfig);
|
|
256
|
+
const wsEndpoint = this._clientConfig.get('runtime.services.tunneling.server');
|
|
257
|
+
(0, node_assert_1.default)(wsEndpoint);
|
|
258
|
+
rpc = new util_1.TunnelRpcPeer(wsEndpoint);
|
|
259
|
+
await Promise.race([rpc.connected.waitForCount(1), rpc.error.waitForCount(1).then((err) => Promise.reject(err))]);
|
|
260
|
+
const value = await callback(rpc);
|
|
261
|
+
return value;
|
|
262
|
+
}
|
|
263
|
+
catch (err) {
|
|
264
|
+
Sentry.captureException(err);
|
|
265
|
+
this.error(err);
|
|
266
|
+
}
|
|
267
|
+
finally {
|
|
268
|
+
if (rpc) {
|
|
269
|
+
await rpc.close();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
252
273
|
async execWithSupervisor(callback) {
|
|
253
274
|
let rpc;
|
|
254
275
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,sCAAoE;AACpE,kDAA0B;AAC1B,sDAA2B;AAC3B,4DAA+B;AAC/B,8DAAiC;AACjC,sDAAyB;AACzB,+CAA6D;AAC7D,yCAA0C;AAC1C,oDAA2B;AAE3B,yCAA8E;AAE9E,uCAAoC;AACpC,mCAAgC;AAChC,qDAAuC;AACvC,yCAAgD;AAChD,2DAA6C;AAG7C,8CAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../../src/base-command.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEF,sCAAoE;AACpE,kDAA0B;AAC1B,sDAA2B;AAC3B,4DAA+B;AAC/B,8DAAiC;AACjC,sDAAyB;AACzB,+CAA6D;AAC7D,yCAA0C;AAC1C,oDAA2B;AAE3B,yCAA8E;AAE9E,uCAAoC;AACpC,mCAAgC;AAChC,qDAAuC;AACvC,yCAAgD;AAChD,2DAA6C;AAG7C,8CAAiD;AACjD,iCAUgB;AAEhB,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC,gCAAgC;AAChC,MAAM,MAAM,GAAG,KAAK,EAAE,GAAG,IAAc,EAAoB,EAAE;IAC3D,IAAI;QACF,MAAM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rF;QACH,CAAC;QACD,SAAS,EAAE,CAAC,SAAS,CAAC;QACtB,OAAO,EAAE,CAAC,GAAG,CAAC;KACf,CAAC;IAEF,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC;QACrB,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,CAAC,GAAG,CAAC;KACf,CAAC;IAEF,OAAO,EAAE,YAAK,CAAC,MAAM,CAAC;QACpB,WAAW,EAAE,iFAAiF;QAC9F,OAAO,EAAE,2BAAkB;QAC3B,GAAG,EAAE,YAAY;KAClB,CAAC;IAEF,qCAAqC;CACtC,AA5BoB,CA4BnB;AArCkB,kCAAW"}
|
|
@@ -13,8 +13,8 @@ class List extends base_command_1.BaseCommand {
|
|
|
13
13
|
async run() {
|
|
14
14
|
const { flags } = await this.parse(List);
|
|
15
15
|
try {
|
|
16
|
-
return await this.
|
|
17
|
-
const listResponse = await
|
|
16
|
+
return await this.execWithTunneling(async (tunnel) => {
|
|
17
|
+
const listResponse = await tunnel.rpc.listTunnels();
|
|
18
18
|
(0, node_assert_1.default)(listResponse.tunnels, 'Unable to list tunnels.');
|
|
19
19
|
(0, util_1.printTunnels)(listResponse.tunnels, flags);
|
|
20
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/tunnel/list.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,8DAAiC;AAEjC,qDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/commands/tunnel/list.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,8DAAiC;AAEjC,qDAAiD;AACjD,qCAAyD;AAEzD,MAAqB,IAAK,SAAQ,0BAAW;IAI3C,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI;YACF,OAAO,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAqB,EAAE,EAAE;gBAClE,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;gBACpD,IAAA,qBAAM,EAAC,YAAY,CAAC,OAAQ,EAAE,yBAAyB,CAAC,CAAC;gBACzD,IAAA,mBAAY,EAAC,YAAY,CAAC,OAAQ,EAAE,KAAK,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;SACJ;QAAC,OAAO,GAAQ,EAAE;YACjB,IAAI,CAAC,GAAG,CAAC,mBAAmB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;YAC3C,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;SAC9B;IACH,CAAC;;AAfe,mBAAc,GAAG,IAAI,CAAC;AACtB,gBAAW,GAAG,eAAe,CAAC;kBAF3B,IAAI"}
|
|
@@ -18,8 +18,8 @@ class Set extends base_command_1.BaseCommand {
|
|
|
18
18
|
if (!!enabled === !!disabled) {
|
|
19
19
|
throw new Error('Specify either --enabled or --disabled.');
|
|
20
20
|
}
|
|
21
|
-
return await this.
|
|
22
|
-
const tunnelResponse = await
|
|
21
|
+
return await this.execWithTunneling(async (tunnel) => {
|
|
22
|
+
const tunnelResponse = await tunnel.rpc.tunnel({ name: app, enabled: enabled && !disabled });
|
|
23
23
|
(0, node_assert_1.default)(tunnelResponse, 'Unable to set tunnel.');
|
|
24
24
|
(0, util_1.printTunnels)([tunnelResponse], flags);
|
|
25
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/commands/tunnel/set.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;;;;AAEF,sCAAoC;AACpC,8DAAiC;AAEjC,qDAAiD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AW,CAAC,KAAK;IACpB,GAAG,EAAE,YAAK,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,kBAAkB;QAC/B,QAAQ,EAAE,IAAI;KACf,CAAC;IACF,OAAO,EAAE,YAAK,CAAC,OAAO,CAAC;QACrB,WAAW,EAAE,gBAAgB;KAC9B,CAAC;IACF,QAAQ,EAAE,YAAK,CAAC,OAAO,CAAC;QACtB,WAAW,EAAE,iBAAiB;KAC/B,CAAC;CACH,CAAC;kBAhBiB,GAAG"}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @export
|
|
4
|
+
* @interface DeleteFunctionRequest
|
|
5
|
+
*/
|
|
6
|
+
export interface DeleteFunctionRequest {
|
|
7
|
+
/**
|
|
8
|
+
* Name of deployed function
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof DeleteFunctionRequest
|
|
11
|
+
*/
|
|
12
|
+
functionName: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface FunctionDefinition
|
|
18
|
+
*/
|
|
19
|
+
export interface FunctionDefinition {
|
|
20
|
+
/**
|
|
21
|
+
* Name of deployed function
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof FunctionDefinition
|
|
24
|
+
*/
|
|
25
|
+
service: string;
|
|
26
|
+
/**
|
|
27
|
+
* Network, usually func_functions for Swarm (deprecated)
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof FunctionDefinition
|
|
30
|
+
*/
|
|
31
|
+
network?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Docker image in accessible registry
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof FunctionDefinition
|
|
36
|
+
*/
|
|
37
|
+
image: string;
|
|
38
|
+
/**
|
|
39
|
+
* Process for watchdog to fork
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof FunctionDefinition
|
|
42
|
+
*/
|
|
43
|
+
envProcess: string;
|
|
44
|
+
/**
|
|
45
|
+
* Overrides to environmental variables
|
|
46
|
+
* @type {{ [key: string]: string; }}
|
|
47
|
+
* @memberof FunctionDefinition
|
|
48
|
+
*/
|
|
49
|
+
envVars?: {
|
|
50
|
+
[key: string]: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Array<string>}
|
|
55
|
+
* @memberof FunctionDefinition
|
|
56
|
+
*/
|
|
57
|
+
constraints?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
* A map of labels for making scheduling or routing decisions
|
|
60
|
+
* @type {{ [key: string]: string; }}
|
|
61
|
+
* @memberof FunctionDefinition
|
|
62
|
+
*/
|
|
63
|
+
labels?: {
|
|
64
|
+
[key: string]: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* A map of annotations for management, orchestration, events and build tasks
|
|
68
|
+
* @type {{ [key: string]: string; }}
|
|
69
|
+
* @memberof FunctionDefinition
|
|
70
|
+
*/
|
|
71
|
+
annotations?: {
|
|
72
|
+
[key: string]: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {Array<string>}
|
|
77
|
+
* @memberof FunctionDefinition
|
|
78
|
+
*/
|
|
79
|
+
secrets?: Array<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Private registry base64-encoded basic auth (as present in ~/.docker/config.json)
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof FunctionDefinition
|
|
84
|
+
*/
|
|
85
|
+
registryAuth?: string;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @type {FunctionDefinitionLimits}
|
|
89
|
+
* @memberof FunctionDefinition
|
|
90
|
+
*/
|
|
91
|
+
limits?: FunctionDefinitionLimits;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {FunctionDefinitionLimits}
|
|
95
|
+
* @memberof FunctionDefinition
|
|
96
|
+
*/
|
|
97
|
+
requests?: FunctionDefinitionLimits;
|
|
98
|
+
/**
|
|
99
|
+
* Make the root filesystem of the function read-only
|
|
100
|
+
* @type {boolean}
|
|
101
|
+
* @memberof FunctionDefinition
|
|
102
|
+
*/
|
|
103
|
+
readOnlyRootFilesystem?: boolean;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @export
|
|
108
|
+
* @interface FunctionDefinitionLimits
|
|
109
|
+
*/
|
|
110
|
+
export interface FunctionDefinitionLimits {
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @type {string}
|
|
114
|
+
* @memberof FunctionDefinitionLimits
|
|
115
|
+
*/
|
|
116
|
+
memory?: string;
|
|
117
|
+
/**
|
|
118
|
+
*
|
|
119
|
+
* @type {string}
|
|
120
|
+
* @memberof FunctionDefinitionLimits
|
|
121
|
+
*/
|
|
122
|
+
cpu?: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* @export
|
|
127
|
+
* @interface FunctionListEntry
|
|
128
|
+
*/
|
|
129
|
+
export interface FunctionListEntry {
|
|
130
|
+
/**
|
|
131
|
+
* The name of the function
|
|
132
|
+
* @type {string}
|
|
133
|
+
* @memberof FunctionListEntry
|
|
134
|
+
*/
|
|
135
|
+
name: string;
|
|
136
|
+
/**
|
|
137
|
+
* The fully qualified docker image name of the function
|
|
138
|
+
* @type {string}
|
|
139
|
+
* @memberof FunctionListEntry
|
|
140
|
+
*/
|
|
141
|
+
image: string;
|
|
142
|
+
/**
|
|
143
|
+
* The amount of invocations for the specified function
|
|
144
|
+
* @type {number}
|
|
145
|
+
* @memberof FunctionListEntry
|
|
146
|
+
*/
|
|
147
|
+
invocationCount: number;
|
|
148
|
+
/**
|
|
149
|
+
* The current minimal ammount of replicas
|
|
150
|
+
* @type {number}
|
|
151
|
+
* @memberof FunctionListEntry
|
|
152
|
+
*/
|
|
153
|
+
replicas: number;
|
|
154
|
+
/**
|
|
155
|
+
* The current available amount of replicas
|
|
156
|
+
* @type {number}
|
|
157
|
+
* @memberof FunctionListEntry
|
|
158
|
+
*/
|
|
159
|
+
availableReplicas: number;
|
|
160
|
+
/**
|
|
161
|
+
* Process for watchdog to fork
|
|
162
|
+
* @type {string}
|
|
163
|
+
* @memberof FunctionListEntry
|
|
164
|
+
*/
|
|
165
|
+
envProcess: string;
|
|
166
|
+
/**
|
|
167
|
+
* A map of labels for making scheduling or routing decisions
|
|
168
|
+
* @type {{ [key: string]: string; }}
|
|
169
|
+
* @memberof FunctionListEntry
|
|
170
|
+
*/
|
|
171
|
+
labels: {
|
|
172
|
+
[key: string]: string;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* A map of annotations for management, orchestration, events and build tasks
|
|
176
|
+
* @type {{ [key: string]: string; }}
|
|
177
|
+
* @memberof FunctionListEntry
|
|
178
|
+
*/
|
|
179
|
+
annotations?: {
|
|
180
|
+
[key: string]: string;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* @export
|
|
186
|
+
* @interface Info
|
|
187
|
+
*/
|
|
188
|
+
export interface Info {
|
|
189
|
+
/**
|
|
190
|
+
*
|
|
191
|
+
* @type {InfoProvider}
|
|
192
|
+
* @memberof Info
|
|
193
|
+
*/
|
|
194
|
+
provider: InfoProvider;
|
|
195
|
+
/**
|
|
196
|
+
*
|
|
197
|
+
* @type {InfoVersion}
|
|
198
|
+
* @memberof Info
|
|
199
|
+
*/
|
|
200
|
+
version: InfoVersion;
|
|
201
|
+
/**
|
|
202
|
+
* Platform architecture
|
|
203
|
+
* @type {string}
|
|
204
|
+
* @memberof Info
|
|
205
|
+
*/
|
|
206
|
+
arch?: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The OpenFaaS Provider
|
|
210
|
+
* @export
|
|
211
|
+
* @interface InfoProvider
|
|
212
|
+
*/
|
|
213
|
+
export interface InfoProvider {
|
|
214
|
+
/**
|
|
215
|
+
*
|
|
216
|
+
* @type {string}
|
|
217
|
+
* @memberof InfoProvider
|
|
218
|
+
*/
|
|
219
|
+
provider?: string;
|
|
220
|
+
/**
|
|
221
|
+
*
|
|
222
|
+
* @type {string}
|
|
223
|
+
* @memberof InfoProvider
|
|
224
|
+
*/
|
|
225
|
+
orchestration?: string;
|
|
226
|
+
/**
|
|
227
|
+
*
|
|
228
|
+
* @type {InfoProviderVersion}
|
|
229
|
+
* @memberof InfoProvider
|
|
230
|
+
*/
|
|
231
|
+
version?: InfoProviderVersion;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Version of the OpenFaaS Provider
|
|
235
|
+
* @export
|
|
236
|
+
* @interface InfoProviderVersion
|
|
237
|
+
*/
|
|
238
|
+
export interface InfoProviderVersion {
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @type {string}
|
|
242
|
+
* @memberof InfoProviderVersion
|
|
243
|
+
*/
|
|
244
|
+
commitMessage?: string;
|
|
245
|
+
/**
|
|
246
|
+
*
|
|
247
|
+
* @type {string}
|
|
248
|
+
* @memberof InfoProviderVersion
|
|
249
|
+
*/
|
|
250
|
+
sha?: string;
|
|
251
|
+
/**
|
|
252
|
+
*
|
|
253
|
+
* @type {string}
|
|
254
|
+
* @memberof InfoProviderVersion
|
|
255
|
+
*/
|
|
256
|
+
release?: string;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Version of the Gateway
|
|
260
|
+
* @export
|
|
261
|
+
* @interface InfoVersion
|
|
262
|
+
*/
|
|
263
|
+
export interface InfoVersion {
|
|
264
|
+
/**
|
|
265
|
+
*
|
|
266
|
+
* @type {string}
|
|
267
|
+
* @memberof InfoVersion
|
|
268
|
+
*/
|
|
269
|
+
commitMessage?: string;
|
|
270
|
+
/**
|
|
271
|
+
*
|
|
272
|
+
* @type {string}
|
|
273
|
+
* @memberof InfoVersion
|
|
274
|
+
*/
|
|
275
|
+
sha?: string;
|
|
276
|
+
/**
|
|
277
|
+
*
|
|
278
|
+
* @type {string}
|
|
279
|
+
* @memberof InfoVersion
|
|
280
|
+
*/
|
|
281
|
+
release?: string;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
*
|
|
285
|
+
* @export
|
|
286
|
+
* @interface LogEntry
|
|
287
|
+
*/
|
|
288
|
+
export interface LogEntry {
|
|
289
|
+
/**
|
|
290
|
+
* the function name
|
|
291
|
+
* @type {string}
|
|
292
|
+
* @memberof LogEntry
|
|
293
|
+
*/
|
|
294
|
+
name?: string;
|
|
295
|
+
/**
|
|
296
|
+
* the name/id of the specific function instance
|
|
297
|
+
* @type {string}
|
|
298
|
+
* @memberof LogEntry
|
|
299
|
+
*/
|
|
300
|
+
instance?: string;
|
|
301
|
+
/**
|
|
302
|
+
* the timestamp of when the log message was recorded
|
|
303
|
+
* @type {Date}
|
|
304
|
+
* @memberof LogEntry
|
|
305
|
+
*/
|
|
306
|
+
timestamp?: Date;
|
|
307
|
+
/**
|
|
308
|
+
* raw log message content
|
|
309
|
+
* @type {string}
|
|
310
|
+
* @memberof LogEntry
|
|
311
|
+
*/
|
|
312
|
+
text?: string;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @export
|
|
317
|
+
* @interface Secret
|
|
318
|
+
*/
|
|
319
|
+
export interface Secret {
|
|
320
|
+
/**
|
|
321
|
+
* Name of secret
|
|
322
|
+
* @type {string}
|
|
323
|
+
* @memberof Secret
|
|
324
|
+
*/
|
|
325
|
+
name: string;
|
|
326
|
+
/**
|
|
327
|
+
* Value of secret in plain-text
|
|
328
|
+
* @type {string}
|
|
329
|
+
* @memberof Secret
|
|
330
|
+
*/
|
|
331
|
+
value?: string;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
*
|
|
335
|
+
* @export
|
|
336
|
+
* @interface SecretName
|
|
337
|
+
*/
|
|
338
|
+
export interface SecretName {
|
|
339
|
+
/**
|
|
340
|
+
* Name of secret
|
|
341
|
+
* @type {string}
|
|
342
|
+
* @memberof SecretName
|
|
343
|
+
*/
|
|
344
|
+
name?: string;
|
|
345
|
+
}
|
|
346
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/daemon/faas/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACnC;;;;OAIG;IACH,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACxC;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG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IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACrB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../src/daemon/faas/api.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,EAAE;AACF,0BAA0B;AAC1B,EAAE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ClientServicesProvider } from '@dxos/client';
|
|
2
|
+
import { Runtime } from '@dxos/protocols/proto/dxos/config';
|
|
3
|
+
export type Trigger = {
|
|
4
|
+
id: string;
|
|
5
|
+
spaceKey: string;
|
|
6
|
+
function: {
|
|
7
|
+
/**
|
|
8
|
+
* Name of deployed function to invoke.
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
subscription: {
|
|
13
|
+
/**
|
|
14
|
+
* Object types.
|
|
15
|
+
*/
|
|
16
|
+
type?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Properties to match.
|
|
19
|
+
*/
|
|
20
|
+
props?: Record<string, any>;
|
|
21
|
+
/**
|
|
22
|
+
* List of paths for referenced objects to include.
|
|
23
|
+
*/
|
|
24
|
+
nested?: string[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare class FaasConnector {
|
|
28
|
+
private readonly _faasConfig;
|
|
29
|
+
private readonly _clientServices;
|
|
30
|
+
private readonly _ctx;
|
|
31
|
+
private readonly _remountTask;
|
|
32
|
+
private readonly _mountedTriggers;
|
|
33
|
+
private readonly _client;
|
|
34
|
+
constructor(_faasConfig: Runtime.Services.Faasd, _clientServices: ClientServicesProvider);
|
|
35
|
+
open(): Promise<void>;
|
|
36
|
+
close(): Promise<void>;
|
|
37
|
+
private _watchTriggers;
|
|
38
|
+
private _getTriggers;
|
|
39
|
+
private _unmountTriggers;
|
|
40
|
+
private _remountTriggers;
|
|
41
|
+
private _mountTrigger;
|
|
42
|
+
private _dispatch;
|
|
43
|
+
private _invokeFunction;
|
|
44
|
+
private _getFunctions;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=connector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../../../src/daemon/faas/connector.ts"],"names":[],"mappings":"AAKA,OAAO,EAAU,sBAAsB,EAAqB,MAAM,cAAc,CAAC;AAKjF,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAI5D,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IAEX,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE;QACR;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAEF,YAAY,EAAE;QACZ;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAE5B;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;CACH,CAAC;AAiBF,qBAAa,aAAa;IAYtB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAZlC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiB;IAEtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAE1B;IAEH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAwB;IAEzD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;gBAGd,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,EACnC,eAAe,EAAE,sBAAsB;IAKpD,IAAI;IAOJ,KAAK;YAMG,cAAc;YA4Cd,YAAY;YAgBZ,gBAAgB;YAShB,gBAAgB;YAchB,aAAa;YA0Db,SAAS;YAsBT,eAAe;YAiBf,aAAa;CAa5B"}
|