CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/util/compute/log.ts
Views: 687
1
import type {
2
State,
3
AutomaticShutdown,
4
} from "@cocalc/util/db-schema/compute-servers";
5
6
interface Event {
7
event: "compute-server";
8
server_id: number;
9
}
10
11
interface StateChange {
12
action: "state";
13
state: State;
14
}
15
16
interface ConfigurationChange {
17
action: "configuration";
18
changes: { [param: string]: { from: any; to: any } };
19
}
20
21
export interface AutomaticShutdownEntry {
22
action: "automatic-shutdown";
23
automatic_shutdown: AutomaticShutdown;
24
}
25
26
interface Error {
27
action: "error";
28
error: string;
29
}
30
31
export type ComputeServerEvent = (
32
| ConfigurationChange
33
| StateChange
34
| Error
35
| AutomaticShutdownEntry
36
) &
37
Event;
38
39
export type ComputeServerEventLogEntry =
40
| ConfigurationChange
41
| StateChange
42
| AutomaticShutdownEntry
43
| Error;
44
45