migrate

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package migrate provides tools for migrating AILANG data between storage backends.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destinations

type Destinations struct {
	Coordinator coordinator.Store
	Messaging   messaging.MessageStore
	Observatory observatory.Backend
}

Destinations holds the cloud backends to write to.

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

Migrator copies data from source backends to destination backends.

func NewMigrator

func NewMigrator(src *Sources, dst *Destinations, opts Options, logger *log.Logger) *Migrator

NewMigrator creates a migrator with the given source and destination backends.

func (*Migrator) Run

func (m *Migrator) Run(ctx context.Context) (*Stats, error)

Run executes the full migration.

func (*Migrator) Verify

func (m *Migrator) Verify(ctx context.Context) ([]string, error)

Verify checks that source and destination have matching record counts.

type Options

type Options struct {
	DryRun     bool   // Print what would be migrated without writing
	Verbose    bool   // Print detailed progress
	BatchSize  int    // Number of records per batch (default: 100)
	Collection string // Migrate specific collection only ("coordinator", "messaging", "observatory", or "")
}

Options controls migration behavior.

type Sources

type Sources struct {
	Coordinator coordinator.Store
	Messaging   messaging.MessageStore
	Observatory observatory.Backend
}

Sources holds the local SQLite backends to read from.

type Stats

type Stats struct {
	CoordinatorTasks      int
	CoordinatorApprovals  int
	CoordinatorEvents     int
	MessagingThreads      int
	MessagingInbox        int
	MessagingAgents       int
	ObservatorySpans      int
	ObservatoryWorkspaces int
	Errors                []string
	Duration              time.Duration
}

Stats tracks migration progress and results.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL