Refine UI server attributes scope and type
[e-mobility-charging-stations-simulator.git] / src / types / ConfigurationData.ts
CommitLineData
72f041bd 1import { StorageType } from './Storage';
18d3414a 2import { ServerOptions as WSServerOptions } from 'ws';
9efbac5b 3import type { WorkerChoiceStrategy } from 'poolifier';
a4624c96
JB
4import { WorkerProcessType } from './Worker';
5
2dcfe98e
JB
6export enum SupervisionUrlDistribution {
7 ROUND_ROBIN = 'round-robin',
8 RANDOM = 'random',
9 SEQUENTIAL = 'sequential',
10}
11
1f5df42a 12export interface StationTemplateUrl {
e118beaa
JB
13 file: string;
14 numberOfStations: number;
15}
16
675fa8e3 17export interface UIServerConfiguration {
6a49ad23 18 enabled?: boolean;
18d3414a 19 options?: WSServerOptions;
6a49ad23
JB
20}
21
72f041bd
JB
22export interface StorageConfiguration {
23 enabled?: boolean;
24 type?: StorageType;
1f5df42a 25 uri?: string;
72f041bd
JB
26}
27
e118beaa 28export default interface ConfigurationData {
2dcfe98e
JB
29 supervisionUrls?: string | string[];
30 supervisionUrlDistribution?: SupervisionUrlDistribution;
1f5df42a 31 stationTemplateUrls: StationTemplateUrl[];
675fa8e3 32 uiServer?: UIServerConfiguration;
72f041bd 33 performanceStorage?: StorageConfiguration;
e118beaa 34 autoReconnectMaxRetries?: number;
a4624c96 35 workerProcess?: WorkerProcessType;
322c9192 36 workerStartDelay?: number;
4bfd80fa 37 elementStartDelay?: number;
a4624c96 38 workerPoolMinSize?: number;
4fa59b8a 39 workerPoolMaxSize?: number;
9efbac5b 40 workerPoolStrategy?: WorkerChoiceStrategy;
5fdab605 41 chargingStationsPerWorker?: number;
72f041bd 42 logStatisticsInterval?: number;
e118beaa 43 logFormat?: string;
324fd4ee 44 logLevel?: string;
6bf6769e
JB
45 logRotate?: boolean;
46 logMaxFiles?: number;
e118beaa 47 logFile?: string;
7ec46a9a
JB
48 logErrorFile?: string;
49 logConsole?: boolean;
e118beaa 50}