X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FConfigurationData.ts;h=9aed2f1fab3fae597ed6b45684aa481241439f31;hb=f161f950ceed9d688035f2a737e7062e635819b5;hp=d218e08a3067917daa1a321e11281eef9c4affbd;hpb=6a49ad23c5b2b65424a2374c4eeca027beb77e79;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ConfigurationData.ts b/src/types/ConfigurationData.ts index d218e08a..9aed2f1f 100644 --- a/src/types/ConfigurationData.ts +++ b/src/types/ConfigurationData.ts @@ -1,14 +1,23 @@ -import { ServerOptions } from 'ws'; +import { ListenOptions } from 'net'; import { StorageType } from './Storage'; +import { ServerOptions as WSServerOptions } from 'ws'; import type { WorkerChoiceStrategy } from 'poolifier'; import { WorkerProcessType } from './Worker'; -export interface StationTemplateURL { +export type ServerOptions = WSServerOptions & ListenOptions; + +export enum SupervisionUrlDistribution { + ROUND_ROBIN = 'round-robin', + RANDOM = 'random', + SEQUENTIAL = 'sequential', +} + +export interface StationTemplateUrl { file: string; numberOfStations: number; } -export interface UIWebSocketServerConfiguration { +export interface UIServerConfiguration { enabled?: boolean; options?: ServerOptions; } @@ -16,18 +25,19 @@ export interface UIWebSocketServerConfiguration { export interface StorageConfiguration { enabled?: boolean; type?: StorageType; - URI?: string; + uri?: string; } export default interface ConfigurationData { - supervisionURLs?: string[]; - stationTemplateURLs: StationTemplateURL[]; - uiWebSocketServer?: UIWebSocketServerConfiguration; + supervisionUrls?: string | string[]; + supervisionUrlDistribution?: SupervisionUrlDistribution; + stationTemplateUrls: StationTemplateUrl[]; + uiServer?: UIServerConfiguration; performanceStorage?: StorageConfiguration; autoReconnectMaxRetries?: number; - distributeStationsToTenantsEqually?: boolean; workerProcess?: WorkerProcessType; workerStartDelay?: number; + elementStartDelay?: number; workerPoolMinSize?: number; workerPoolMaxSize?: number; workerPoolStrategy?: WorkerChoiceStrategy;