Commit | Line | Data |
---|---|---|
3f85aa2b | 1 | import type { ListenOptions } from 'node:net'; |
8114d10e | 2 | |
9efbac5b | 3 | import type { WorkerChoiceStrategy } from 'poolifier'; |
8114d10e | 4 | |
2896e06d | 5 | import type { ApplicationProtocol, AuthenticationType, StorageType } from './internal'; |
268a74bb | 6 | import type { WorkerProcessType } from '../worker'; |
a4624c96 | 7 | |
0ac97927 | 8 | type ServerOptions = ListenOptions; |
66271092 | 9 | |
2dcfe98e JB |
10 | export enum SupervisionUrlDistribution { |
11 | ROUND_ROBIN = 'round-robin', | |
12 | RANDOM = 'random', | |
c72f6634 | 13 | CHARGING_STATION_AFFINITY = 'charging-station-affinity', |
2dcfe98e JB |
14 | } |
15 | ||
83e00df1 | 16 | export type StationTemplateUrl = { |
e118beaa JB |
17 | file: string; |
18 | numberOfStations: number; | |
83e00df1 | 19 | }; |
e118beaa | 20 | |
83e00df1 | 21 | export type UIServerConfiguration = { |
6a49ad23 | 22 | enabled?: boolean; |
1f7fa4de | 23 | type?: ApplicationProtocol; |
66271092 | 24 | options?: ServerOptions; |
eb3abc4f JB |
25 | authentication?: { |
26 | enabled: boolean; | |
27 | type: AuthenticationType; | |
28 | username?: string; | |
29 | password?: string; | |
30 | }; | |
83e00df1 | 31 | }; |
6a49ad23 | 32 | |
83e00df1 | 33 | export type StorageConfiguration = { |
72f041bd JB |
34 | enabled?: boolean; |
35 | type?: StorageType; | |
1f5df42a | 36 | uri?: string; |
83e00df1 | 37 | }; |
72f041bd | 38 | |
83e00df1 | 39 | export type WorkerConfiguration = { |
cf2a5d9b JB |
40 | processType?: WorkerProcessType; |
41 | startDelay?: number; | |
42 | elementsPerWorker?: number; | |
43 | elementStartDelay?: number; | |
44 | poolMinSize?: number; | |
45 | poolMaxSize?: number; | |
46 | poolStrategy?: WorkerChoiceStrategy; | |
83e00df1 | 47 | }; |
cf2a5d9b | 48 | |
83e00df1 | 49 | export type ConfigurationData = { |
2dcfe98e JB |
50 | supervisionUrls?: string | string[]; |
51 | supervisionUrlDistribution?: SupervisionUrlDistribution; | |
1f5df42a | 52 | stationTemplateUrls: StationTemplateUrl[]; |
675fa8e3 | 53 | uiServer?: UIServerConfiguration; |
72f041bd | 54 | performanceStorage?: StorageConfiguration; |
cf2a5d9b | 55 | worker?: WorkerConfiguration; |
e118beaa | 56 | autoReconnectMaxRetries?: number; |
edd13439 | 57 | /** @deprecated Moved to worker configuration section. */ |
a4624c96 | 58 | workerProcess?: WorkerProcessType; |
edd13439 | 59 | /** @deprecated Moved to worker configuration section. */ |
322c9192 | 60 | workerStartDelay?: number; |
edd13439 | 61 | /** @deprecated Moved to worker configuration section. */ |
4bfd80fa | 62 | elementStartDelay?: number; |
edd13439 | 63 | /** @deprecated Moved to worker configuration section. */ |
a4624c96 | 64 | workerPoolMinSize?: number; |
edd13439 | 65 | /** @deprecated Moved to worker configuration section. */ |
4fa59b8a | 66 | workerPoolMaxSize?: number; |
edd13439 | 67 | /** @deprecated Moved to worker configuration section. */ |
9efbac5b | 68 | workerPoolStrategy?: WorkerChoiceStrategy; |
edd13439 | 69 | /** @deprecated Moved to worker configuration section. */ |
5fdab605 | 70 | chargingStationsPerWorker?: number; |
72f041bd | 71 | logStatisticsInterval?: number; |
e118beaa | 72 | logFormat?: string; |
324fd4ee | 73 | logLevel?: string; |
6bf6769e | 74 | logRotate?: boolean; |
9988696d JB |
75 | logMaxFiles?: number | string; |
76 | logMaxSize?: number | string; | |
e118beaa | 77 | logFile?: string; |
7ec46a9a JB |
78 | logErrorFile?: string; |
79 | logConsole?: boolean; | |
83e00df1 | 80 | }; |