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 enum ApplicationProtocolVersion
{
47 export interface UIServerConfiguration
{
49 type?: ApplicationProtocol
;
50 version
?: ApplicationProtocolVersion
;
51 options
?: ServerOptions
;
54 type: AuthenticationType
;
60 export interface StorageConfiguration
{
66 export interface WorkerConfiguration
{
67 processType
?: WorkerProcessType
;
69 elementsPerWorker
?: number | 'auto';
70 elementStartDelay
?: number;
73 /** @deprecated Not publicly exposed to end users. */
74 poolStrategy
?: WorkerChoiceStrategy
;
77 export interface ConfigurationData
{
78 supervisionUrls
?: string | string[];
79 supervisionUrlDistribution
?: SupervisionUrlDistribution
;
80 stationTemplateUrls
: StationTemplateUrl
[];
81 log
?: LogConfiguration
;
82 worker
?: WorkerConfiguration
;
83 uiServer
?: UIServerConfiguration
;
84 performanceStorage
?: StorageConfiguration
;
85 /** @deprecated Moved to charging station template */
86 autoReconnectMaxRetries
?: number;
87 /** @deprecated Moved to worker configuration section. */
88 workerProcess
?: WorkerProcessType
;
89 /** @deprecated Moved to worker configuration section. */
90 workerStartDelay
?: number;
91 /** @deprecated Moved to worker configuration section. */
92 elementStartDelay
?: number;
93 /** @deprecated Moved to worker configuration section. */
94 workerPoolMinSize
?: number;
95 /** @deprecated Moved to worker configuration section. */
96 workerPoolMaxSize
?: number;
97 /** @deprecated Moved to worker configuration section. */
98 workerPoolStrategy
?: WorkerChoiceStrategy
;
99 /** @deprecated Moved to worker configuration section. */
100 chargingStationsPerWorker
?: number;
101 /** @deprecated Moved to log configuration section. */
102 logStatisticsInterval
?: number;
103 /** @deprecated Moved to log configuration section. */
104 logEnabled
?: boolean;
105 /** @deprecated Moved to log configuration section. */
106 logConsole
?: boolean;
107 /** @deprecated Moved to log configuration section. */
109 /** @deprecated Moved to log configuration section. */
111 /** @deprecated Moved to log configuration section. */
113 /** @deprecated Moved to log configuration section. */
114 logMaxFiles
?: number | string;
115 /** @deprecated Moved to log configuration section. */
116 logMaxSize
?: number | string;
117 /** @deprecated Moved to log configuration section. */
119 /** @deprecated Moved to log configuration section. */
120 logErrorFile
?: string;