config

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupConfig

type BackupConfig struct {
	Format      string          `yaml:"format"`
	Compression string          `yaml:"compression"`
	ChunkSizeMB int             `yaml:"chunk_size_mb"`
	Storage     StorageConfig   `yaml:"storage"`
	Retention   RetentionConfig `yaml:"retention"`
}

BackupConfig defines backup-specific settings.

type CheckpointConfig

type CheckpointConfig struct {
	Path               string `yaml:"path"`
	FlushEveryNBatches int    `yaml:"flush_every_n_batches"`
}

CheckpointConfig defines progress tracking settings.

type ConcurrencyConfig

type ConcurrencyConfig struct {
	NumReaders      int           `yaml:"num_readers"`
	NumTransformers int           `yaml:"num_transformers"`
	NumWriters      int           `yaml:"num_writers"`
	BatchSize       int           `yaml:"batch_size"`
	BatchTimeout    time.Duration `yaml:"batch_timeout"`
	RateLimitRPS    int           `yaml:"rate_limit_rps"`
}

ConcurrencyConfig defines the worker pool parameters.

type Config

type Config struct {
	Operation   string            `yaml:"operation"`
	Source      DBConfig          `yaml:"source"`
	Target      DBConfig          `yaml:"target"`
	Concurrency ConcurrencyConfig `yaml:"concurrency"`
	Migration   MigrationConfig   `yaml:"migration"`
	Backup      BackupConfig      `yaml:"backup"`
	Checkpoint  CheckpointConfig  `yaml:"checkpoint"`
	Telemetry   TelemetryConfig   `yaml:"telemetry"`
}

Config is the root configuration object for gomigrate.

type DBConfig

type DBConfig struct {
	Type     string            `yaml:"type"`
	Host     string            `yaml:"host"`
	Hosts    []string          `yaml:"hosts"` // For Cassandra
	Port     int               `yaml:"port"`
	User     string            `yaml:"user"`
	Password string            `yaml:"password"`
	Database string            `yaml:"database"`
	Keyspace string            `yaml:"keyspace"` // For Cassandra
	Tables   []string          `yaml:"tables"`
	Params   map[string]string `yaml:"params"`
}

DBConfig holds connection details for a database.

type MigrationConfig

type MigrationConfig struct {
	SchemaMappingFile string  `yaml:"schema_mapping_file"`
	ConflictStrategy  string  `yaml:"conflict_strategy"`
	VerifyAfter       bool    `yaml:"verify_after"`
	VerifySamplePct   float64 `yaml:"verify_sample_pct"`
}

MigrationConfig defines migration-specific settings.

type RetentionConfig

type RetentionConfig struct {
	KeepLast    int `yaml:"keep_last"`
	KeepDaily   int `yaml:"keep_daily"`
	KeepWeekly  int `yaml:"keep_weekly"`
	KeepMonthly int `yaml:"keep_monthly"`
}

RetentionConfig defines how many backups to keep.

type StorageConfig

type StorageConfig struct {
	Type   string `yaml:"type"`
	Bucket string `yaml:"bucket"`
	Prefix string `yaml:"prefix"`
	Region string `yaml:"region"`
}

StorageConfig defines where backups are stored.

type TelemetryConfig

type TelemetryConfig struct {
	LogLevel        string `yaml:"log_level"`
	LogFormat       string `yaml:"log_format"`
	MetricsAddr     string `yaml:"metrics_addr"`
	TracingEndpoint string `yaml:"tracing_endpoint"`
}

TelemetryConfig defines observability settings.

Jump to

Keyboard shortcuts

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