1 import type { ListenOptions
} from
'node:net';
2 import type { ResourceLimits
} from
'node:worker_threads';
4 import type { WorkerChoiceStrategy
} from
'poolifier';
6 import type { StorageType
} from
'./Storage';
7 import type { ApplicationProtocol
, AuthenticationType
} from
'./UIProtocol';
8 import type { WorkerProcessType
} from
'../worker';
10 type ServerOptions
= ListenOptions
;
12 export enum ConfigurationSection
{
14 performanceStorage
= 'performanceStorage',
16 uiServer
= 'uiServer',
19 export enum SupervisionUrlDistribution
{
20 ROUND_ROBIN
= 'round-robin',
22 CHARGING_STATION_AFFINITY
= 'charging-station-affinity',
25 export interface StationTemplateUrl
{
27 numberOfStations
: number;
30 export interface LogConfiguration
{
34 statisticsInterval
?: number;
39 maxFiles
?: string | number;
40 maxSize
?: string | number;
43 export enum ApplicationProtocolVersion
{
48 export interface UIServerConfiguration
{
50 type?: ApplicationProtocol
;
51 version
?: ApplicationProtocolVersion
;
52 options
?: ServerOptions
;
55 type: AuthenticationType
;
61 export interface StorageConfiguration
{
67 export interface WorkerConfiguration
{
68 processType
?: WorkerProcessType
;
70 elementsPerWorker
?: number | 'auto' | 'single';
71 elementStartDelay
?: number;
74 resourceLimits
?: ResourceLimits
;
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;