1 import type { ListenOptions
} from
'node:net'
2 import type { ResourceLimits
} from
'node:worker_threads'
4 import type { WorkerChoiceStrategy
} from
'poolifier'
6 import type { WorkerProcessType
} from
'../worker/index.js'
7 import type { StorageType
} from
'./Storage.js'
8 import type { ApplicationProtocol
, AuthenticationType
} from
'./UIProtocol.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
28 provisionedNumberOfStations
?: number
31 export interface LogConfiguration
{
35 statisticsInterval
?: number
40 maxFiles
?: string | number
41 maxSize
?: string | number
44 export enum ApplicationProtocolVersion
{
49 export interface UIServerConfiguration
{
51 type?: ApplicationProtocol
52 version
?: ApplicationProtocolVersion
53 options
?: ServerOptions
56 type: AuthenticationType
62 export interface StorageConfiguration
{
68 export type ElementsPerWorkerType
= number | 'auto' | 'all'
70 export interface WorkerConfiguration
{
71 processType
?: WorkerProcessType
73 elementsPerWorker
?: ElementsPerWorkerType
74 /** @deprecated Use `elementAddDelay` instead. */
75 elementStartDelay
?: number
76 elementAddDelay
?: number
79 resourceLimits
?: ResourceLimits
82 export interface ConfigurationData
{
83 supervisionUrls
?: string | string[]
84 supervisionUrlDistribution
?: SupervisionUrlDistribution
85 stationTemplateUrls
: StationTemplateUrl
[]
86 log
?: LogConfiguration
87 worker
?: WorkerConfiguration
88 uiServer
?: UIServerConfiguration
89 performanceStorage
?: StorageConfiguration
90 /** @deprecated Moved to charging station template. */
91 autoReconnectMaxRetries
?: number
92 /** @deprecated Moved to worker configuration section. */
93 workerProcess
?: WorkerProcessType
94 /** @deprecated Moved to worker configuration section. */
95 workerStartDelay
?: number
96 /** @deprecated Moved to worker configuration section. */
97 elementAddDelay
?: number
98 /** @deprecated Moved to worker configuration section. */
99 workerPoolMinSize
?: number
100 /** @deprecated Moved to worker configuration section. */
101 workerPoolMaxSize
?: number
102 /** @deprecated Moved to worker configuration section. */
103 workerPoolStrategy
?: WorkerChoiceStrategy
104 /** @deprecated Moved to worker configuration section. */
105 chargingStationsPerWorker
?: number
106 /** @deprecated Moved to log configuration section. */
107 logStatisticsInterval
?: number
108 /** @deprecated Moved to log configuration section. */
110 /** @deprecated Moved to log configuration section. */
112 /** @deprecated Moved to log configuration section. */
114 /** @deprecated Moved to log configuration section. */
116 /** @deprecated Moved to log configuration section. */
118 /** @deprecated Moved to log configuration section. */
119 logMaxFiles
?: number | string
120 /** @deprecated Moved to log configuration section. */
121 logMaxSize
?: number | string
122 /** @deprecated Moved to log configuration section. */
124 /** @deprecated Moved to log configuration section. */
125 logErrorFile
?: string