Add a configuration section for the UI WS server
[e-mobility-charging-stations-simulator.git] / src / types / ConfigurationData.ts
CommitLineData
6a49ad23 1import { ServerOptions } from 'ws';
72f041bd 2import { StorageType } from './Storage';
9efbac5b 3import type { WorkerChoiceStrategy } from 'poolifier';
a4624c96
JB
4import { WorkerProcessType } from './Worker';
5
e118beaa
JB
6export interface StationTemplateURL {
7 file: string;
8 numberOfStations: number;
9}
10
6a49ad23
JB
11export interface UIWebSocketServerConfiguration {
12 enabled?: boolean;
13 options?: ServerOptions;
14}
15
72f041bd
JB
16export interface StorageConfiguration {
17 enabled?: boolean;
18 type?: StorageType;
19 URI?: string;
20}
21
e118beaa
JB
22export default interface ConfigurationData {
23 supervisionURLs?: string[];
24 stationTemplateURLs: StationTemplateURL[];
6a49ad23 25 uiWebSocketServer?: UIWebSocketServerConfiguration;
72f041bd 26 performanceStorage?: StorageConfiguration;
e118beaa 27 autoReconnectMaxRetries?: number;
524d9cb3 28 distributeStationsToTenantsEqually?: boolean;
a4624c96 29 workerProcess?: WorkerProcessType;
322c9192 30 workerStartDelay?: number;
a4624c96 31 workerPoolMinSize?: number;
4fa59b8a 32 workerPoolMaxSize?: number;
9efbac5b 33 workerPoolStrategy?: WorkerChoiceStrategy;
5fdab605 34 chargingStationsPerWorker?: number;
72f041bd 35 logStatisticsInterval?: number;
e118beaa
JB
36 logFormat?: string;
37 logLevel?: string;
6bf6769e
JB
38 logRotate?: boolean;
39 logMaxFiles?: number;
e118beaa 40 logFile?: string;
7ec46a9a
JB
41 logErrorFile?: string;
42 logConsole?: boolean;
e118beaa 43}