UNPKG

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