Commit | Line | Data |
---|---|---|
b153c0fd | 1 | import { ListenOptions } from 'net'; |
72f041bd | 2 | import { StorageType } from './Storage'; |
18d3414a | 3 | import { ServerOptions as WSServerOptions } from 'ws'; |
9efbac5b | 4 | import type { WorkerChoiceStrategy } from 'poolifier'; |
a4624c96 JB |
5 | import { WorkerProcessType } from './Worker'; |
6 | ||
b153c0fd | 7 | export type ServerOptions = WSServerOptions & ListenOptions; |
66271092 | 8 | |
2dcfe98e JB |
9 | export enum SupervisionUrlDistribution { |
10 | ROUND_ROBIN = 'round-robin', | |
11 | RANDOM = 'random', | |
12 | SEQUENTIAL = 'sequential', | |
13 | } | |
14 | ||
1f5df42a | 15 | export interface StationTemplateUrl { |
e118beaa JB |
16 | file: string; |
17 | numberOfStations: number; | |
18 | } | |
19 | ||
675fa8e3 | 20 | export interface UIServerConfiguration { |
6a49ad23 | 21 | enabled?: boolean; |
66271092 | 22 | options?: ServerOptions; |
6a49ad23 JB |
23 | } |
24 | ||
72f041bd JB |
25 | export interface StorageConfiguration { |
26 | enabled?: boolean; | |
27 | type?: StorageType; | |
1f5df42a | 28 | uri?: string; |
72f041bd JB |
29 | } |
30 | ||
e118beaa | 31 | export default interface ConfigurationData { |
2dcfe98e JB |
32 | supervisionUrls?: string | string[]; |
33 | supervisionUrlDistribution?: SupervisionUrlDistribution; | |
1f5df42a | 34 | stationTemplateUrls: StationTemplateUrl[]; |
675fa8e3 | 35 | uiServer?: UIServerConfiguration; |
72f041bd | 36 | performanceStorage?: StorageConfiguration; |
e118beaa | 37 | autoReconnectMaxRetries?: number; |
a4624c96 | 38 | workerProcess?: WorkerProcessType; |
322c9192 | 39 | workerStartDelay?: number; |
4bfd80fa | 40 | elementStartDelay?: number; |
a4624c96 | 41 | workerPoolMinSize?: number; |
4fa59b8a | 42 | workerPoolMaxSize?: number; |
9efbac5b | 43 | workerPoolStrategy?: WorkerChoiceStrategy; |
5fdab605 | 44 | chargingStationsPerWorker?: number; |
72f041bd | 45 | logStatisticsInterval?: number; |
e118beaa | 46 | logFormat?: string; |
324fd4ee | 47 | logLevel?: string; |
6bf6769e JB |
48 | logRotate?: boolean; |
49 | logMaxFiles?: number; | |
e118beaa | 50 | logFile?: string; |
7ec46a9a JB |
51 | logErrorFile?: string; |
52 | logConsole?: boolean; | |
e118beaa | 53 | } |