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.js'
7 import type { ApplicationProtocol
, AuthenticationType
} from
'./UIProtocol.js'
8 import type { WorkerProcessType
} from
'../worker/index.js'
10 type ServerOptions
= ListenOptions
12 export enum ConfigurationSection
{
14 performanceStorage
= 'performanceStorage',
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 type ElementsPerWorkerType
= number | 'auto' | 'all'
69 export interface WorkerConfiguration
{
70 processType
?: WorkerProcessType
72 elementsPerWorker
?: ElementsPerWorkerType
73 elementStartDelay
?: number
76 resourceLimits
?: ResourceLimits
79 export interface ConfigurationData
{
80 supervisionUrls
?: string | string[]
81 supervisionUrlDistribution
?: SupervisionUrlDistribution
82 stationTemplateUrls
: StationTemplateUrl
[]
83 log
?: LogConfiguration
84 worker
?: WorkerConfiguration
85 uiServer
?: UIServerConfiguration
86 performanceStorage
?: StorageConfiguration
87 /** @deprecated Moved to charging station template */
88 autoReconnectMaxRetries
?: number
89 /** @deprecated Moved to worker configuration section. */
90 workerProcess
?: WorkerProcessType
91 /** @deprecated Moved to worker configuration section. */
92 workerStartDelay
?: number
93 /** @deprecated Moved to worker configuration section. */
94 elementStartDelay
?: number
95 /** @deprecated Moved to worker configuration section. */
96 workerPoolMinSize
?: number
97 /** @deprecated Moved to worker configuration section. */
98 workerPoolMaxSize
?: number
99 /** @deprecated Moved to worker configuration section. */
100 workerPoolStrategy
?: WorkerChoiceStrategy
101 /** @deprecated Moved to worker configuration section. */
102 chargingStationsPerWorker
?: number
103 /** @deprecated Moved to log configuration section. */
104 logStatisticsInterval
?: number
105 /** @deprecated Moved to log configuration section. */
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. */
115 /** @deprecated Moved to log configuration section. */
116 logMaxFiles
?: number | string
117 /** @deprecated Moved to log configuration section. */
118 logMaxSize
?: number | string
119 /** @deprecated Moved to log configuration section. */
121 /** @deprecated Moved to log configuration section. */
122 logErrorFile
?: string