Commit | Line | Data |
---|---|---|
6a49ad23 | 1 | import { ServerOptions } from 'ws'; |
72f041bd | 2 | import { StorageType } from './Storage'; |
9efbac5b | 3 | import type { WorkerChoiceStrategy } from 'poolifier'; |
a4624c96 | 4 | import { WorkerProcessType } from './Worker'; |
b35c4a05 | 5 | import { level } from 'winston'; |
a4624c96 | 6 | |
2dcfe98e JB |
7 | export enum SupervisionUrlDistribution { |
8 | ROUND_ROBIN = 'round-robin', | |
9 | RANDOM = 'random', | |
10 | SEQUENTIAL = 'sequential', | |
11 | } | |
12 | ||
1f5df42a | 13 | export interface StationTemplateUrl { |
e118beaa JB |
14 | file: string; |
15 | numberOfStations: number; | |
16 | } | |
17 | ||
6a49ad23 JB |
18 | export interface UIWebSocketServerConfiguration { |
19 | enabled?: boolean; | |
20 | options?: ServerOptions; | |
21 | } | |
22 | ||
72f041bd JB |
23 | export interface StorageConfiguration { |
24 | enabled?: boolean; | |
25 | type?: StorageType; | |
1f5df42a | 26 | uri?: string; |
72f041bd JB |
27 | } |
28 | ||
e118beaa | 29 | export default interface ConfigurationData { |
2dcfe98e JB |
30 | supervisionUrls?: string | string[]; |
31 | supervisionUrlDistribution?: SupervisionUrlDistribution; | |
1f5df42a | 32 | stationTemplateUrls: StationTemplateUrl[]; |
6a49ad23 | 33 | uiWebSocketServer?: UIWebSocketServerConfiguration; |
72f041bd | 34 | performanceStorage?: StorageConfiguration; |
e118beaa | 35 | autoReconnectMaxRetries?: number; |
a4624c96 | 36 | workerProcess?: WorkerProcessType; |
322c9192 | 37 | workerStartDelay?: number; |
a4624c96 | 38 | workerPoolMinSize?: number; |
4fa59b8a | 39 | workerPoolMaxSize?: number; |
9efbac5b | 40 | workerPoolStrategy?: WorkerChoiceStrategy; |
5fdab605 | 41 | chargingStationsPerWorker?: number; |
72f041bd | 42 | logStatisticsInterval?: number; |
e118beaa | 43 | logFormat?: string; |
b35c4a05 | 44 | logLevel?: level; |
6bf6769e JB |
45 | logRotate?: boolean; |
46 | logMaxFiles?: number; | |
e118beaa | 47 | logFile?: string; |
7ec46a9a JB |
48 | logErrorFile?: string; |
49 | logConsole?: boolean; | |
e118beaa | 50 | } |