1 import type { ListenOptions
} from
'net';
3 import type { WorkerChoiceStrategy
} from
'poolifier';
4 import type { ServerOptions
as WSServerOptions
} from
'ws';
6 import type { StorageType
} from
'./Storage';
7 import type { ApplicationProtocol
} from
'./UIProtocol';
8 import type { WorkerProcessType
} from
'./Worker';
10 export type ServerOptions
= WSServerOptions
& ListenOptions
;
12 export enum SupervisionUrlDistribution
{
13 ROUND_ROBIN
= 'round-robin',
15 SEQUENTIAL
= 'sequential',
18 export interface StationTemplateUrl
{
20 numberOfStations
: number;
23 export interface UIServerConfiguration
{
25 type?: ApplicationProtocol
;
26 options
?: ServerOptions
;
29 export interface StorageConfiguration
{
35 export interface WorkerConfiguration
{
36 processType
?: WorkerProcessType
;
38 elementsPerWorker
?: number;
39 elementStartDelay
?: number;
42 poolStrategy
?: WorkerChoiceStrategy
;
45 export default interface ConfigurationData
{
46 supervisionUrls
?: string | string[];
47 supervisionUrlDistribution
?: SupervisionUrlDistribution
;
48 stationTemplateUrls
: StationTemplateUrl
[];
49 uiServer
?: UIServerConfiguration
;
50 performanceStorage
?: StorageConfiguration
;
51 worker
?: WorkerConfiguration
;
52 autoReconnectMaxRetries
?: number;
54 workerProcess
?: WorkerProcessType
;
56 workerStartDelay
?: number;
58 elementStartDelay
?: number;
60 workerPoolMinSize
?: number;
62 workerPoolMaxSize
?: number;
64 workerPoolStrategy
?: WorkerChoiceStrategy
;
66 chargingStationsPerWorker
?: number;
67 logStatisticsInterval
?: number;
73 logErrorFile
?: string;