1 import type { ListenOptions
} from
'node: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 type ServerOptions
= ListenOptions
;
11 export enum ConfigurationSection
{
13 performanceStorage
= 'performanceStorage',
15 uiServer
= 'uiServer',
18 export enum SupervisionUrlDistribution
{
19 ROUND_ROBIN
= 'round-robin',
21 CHARGING_STATION_AFFINITY
= 'charging-station-affinity',
24 export interface StationTemplateUrl
{
26 numberOfStations
: number;
29 export interface LogConfiguration
{
33 statisticsInterval
?: number;
38 maxFiles
?: string | number;
39 maxSize
?: string | number;
42 export interface UIServerConfiguration
{
44 type?: ApplicationProtocol
;
45 options
?: ServerOptions
;
48 type: AuthenticationType
;
54 export interface StorageConfiguration
{
60 export interface WorkerConfiguration
{
61 processType
?: WorkerProcessType
;
63 elementsPerWorker
?: number | 'auto';
64 elementStartDelay
?: number;
67 /** @deprecated Not publicly exposed to end users. */
68 poolStrategy
?: WorkerChoiceStrategy
;
71 export interface ConfigurationData
{
72 supervisionUrls
?: string | string[];
73 supervisionUrlDistribution
?: SupervisionUrlDistribution
;
74 stationTemplateUrls
: StationTemplateUrl
[];
75 log
?: LogConfiguration
;
76 worker
?: WorkerConfiguration
;
77 uiServer
?: UIServerConfiguration
;
78 performanceStorage
?: StorageConfiguration
;
79 autoReconnectMaxRetries
?: number;
80 /** @deprecated Moved to worker configuration section. */
81 workerProcess
?: WorkerProcessType
;
82 /** @deprecated Moved to worker configuration section. */
83 workerStartDelay
?: number;
84 /** @deprecated Moved to worker configuration section. */
85 elementStartDelay
?: number;
86 /** @deprecated Moved to worker configuration section. */
87 workerPoolMinSize
?: number;
88 /** @deprecated Moved to worker configuration section. */
89 workerPoolMaxSize
?: number;
90 /** @deprecated Moved to worker configuration section. */
91 workerPoolStrategy
?: WorkerChoiceStrategy
;
92 /** @deprecated Moved to worker configuration section. */
93 chargingStationsPerWorker
?: number;
94 /** @deprecated Moved to log configuration section. */
95 logStatisticsInterval
?: number;
96 /** @deprecated Moved to log configuration section. */
98 /** @deprecated Moved to log configuration section. */
100 /** @deprecated Moved to log configuration section. */
102 /** @deprecated Moved to log configuration section. */
104 /** @deprecated Moved to log configuration section. */
106 /** @deprecated Moved to log configuration section. */
107 logMaxFiles
?: number | string;
108 /** @deprecated Moved to log configuration section. */
109 logMaxSize
?: number | string;
110 /** @deprecated Moved to log configuration section. */
112 /** @deprecated Moved to log configuration section. */
113 logErrorFile
?: string;