X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FConfigurationData.ts;h=94e65ed55d93f90c37fe361376bf96e5162e5b0b;hb=43bb4cd9ccb69bbf6b22fc6d8b58c79792a1d865;hp=2c15a6f50479a545d92fa2a3ab9ee8fd3a6e8c62;hpb=4fa59b8a2888956b1a74b976b47ce732970d641e;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ConfigurationData.ts b/src/types/ConfigurationData.ts index 2c15a6f5..94e65ed5 100644 --- a/src/types/ConfigurationData.ts +++ b/src/types/ConfigurationData.ts @@ -1,18 +1,45 @@ -export interface StationTemplateURL { +import { ServerOptions } from 'ws'; +import { StorageType } from './Storage'; +import type { WorkerChoiceStrategy } from 'poolifier'; +import { WorkerProcessType } from './Worker'; + +export enum SupervisionUrlDistribution { + ROUND_ROBIN = 'round-robin', + RANDOM = 'random', + SEQUENTIAL = 'sequential', +} + +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; - connectionTimeout?: number; + supervisionUrls?: string | string[]; + supervisionUrlDistribution?: SupervisionUrlDistribution; + stationTemplateUrls: StationTemplateUrl[]; + uiWebSocketServer?: UIWebSocketServerConfiguration; + performanceStorage?: StorageConfiguration; autoReconnectMaxRetries?: number; - distributeStationsToTenantsEqually?: boolean; - useWorkerPool?: boolean; + workerProcess?: WorkerProcessType; + workerStartDelay?: number; + elementStartDelay?: number; + workerPoolMinSize?: number; workerPoolMaxSize?: number; + workerPoolStrategy?: WorkerChoiceStrategy; chargingStationsPerWorker?: number; + logStatisticsInterval?: number; logFormat?: string; logLevel?: string; logRotate?: boolean;