Class: MigrationOrchestrator
Defined in: electron/services/monitoring/MigrationSystem.ts:136
Orchestrates migration of monitor configuration data for a given monitor type.
Remarks
Applies registered migration rules in sequence to upgrade monitor data. Handles errors, warnings, and version updates. Used internally by the migration system and exposed via factory.
Constructors
Constructor
new MigrationOrchestrator(
registry
:MigrationRegistry
,versionManager
:VersionManager
):MigrationOrchestrator
Defined in: electron/services/monitoring/MigrationSystem.ts:291
Constructs a new MigrationOrchestrator.
Parameters
registry
The migration registry instance.
versionManager
The version manager instance.
Returns
MigrationOrchestrator
Properties
registry
private
readonly
registry:MigrationRegistry
Defined in: electron/services/monitoring/MigrationSystem.ts:137
versionManager
private
readonly
versionManager:VersionManager
Defined in: electron/services/monitoring/MigrationSystem.ts:139
Methods
migrateMonitorData()
migrateMonitorData(
monitorType
:string
,data
:UnknownRecord
,fromVersion
:string
,toVersion
:string
):Promise
<{appliedMigrations
:string
[];data?
:UnknownRecord
;errors
:string
[];success
:boolean
;warnings
:string
[]; }>
Defined in: electron/services/monitoring/MigrationSystem.ts:171
Migrates monitor configuration data from one version to another.
Parameters
monitorType
string
The monitor type (e.g., "http", "port").
data
UnknownRecord
The monitor configuration data to migrate.
fromVersion
string
The current version of the data.
toVersion
string
The target version to migrate to.
Returns
Promise
<{ appliedMigrations
: string
[]; data?
: UnknownRecord
; errors
: string
[]; success
: boolean
; warnings
: string
[]; }>
An object containing applied migrations, migrated data, errors, success flag, and warnings.
Remarks
Applies all necessary migrations in order. Updates version state if successful. Returns a summary object with migration results, errors, and warnings. Throws only if orchestration fails unexpectedly (e.g., registry or version manager error).
Example
const result = await orchestrator.migrateMonitorData(
"http",
config,
"1.0.0",
"1.1.0"
);
Throws
Throws if migration orchestration fails unexpectedly.