-import { StorageType } from './Storage';
-import { ServerOptions as WSServerOptions } from 'ws';
+import { ListenOptions } from 'net';
+
import type { WorkerChoiceStrategy } from 'poolifier';
+import { ServerOptions as WSServerOptions } from 'ws';
+
+import { StorageType } from './Storage';
import { WorkerProcessType } from './Worker';
+export type ServerOptions = WSServerOptions & ListenOptions;
+
export enum SupervisionUrlDistribution {
ROUND_ROBIN = 'round-robin',
RANDOM = 'random',
export interface UIServerConfiguration {
enabled?: boolean;
- options?: WSServerOptions;
+ options?: ServerOptions;
}
export interface StorageConfiguration {
uri?: string;
}
+export interface WorkerConfiguration {
+ processType?: WorkerProcessType;
+ startDelay?: number;
+ elementsPerWorker?: number;
+ elementStartDelay?: number;
+ poolMinSize?: number;
+ poolMaxSize?: number;
+ poolStrategy?: WorkerChoiceStrategy;
+}
+
export default interface ConfigurationData {
supervisionUrls?: string | string[];
supervisionUrlDistribution?: SupervisionUrlDistribution;
stationTemplateUrls: StationTemplateUrl[];
uiServer?: UIServerConfiguration;
performanceStorage?: StorageConfiguration;
+ worker?: WorkerConfiguration;
autoReconnectMaxRetries?: number;
+ // deprecated
workerProcess?: WorkerProcessType;
+ // deprecated
workerStartDelay?: number;
+ // deprecated
elementStartDelay?: number;
+ // deprecated
workerPoolMinSize?: number;
+ // deprecated
workerPoolMaxSize?: number;
+ // deprecated
workerPoolStrategy?: WorkerChoiceStrategy;
+ // deprecated
chargingStationsPerWorker?: number;
logStatisticsInterval?: number;
logFormat?: string;