1 | import { ServiceModule } from "../ServiceModule/ServiceModule";
|
2 | import { ServicesManager } from "../ServicesManager/ServicesManager";
|
3 | import { RunningStatus } from "../RunningStatus";
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | export declare class RegisteredService {
|
11 | |
12 |
|
13 |
|
14 | private readonly _manager;
|
15 | |
16 |
|
17 |
|
18 |
|
19 |
|
20 | private readonly _errorListener;
|
21 | |
22 |
|
23 |
|
24 |
|
25 |
|
26 | readonly service: ServiceModule;
|
27 | |
28 |
|
29 |
|
30 | readonly status: RunningStatus;
|
31 | private _status;
|
32 | constructor(service: ServiceModule, manager: ServicesManager);
|
33 | /**
|
34 | * 启动服务。成功返回void,失败返回Error。
|
35 | * 如果抛出异常则一定是该程序内部逻辑错误
|
36 | * 这个方法仅供内部使用。
|
37 | *
|
38 | * @returns {Promise<Error | void>}
|
39 | */
|
40 | _start(): Promise<Error | void>;
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 | _stop(): Promise<void>;
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | _healthCheck(): Promise<Error | void>;
|
55 | }
|