51eb045a19d717b7ce3e4cf1d5015a42256dc539
[e-mobility-charging-stations-simulator.git] / src / types / ConfigurationData.ts
1 import { ServerOptions } from 'ws';
2 import { StorageType } from './Storage';
3 import type { WorkerChoiceStrategy } from 'poolifier';
4 import { WorkerProcessType } from './Worker';
5 import { level } from 'winston';
6
7 export interface StationTemplateUrl {
8 file: string;
9 numberOfStations: number;
10 }
11
12 export interface UIWebSocketServerConfiguration {
13 enabled?: boolean;
14 options?: ServerOptions;
15 }
16
17 export interface StorageConfiguration {
18 enabled?: boolean;
19 type?: StorageType;
20 uri?: string;
21 }
22
23 export default interface ConfigurationData {
24 supervisionUrls?: string[];
25 stationTemplateUrls: StationTemplateUrl[];
26 uiWebSocketServer?: UIWebSocketServerConfiguration;
27 performanceStorage?: StorageConfiguration;
28 autoReconnectMaxRetries?: number;
29 distributeStationsToTenantsEqually?: boolean;
30 workerProcess?: WorkerProcessType;
31 workerStartDelay?: number;
32 workerPoolMinSize?: number;
33 workerPoolMaxSize?: number;
34 workerPoolStrategy?: WorkerChoiceStrategy;
35 chargingStationsPerWorker?: number;
36 logStatisticsInterval?: number;
37 logFormat?: string;
38 logLevel?: level;
39 logRotate?: boolean;
40 logMaxFiles?: number;
41 logFile?: string;
42 logErrorFile?: string;
43 logConsole?: boolean;
44 }