1 | import {State} from './const';
|
2 |
|
3 | export type ProcessScale = number | 'auto';
|
4 | export type CategoryReg = string | 'all' | 'weak-all';
|
5 | export type Entry = string | {
|
6 | new(...x): any;
|
7 | };
|
8 |
|
9 | export interface EntryClass {
|
10 | new(...x): any;
|
11 | }
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export interface ApplicationRepresentation {
|
17 | appName: string;
|
18 | appDir: string;
|
19 | scale?: ProcessScale;
|
20 | globalEnv?: any;
|
21 | globalExecArgv?: any[];
|
22 | globalArgs?: any[];
|
23 | inspector?: true | {
|
24 | setPortOnly?: boolean;
|
25 | port?: number;
|
26 | host?: string;
|
27 | };
|
28 | }
|
29 |
|
30 | export interface ProcessRepresentation extends ApplicationRepresentation {
|
31 | processName: string;
|
32 | offset?: number;
|
33 | order?: number;
|
34 | scale?: ProcessScale;
|
35 | env?: any;
|
36 | execArgv?: any[];
|
37 | args?: any[];
|
38 | entryFileBaseDir?: string;
|
39 | entryFile?: string;
|
40 | }
|
41 |
|
42 | export interface ApplicationStructureRepresentation extends ApplicationRepresentation {
|
43 | process: Array<ProcessRepresentation>;
|
44 | }
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | export interface ApplicationIntrospectionResult {
|
52 | state: State;
|
53 | appName: string;
|
54 | appDir: string;
|
55 | appId: string;
|
56 | pids: number[];
|
57 | startCount: number;
|
58 | restartCount: number;
|
59 | uptime: number;
|
60 | representation?: ApplicationRepresentation;
|
61 |
|
62 | complex?: ApplicationStructureRepresentation;
|
63 | structure?: ApplicationStructureRepresentation;
|
64 | stdoutLogPath?: string;
|
65 | }
|
66 |
|
67 | export type VersionsIntrospectionResult = typeof process.versions & {
|
68 | pandora: string;
|
69 | };
|
70 |
|
71 | export interface DaemonIntrospectionResult {
|
72 | versions: VersionsIntrospectionResult;
|
73 | cwd: string;
|
74 | pid: number;
|
75 | uptime: number;
|
76 | loadedGlobalConfigPaths: string[];
|
77 | loadedEndPoints: string[];
|
78 | loadedReporters: string[];
|
79 | }
|
80 |
|
81 | export interface Monitor {
|
82 | start();
|
83 | stop();
|
84 | }
|
85 |
|
86 |
|