@codesoul-co/hypha-memory / memory-server-migration-rehearsal
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/memory-server-migration-rehearsal.ts - Exports: 9
Using this module
Use the Memory server migration rehearsal module for using the public contracts and operations for this capability boundary. It exports 1 class, 1 function, 7 interfaces.
Import from the package entrypoint
import {
MemoryServerMigrationRehearsal,
planMemoryServerMigrationInventories,
} from '@codesoul-co/hypha-memory';
import type {
MemoryServerMigrationFinishInput,
MemoryServerMigrationInventoryPlan,
MemoryServerMigrationInventoryRecord,
MemoryServerMigrationPrepareInput,
MemoryServerMigrationRehearsalCheckpoint,
MemoryServerMigrationRehearsalCheckpointStore,
MemoryServerMigrationRehearsalDataPort,
} from '@codesoul-co/hypha-memory';Usage patterns
- Use the 7 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
- The module exposes 1 function as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
MemoryServerMigrationRehearsal | class | new MemoryServerMigrationRehearsal(data: MemoryServerMigrationRehearsalDataPort, store: MemoryServerMigrationRehearsalCheckpointStore): MemoryServerMigrationRehearsal | Memory Server Migration Rehearsal class with 5 public constructor or member entries; its exact declarations are listed below. |
planMemoryServerMigrationInventories | function | planMemoryServerMigrationInventories(legacyInput: readonly MemoryServerMigrationInventoryRecord[], canonicalInput: readonly MemoryServerMigrationInventoryRecord[]): MemoryServerMigrationInventoryPlan | Plan Memory Server Migration Inventories function with 1 public call signature; parameters and return types are listed below. |
MemoryServerMigrationFinishInput | interface | interface MemoryServerMigrationFinishInput | Memory Server Migration Finish Input interface with 3 public fields or methods. |
MemoryServerMigrationInventoryPlan | interface | interface MemoryServerMigrationInventoryPlan | Memory Server Migration Inventory Plan interface with 7 public fields or methods. |
MemoryServerMigrationInventoryRecord | interface | interface MemoryServerMigrationInventoryRecord | Memory Server Migration Inventory Record interface with 2 public fields or methods. |
MemoryServerMigrationPrepareInput | interface | interface MemoryServerMigrationPrepareInput | Memory Server Migration Prepare Input interface with 5 public fields or methods. |
MemoryServerMigrationRehearsalCheckpoint | interface | interface MemoryServerMigrationRehearsalCheckpoint | Memory Server Migration Rehearsal Checkpoint interface with 4 public fields or methods. |
MemoryServerMigrationRehearsalCheckpointStore | interface | interface MemoryServerMigrationRehearsalCheckpointStore | Memory Server Migration Rehearsal Checkpoint Store interface with 2 public fields or methods. |
MemoryServerMigrationRehearsalDataPort | interface | interface MemoryServerMigrationRehearsalDataPort | Memory Server Migration Rehearsal Data Port interface with 6 public fields or methods. |
MemoryServerMigrationRehearsal
Memory Server Migration Rehearsal class with 5 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { MemoryServerMigrationRehearsal } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export declare class MemoryServerMigrationRehearsal {
constructor(data: MemoryServerMigrationRehearsalDataPort, store: MemoryServerMigrationRehearsalCheckpointStore);
plan(): Promise<MemoryServerMigrationInventoryPlan>;
prepare(input: MemoryServerMigrationPrepareInput): Promise<MemoryServerMigrationRehearsalCheckpoint>;
rollback(input: MemoryServerMigrationFinishInput): Promise<MemoryServerMigrationRehearsalCheckpoint>;
retire(input: MemoryServerMigrationFinishInput & {
rollbackWindowEndsAt: string;
}): Promise<MemoryServerMigrationRehearsalCheckpoint>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (data: MemoryServerMigrationRehearsalDataPort, store: MemoryServerMigrationRehearsalCheckpointStore): MemoryServerMigrationRehearsal | Creates an instance of this class. |
plan | method | plan(): Promise<MemoryServerMigrationInventoryPlan> | Public method; parameters and return type are shown in the signature. |
prepare | method | prepare(input: MemoryServerMigrationPrepareInput): Promise<MemoryServerMigrationRehearsalCheckpoint> | Public method; parameters and return type are shown in the signature. |
retire | method | retire(input: MemoryServerMigrationFinishInput & { rollbackWindowEndsAt: string; }): Promise<MemoryServerMigrationRehearsalCheckpoint> | Public method; parameters and return type are shown in the signature. |
rollback | method | rollback(input: MemoryServerMigrationFinishInput): Promise<MemoryServerMigrationRehearsalCheckpoint> | Public method; parameters and return type are shown in the signature. |
planMemoryServerMigrationInventories
Plan Memory Server Migration Inventories function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { planMemoryServerMigrationInventories } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export declare function planMemoryServerMigrationInventories(legacyInput: readonly MemoryServerMigrationInventoryRecord[], canonicalInput: readonly MemoryServerMigrationInventoryRecord[]): MemoryServerMigrationInventoryPlan;Call signature
planMemoryServerMigrationInventories(legacyInput: readonly MemoryServerMigrationInventoryRecord[], canonicalInput: readonly MemoryServerMigrationInventoryRecord[]): MemoryServerMigrationInventoryPlanParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
legacyInput | readonly MemoryServerMigrationInventoryRecord[] | Yes | Required parameter; accepted values are defined by the type column. |
canonicalInput | readonly MemoryServerMigrationInventoryRecord[] | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
MemoryServerMigrationInventoryPlan - Description: The return contract is defined by the type shown above.
MemoryServerMigrationFinishInput
Memory Server Migration Finish Input interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationFinishInput } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export interface MemoryServerMigrationFinishInput {
migrationId: string;
expectedRevision: string;
occurredAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
expectedRevision | property | expectedRevision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
migrationId | property | migrationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
occurredAt | property | occurredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationInventoryPlan
Memory Server Migration Inventory Plan interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationInventoryPlan } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export interface MemoryServerMigrationInventoryPlan {
legacyRecords: number;
canonicalRecords: number;
matchingRecords: number;
missingCanonicalKeys: string[];
unexpectedCanonicalKeys: string[];
digestMismatchKeys: string[];
reconciliation: MemoryServerMigrationReconciliation;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
canonicalRecords | property | canonicalRecords: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
digestMismatchKeys | property | digestMismatchKeys: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
legacyRecords | property | legacyRecords: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
matchingRecords | property | matchingRecords: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
missingCanonicalKeys | property | missingCanonicalKeys: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconciliation | property | reconciliation: MemoryServerMigrationReconciliation | Public property; its type, readonly modifier and optionality are shown in the signature. |
unexpectedCanonicalKeys | property | unexpectedCanonicalKeys: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationInventoryRecord
Memory Server Migration Inventory Record interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationInventoryRecord } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export interface MemoryServerMigrationInventoryRecord {
key: string;
digest: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
digest | property | digest: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
key | property | key: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationPrepareInput
Memory Server Migration Prepare Input interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationPrepareInput } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export interface MemoryServerMigrationPrepareInput {
migrationId: string;
revision: string;
occurredAt: string;
dualWriteDeadlineAt: string;
checkpointRef: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
checkpointRef | property | checkpointRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
dualWriteDeadlineAt | property | dualWriteDeadlineAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
migrationId | property | migrationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
occurredAt | property | occurredAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationRehearsalCheckpoint
Memory Server Migration Rehearsal Checkpoint interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationRehearsalCheckpoint } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export interface MemoryServerMigrationRehearsalCheckpoint {
state: MemoryServerCanonicalMigrationState;
events: readonly MemoryServerMigrationTransitionEvent[];
importedCanonicalIds: readonly string[];
reconciliation: MemoryServerMigrationReconciliation;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
events | property | events: readonly MemoryServerMigrationTransitionEvent[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
importedCanonicalIds | property | importedCanonicalIds: readonly string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
reconciliation | property | reconciliation: MemoryServerMigrationReconciliation | Public property; its type, readonly modifier and optionality are shown in the signature. |
state | property | state: MemoryServerCanonicalMigrationState | Public property; its type, readonly modifier and optionality are shown in the signature. |
MemoryServerMigrationRehearsalCheckpointStore
Memory Server Migration Rehearsal Checkpoint Store interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationRehearsalCheckpointStore } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export interface MemoryServerMigrationRehearsalCheckpointStore {
load(migrationId: string): Promise<MemoryServerMigrationRehearsalCheckpoint | null>;
save(migrationId: string, checkpoint: MemoryServerMigrationRehearsalCheckpoint): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
load | method | load(migrationId: string): Promise<MemoryServerMigrationRehearsalCheckpoint | null> | Public method; parameters and return type are shown in the signature. |
save | method | save(migrationId: string, checkpoint: MemoryServerMigrationRehearsalCheckpoint): Promise<void> | Public method; parameters and return type are shown in the signature. |
MemoryServerMigrationRehearsalDataPort
Memory Server Migration Rehearsal Data Port interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { MemoryServerMigrationRehearsalDataPort } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-migration-rehearsal
Declaration
export interface MemoryServerMigrationRehearsalDataPort {
listLegacy(): Promise<readonly MemoryServerMigrationInventoryRecord[]>;
listCanonical(): Promise<readonly MemoryServerMigrationInventoryRecord[]>;
importCanonical(record: MemoryServerMigrationInventoryRecord, idempotencyKey: string): Promise<{
canonicalId: string;
}>;
writeDualProbe(idempotencyKey: string): Promise<{
record: MemoryServerMigrationInventoryRecord;
canonicalId: string;
}>;
removeCanonical(canonicalIds: readonly string[]): Promise<void>;
observeRetirement(): Promise<Omit<MemoryServerMigrationRetirementEvidence, 'rollbackWindowEndsAt'>>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
importCanonical | method | importCanonical(record: MemoryServerMigrationInventoryRecord, idempotencyKey: string): Promise<{ canonicalId: string; }> | Public method; parameters and return type are shown in the signature. |
listCanonical | method | listCanonical(): Promise<readonly MemoryServerMigrationInventoryRecord[]> | Public method; parameters and return type are shown in the signature. |
listLegacy | method | listLegacy(): Promise<readonly MemoryServerMigrationInventoryRecord[]> | Public method; parameters and return type are shown in the signature. |
observeRetirement | method | observeRetirement(): Promise<Omit<MemoryServerMigrationRetirementEvidence, "rollbackWindowEndsAt">> | Public method; parameters and return type are shown in the signature. |
removeCanonical | method | removeCanonical(canonicalIds: readonly string[]): Promise<void> | Public method; parameters and return type are shown in the signature. |
writeDualProbe | method | writeDualProbe(idempotencyKey: string): Promise<{ record: MemoryServerMigrationInventoryRecord; canonicalId: string; }> | Public method; parameters and return type are shown in the signature. |
