Reorganize more sensibly types definition
[e-mobility-charging-stations-simulator.git] / src / types / ConfigurationData.ts
index bf4420ec5f56b0b3f31718d69df0408dfefd0e2a..10f2565a81f52a5b874c3331771cdd110c83a7f9 100644 (file)
@@ -1,17 +1,38 @@
-export interface StationTemplateURL {
+import { ServerOptions } from 'ws';
+import { StorageType } from './Storage';
+import type { WorkerChoiceStrategy } from 'poolifier';
+import { WorkerProcessType } from './Worker';
+
+export interface StationTemplateUrl {
   file: string;
   numberOfStations: number;
 }
 
+export interface UIWebSocketServerConfiguration {
+  enabled?: boolean;
+  options?: ServerOptions;
+}
+
+export interface StorageConfiguration {
+  enabled?: boolean;
+  type?: StorageType;
+  uri?: string;
+}
+
 export default interface ConfigurationData {
-  supervisionURLs?: string[];
-  stationTemplateURLs: StationTemplateURL[];
-  statisticsDisplayInterval?: number;
-  autoReconnectTimeout?: number;
+  supervisionUrls?: string[];
+  stationTemplateUrls: StationTemplateUrl[];
+  uiWebSocketServer?: UIWebSocketServerConfiguration;
+  performanceStorage?: StorageConfiguration;
   autoReconnectMaxRetries?: number;
   distributeStationsToTenantsEqually?: boolean;
-  useWorkerPool?: boolean;
-  workerPoolSize?: number;
+  workerProcess?: WorkerProcessType;
+  workerStartDelay?: number;
+  workerPoolMinSize?: number;
+  workerPoolMaxSize?: number;
+  workerPoolStrategy?: WorkerChoiceStrategy;
+  chargingStationsPerWorker?: number;
+  logStatisticsInterval?: number;
   logFormat?: string;
   logLevel?: string;
   logRotate?: boolean;