repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor(simulator): explicitly export needed types only
[e-mobility-charging-stations-simulator.git]
/
src
/
types
/
ConfigurationData.ts
diff --git
a/src/types/ConfigurationData.ts
b/src/types/ConfigurationData.ts
index e549368138e2c4d0dfbce04eceea9f08ab9db28c..5a6853d22fd1853f714df96b06ad270d57d58c04 100644
(file)
--- a/
src/types/ConfigurationData.ts
+++ b/
src/types/ConfigurationData.ts
@@
-1,36
+1,42
@@
-import
{ ListenOptions } from '
net';
+import
type { ListenOptions } from 'node:
net';
import type { WorkerChoiceStrategy } from 'poolifier';
import type { WorkerChoiceStrategy } from 'poolifier';
-import { ServerOptions as WSServerOptions } from 'ws';
-import
{ StorageType } from './Storage
';
-import
{ WorkerProcessType } from './W
orker';
+import
type { ApplicationProtocol, AuthenticationType, StorageType } from './internal
';
+import
type { WorkerProcessType } from '../w
orker';
-
export type ServerOptions = WSServerOptions &
ListenOptions;
+
type ServerOptions =
ListenOptions;
export enum SupervisionUrlDistribution {
ROUND_ROBIN = 'round-robin',
RANDOM = 'random',
export enum SupervisionUrlDistribution {
ROUND_ROBIN = 'round-robin',
RANDOM = 'random',
-
SEQUENTIAL = 'sequential
',
+
CHARGING_STATION_AFFINITY = 'charging-station-affinity
',
}
}
-export
interface StationTemplateUrl
{
+export
type StationTemplateUrl =
{
file: string;
numberOfStations: number;
file: string;
numberOfStations: number;
-}
+}
;
-export
interface UIServerConfiguration
{
+export
type UIServerConfiguration =
{
enabled?: boolean;
enabled?: boolean;
+ type?: ApplicationProtocol;
options?: ServerOptions;
options?: ServerOptions;
-}
+ authentication?: {
+ enabled: boolean;
+ type: AuthenticationType;
+ username?: string;
+ password?: string;
+ };
+};
-export
interface StorageConfiguration
{
+export
type StorageConfiguration =
{
enabled?: boolean;
type?: StorageType;
uri?: string;
enabled?: boolean;
type?: StorageType;
uri?: string;
-}
+}
;
-export
interface WorkerConfiguration
{
+export
type WorkerConfiguration =
{
processType?: WorkerProcessType;
startDelay?: number;
elementsPerWorker?: number;
processType?: WorkerProcessType;
startDelay?: number;
elementsPerWorker?: number;
@@
-38,9
+44,9
@@
export interface WorkerConfiguration {
poolMinSize?: number;
poolMaxSize?: number;
poolStrategy?: WorkerChoiceStrategy;
poolMinSize?: number;
poolMaxSize?: number;
poolStrategy?: WorkerChoiceStrategy;
-}
+}
;
-export
default interface ConfigurationData
{
+export
type ConfigurationData =
{
supervisionUrls?: string | string[];
supervisionUrlDistribution?: SupervisionUrlDistribution;
stationTemplateUrls: StationTemplateUrl[];
supervisionUrls?: string | string[];
supervisionUrlDistribution?: SupervisionUrlDistribution;
stationTemplateUrls: StationTemplateUrl[];
@@
-48,26
+54,27
@@
export default interface ConfigurationData {
performanceStorage?: StorageConfiguration;
worker?: WorkerConfiguration;
autoReconnectMaxRetries?: number;
performanceStorage?: StorageConfiguration;
worker?: WorkerConfiguration;
autoReconnectMaxRetries?: number;
- /
/ deprecated
+ /
** @deprecated Moved to worker configuration section. */
workerProcess?: WorkerProcessType;
workerProcess?: WorkerProcessType;
- /
/ deprecated
+ /
** @deprecated Moved to worker configuration section. */
workerStartDelay?: number;
workerStartDelay?: number;
- /
/ deprecated
+ /
** @deprecated Moved to worker configuration section. */
elementStartDelay?: number;
elementStartDelay?: number;
- /
/ deprecated
+ /
** @deprecated Moved to worker configuration section. */
workerPoolMinSize?: number;
workerPoolMinSize?: number;
- /
/ deprecated
+ /
** @deprecated Moved to worker configuration section. */
workerPoolMaxSize?: number;
workerPoolMaxSize?: number;
- /
/ deprecated
+ /
** @deprecated Moved to worker configuration section. */
workerPoolStrategy?: WorkerChoiceStrategy;
workerPoolStrategy?: WorkerChoiceStrategy;
- /
/ deprecated
+ /
** @deprecated Moved to worker configuration section. */
chargingStationsPerWorker?: number;
logStatisticsInterval?: number;
logFormat?: string;
logLevel?: string;
logRotate?: boolean;
chargingStationsPerWorker?: number;
logStatisticsInterval?: number;
logFormat?: string;
logLevel?: string;
logRotate?: boolean;
- logMaxFiles?: number;
+ logMaxFiles?: number | string;
+ logMaxSize?: number | string;
logFile?: string;
logErrorFile?: string;
logConsole?: boolean;
logFile?: string;
logErrorFile?: string;
logConsole?: boolean;
-}
+}
;