Commit | Line | Data |
---|---|---|
3f85aa2b | 1 | import type { ListenOptions } from 'node:net'; |
8114d10e | 2 | |
9efbac5b | 3 | import type { WorkerChoiceStrategy } from 'poolifier'; |
8114d10e | 4 | |
69074173 JB |
5 | import type { StorageType } from './Storage'; |
6 | import type { ApplicationProtocol, AuthenticationType } from './UIProtocol'; | |
268a74bb | 7 | import type { WorkerProcessType } from '../worker'; |
a4624c96 | 8 | |
0ac97927 | 9 | type ServerOptions = ListenOptions; |
66271092 | 10 | |
2dcfe98e JB |
11 | export enum SupervisionUrlDistribution { |
12 | ROUND_ROBIN = 'round-robin', | |
13 | RANDOM = 'random', | |
c72f6634 | 14 | CHARGING_STATION_AFFINITY = 'charging-station-affinity', |
2dcfe98e JB |
15 | } |
16 | ||
e1d9a0f4 | 17 | export interface StationTemplateUrl { |
e118beaa JB |
18 | file: string; |
19 | numberOfStations: number; | |
e1d9a0f4 | 20 | } |
e118beaa | 21 | |
e1d9a0f4 | 22 | export interface LogConfiguration { |
3d48c1c1 JB |
23 | enabled?: boolean; |
24 | file?: string; | |
25 | errorFile?: string; | |
26 | statisticsInterval?: number; | |
27 | level?: string; | |
28 | console?: boolean; | |
29 | format?: string; | |
30 | rotate?: boolean; | |
31 | maxFiles?: string | number; | |
32 | maxSize?: string | number; | |
e1d9a0f4 | 33 | } |
3d48c1c1 | 34 | |
e1d9a0f4 | 35 | export interface UIServerConfiguration { |
6a49ad23 | 36 | enabled?: boolean; |
1f7fa4de | 37 | type?: ApplicationProtocol; |
66271092 | 38 | options?: ServerOptions; |
eb3abc4f JB |
39 | authentication?: { |
40 | enabled: boolean; | |
41 | type: AuthenticationType; | |
42 | username?: string; | |
43 | password?: string; | |
44 | }; | |
e1d9a0f4 | 45 | } |
6a49ad23 | 46 | |
e1d9a0f4 | 47 | export interface StorageConfiguration { |
72f041bd JB |
48 | enabled?: boolean; |
49 | type?: StorageType; | |
1f5df42a | 50 | uri?: string; |
e1d9a0f4 | 51 | } |
72f041bd | 52 | |
e1d9a0f4 | 53 | export interface WorkerConfiguration { |
cf2a5d9b JB |
54 | processType?: WorkerProcessType; |
55 | startDelay?: number; | |
8603c1ca | 56 | elementsPerWorker?: number | 'auto'; |
cf2a5d9b JB |
57 | elementStartDelay?: number; |
58 | poolMinSize?: number; | |
59 | poolMaxSize?: number; | |
eda9c451 | 60 | /** @deprecated Not publicly exposed to end users. */ |
cf2a5d9b | 61 | poolStrategy?: WorkerChoiceStrategy; |
e1d9a0f4 | 62 | } |
cf2a5d9b | 63 | |
e1d9a0f4 | 64 | export interface ConfigurationData { |
2dcfe98e JB |
65 | supervisionUrls?: string | string[]; |
66 | supervisionUrlDistribution?: SupervisionUrlDistribution; | |
1f5df42a | 67 | stationTemplateUrls: StationTemplateUrl[]; |
3d48c1c1 JB |
68 | log?: LogConfiguration; |
69 | worker?: WorkerConfiguration; | |
675fa8e3 | 70 | uiServer?: UIServerConfiguration; |
72f041bd | 71 | performanceStorage?: StorageConfiguration; |
e118beaa | 72 | autoReconnectMaxRetries?: number; |
edd13439 | 73 | /** @deprecated Moved to worker configuration section. */ |
a4624c96 | 74 | workerProcess?: WorkerProcessType; |
edd13439 | 75 | /** @deprecated Moved to worker configuration section. */ |
322c9192 | 76 | workerStartDelay?: number; |
edd13439 | 77 | /** @deprecated Moved to worker configuration section. */ |
4bfd80fa | 78 | elementStartDelay?: number; |
edd13439 | 79 | /** @deprecated Moved to worker configuration section. */ |
a4624c96 | 80 | workerPoolMinSize?: number; |
edd13439 | 81 | /** @deprecated Moved to worker configuration section. */ |
4fa59b8a | 82 | workerPoolMaxSize?: number; |
edd13439 | 83 | /** @deprecated Moved to worker configuration section. */ |
9efbac5b | 84 | workerPoolStrategy?: WorkerChoiceStrategy; |
edd13439 | 85 | /** @deprecated Moved to worker configuration section. */ |
5fdab605 | 86 | chargingStationsPerWorker?: number; |
3d48c1c1 | 87 | /** @deprecated Moved to log configuration section. */ |
72f041bd | 88 | logStatisticsInterval?: number; |
3d48c1c1 | 89 | /** @deprecated Moved to log configuration section. */ |
ae389044 | 90 | logEnabled?: boolean; |
3d48c1c1 | 91 | /** @deprecated Moved to log configuration section. */ |
ae389044 | 92 | logConsole?: boolean; |
3d48c1c1 | 93 | /** @deprecated Moved to log configuration section. */ |
e118beaa | 94 | logFormat?: string; |
3d48c1c1 | 95 | /** @deprecated Moved to log configuration section. */ |
324fd4ee | 96 | logLevel?: string; |
3d48c1c1 | 97 | /** @deprecated Moved to log configuration section. */ |
6bf6769e | 98 | logRotate?: boolean; |
3d48c1c1 | 99 | /** @deprecated Moved to log configuration section. */ |
9988696d | 100 | logMaxFiles?: number | string; |
3d48c1c1 | 101 | /** @deprecated Moved to log configuration section. */ |
9988696d | 102 | logMaxSize?: number | string; |
3d48c1c1 | 103 | /** @deprecated Moved to log configuration section. */ |
e118beaa | 104 | logFile?: string; |
3d48c1c1 | 105 | /** @deprecated Moved to log configuration section. */ |
7ec46a9a | 106 | logErrorFile?: string; |
e1d9a0f4 | 107 | } |