X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2FConfigurationData.ts;h=56ee0354510cca07327b6a6ce48973f1a8ab9dcd;hb=2dcfe98ec940932372855643f996b87c27f4b7fa;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..56ee0354 100644 --- a/src/types/ConfigurationData.ts +++ b/src/types/ConfigurationData.ts @@ -2,8 +2,15 @@ import { ServerOptions } from 'ws'; import { StorageType } from './Storage'; import type { WorkerChoiceStrategy } from 'poolifier'; import { WorkerProcessType } from './Worker'; +import { level } from 'winston'; -export interface StationTemplateURL { +export enum SupervisionUrlDistribution { + ROUND_ROBIN = 'round-robin', + RANDOM = 'random', + SEQUENTIAL = 'sequential', +} + +export interface StationTemplateUrl { file: string; numberOfStations: number; } @@ -16,16 +23,16 @@ export interface UIWebSocketServerConfiguration { 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; workerPoolMinSize?: number; @@ -34,7 +41,7 @@ export default interface ConfigurationData { chargingStationsPerWorker?: number; logStatisticsInterval?: number; logFormat?: string; - logLevel?: string; + logLevel?: level; logRotate?: boolean; logMaxFiles?: number; logFile?: string;