1 import type { ListenOptions
} from
'net';
3 import type { WorkerChoiceStrategy
} from
'poolifier';
5 import type { StorageType
} from
'./Storage';
6 import type { ApplicationProtocol
, AuthenticationType
} from
'./UIProtocol';
7 import type { WorkerProcessType
} from
'./Worker';
9 export type ServerOptions
= ListenOptions
;
11 export enum SupervisionUrlDistribution
{
12 ROUND_ROBIN
= 'round-robin',
14 CHARGING_STATION_AFFINITY
= 'charging-station-affinity',
17 export type StationTemplateUrl
= {
19 numberOfStations
: number;
22 export type UIServerConfiguration
= {
24 type?: ApplicationProtocol
;
25 options
?: ServerOptions
;
28 type: AuthenticationType
;
34 export type StorageConfiguration
= {
40 export type WorkerConfiguration
= {
41 processType
?: WorkerProcessType
;
43 elementsPerWorker
?: number;
44 elementStartDelay
?: number;
47 poolStrategy
?: WorkerChoiceStrategy
;
50 export type ConfigurationData
= {
51 supervisionUrls
?: string | string[];
52 supervisionUrlDistribution
?: SupervisionUrlDistribution
;
53 stationTemplateUrls
: StationTemplateUrl
[];
54 uiServer
?: UIServerConfiguration
;
55 performanceStorage
?: StorageConfiguration
;
56 worker
?: WorkerConfiguration
;
57 autoReconnectMaxRetries
?: number;
59 workerProcess
?: WorkerProcessType
;
61 workerStartDelay
?: number;
63 elementStartDelay
?: number;
65 workerPoolMinSize
?: number;
67 workerPoolMaxSize
?: number;
69 workerPoolStrategy
?: WorkerChoiceStrategy
;
71 chargingStationsPerWorker
?: number;
72 logStatisticsInterval
?: number;
78 logErrorFile
?: string;