mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) move home server into core
Summary: This moves enough server material into core to run a home server. The data engine is not yet incorporated (though in manual testing it works when ported). Test Plan: existing tests pass Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2552
This commit is contained in:
28
app/server/lib/ISandbox.ts
Normal file
28
app/server/lib/ISandbox.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import * as log from 'app/server/lib/log';
|
||||
|
||||
/**
|
||||
* Starting to whittle down the options used when creating a sandbox, to leave more
|
||||
* freedom in how the sandbox works.
|
||||
*/
|
||||
export interface ISandboxCreationOptions {
|
||||
comment?: string; // an argument to add in command line when possible, so it shows in `ps`
|
||||
|
||||
logCalls?: boolean;
|
||||
logMeta?: log.ILogMeta;
|
||||
logTimes?: boolean;
|
||||
|
||||
// This batch of options is used by SafePythonComponent, so are important for importers.
|
||||
entryPoint?: string; // main script to call - leave undefined for default
|
||||
sandboxMount?: string; // if defined, make this path available read-only as "/sandbox"
|
||||
importMount?: string; // if defined, make this path available read-only as "/importdir"
|
||||
}
|
||||
|
||||
export interface ISandbox {
|
||||
shutdown(): Promise<unknown>; // TODO: tighten up this type.
|
||||
pyCall(funcName: string, ...varArgs: unknown[]): Promise<any>;
|
||||
reportMemoryUsage(): Promise<void>;
|
||||
}
|
||||
|
||||
export interface ISandboxCreator {
|
||||
create(options: ISandboxCreationOptions): ISandbox;
|
||||
}
|
||||
Reference in New Issue
Block a user