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 autoReconnectMaxRetries
?: number;
86 /** @deprecated Moved to worker configuration section. */
87 workerProcess
?: WorkerProcessType
;
88 /** @deprecated Moved to worker configuration section. */
89 workerStartDelay
?: number;
90 /** @deprecated Moved to worker configuration section. */
91 elementStartDelay
?: number;
92 /** @deprecated Moved to worker configuration section. */
93 workerPoolMinSize
?: number;
94 /** @deprecated Moved to worker configuration section. */
95 workerPoolMaxSize
?: number;
96 /** @deprecated Moved to worker configuration section. */
97 workerPoolStrategy
?: WorkerChoiceStrategy
;
98 /** @deprecated Moved to worker configuration section. */
99 chargingStationsPerWorker
?: number;
100 /** @deprecated Moved to log configuration section. */
101 logStatisticsInterval
?: number;
102 /** @deprecated Moved to log configuration section. */
103 logEnabled
?: boolean;
104 /** @deprecated Moved to log configuration section. */
105 logConsole
?: boolean;
106 /** @deprecated Moved to log configuration section. */
108 /** @deprecated Moved to log configuration section. */
110 /** @deprecated Moved to log configuration section. */
112 /** @deprecated Moved to log configuration section. */
113 logMaxFiles
?: number | string;
114 /** @deprecated Moved to log configuration section. */
115 logMaxSize
?: number | string;
116 /** @deprecated Moved to log configuration section. */
118 /** @deprecated Moved to log configuration section. */
119 logErrorFile
?: string;