X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FConfigurationData.ts;h=94e65ed55d93f90c37fe361376bf96e5162e5b0b;hb=43bb4cd9ccb69bbf6b22fc6d8b58c79792a1d865;hp=1a2dd165113188d52690eafb4ed5d4f64da553d5;hpb=72f041bd50fc25ca5d233565cbc0ea836220ec0f;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ConfigurationData.ts b/src/types/ConfigurationData.ts index 1a2dd165..94e65ed5 100644 --- a/src/types/ConfigurationData.ts +++ b/src/types/ConfigurationData.ts @@ -1,26 +1,40 @@ +import { ServerOptions } from 'ws'; import { StorageType } from './Storage'; import type { WorkerChoiceStrategy } from 'poolifier'; import { WorkerProcessType } from './Worker'; -export interface StationTemplateURL { +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; + uri?: string; } export default interface ConfigurationData { - supervisionURLs?: string[]; - stationTemplateURLs: StationTemplateURL[]; + supervisionUrls?: string | string[]; + supervisionUrlDistribution?: SupervisionUrlDistribution; + stationTemplateUrls: StationTemplateUrl[]; + uiWebSocketServer?: UIWebSocketServerConfiguration; performanceStorage?: StorageConfiguration; autoReconnectMaxRetries?: number; - distributeStationsToTenantsEqually?: boolean; workerProcess?: WorkerProcessType; workerStartDelay?: number; + elementStartDelay?: number; workerPoolMinSize?: number; workerPoolMaxSize?: number; workerPoolStrategy?: WorkerChoiceStrategy;