migration

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionParams

type ExecutionParams struct {
	LagThreshold     int64
	ClusterApiKey    string
	ClusterApiSecret string
}

ExecutionParams holds runtime parameters needed during migration execution

type MigrationOrchestrator

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

MigrationOrchestrator manages the FSM lifecycle and coordinates workflow execution

func NewMigrationOrchestrator

func NewMigrationOrchestrator(
	config *types.MigrationConfig,
	workflow *MigrationWorkflow,
	migrationState *types.MigrationState,
	stateFilePath string,
) *MigrationOrchestrator

NewMigrationOrchestrator creates a new migration orchestrator with injected dependencies

func (*MigrationOrchestrator) Execute

func (o *MigrationOrchestrator) Execute(ctx context.Context, lagThreshold int64, clusterApiKey, clusterApiSecret string) error

Execute runs the full migration workflow from the current state

func (*MigrationOrchestrator) Initialize

func (o *MigrationOrchestrator) Initialize(ctx context.Context, clusterApiKey, clusterApiSecret string) error

Initialize triggers the initialization event

type MigrationWorkflow

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

func NewMigrationWorkflow

func NewMigrationWorkflow(
	gatewayService gateway.Service,
	clusterLinkService clusterlink.Service,
) *MigrationWorkflow

func NewMigrationWorkflowWithOffsets

func NewMigrationWorkflowWithOffsets(
	gatewayService gateway.Service,
	clusterLinkService clusterlink.Service,
	sourceOffset *offset.Service,
	destinationOffset *offset.Service,
) *MigrationWorkflow

func (*MigrationWorkflow) CheckLags

func (s *MigrationWorkflow) CheckLags(
	ctx context.Context,
	config *types.MigrationConfig,
	lagThreshold int64,
	clusterApiKey, clusterApiSecret string,
) error

CheckLags polls source and destination offsets until lag is below threshold

func (*MigrationWorkflow) FenceGateway

func (s *MigrationWorkflow) FenceGateway(ctx context.Context, config *types.MigrationConfig) error

FenceGateway applies the fenced gateway CR YAML to block traffic

func (*MigrationWorkflow) Initialize

func (s *MigrationWorkflow) Initialize(
	ctx context.Context,
	config *types.MigrationConfig,
	clusterApiKey, clusterApiSecret string,
) error

func (*MigrationWorkflow) PromoteTopics

func (s *MigrationWorkflow) PromoteTopics(ctx context.Context, config *types.MigrationConfig, clusterApiKey, clusterApiSecret string) error

PromoteTopics polls offsets and promotes mirror topics that reach zero lag

func (*MigrationWorkflow) SwitchGateway

func (s *MigrationWorkflow) SwitchGateway(ctx context.Context, config *types.MigrationConfig) error

SwitchGateway applies the switchover gateway CR YAML to point to Confluent Cloud

type WorkflowStep

type WorkflowStep struct {
	Event       string
	Description string
	FromState   string
	ToState     string
	UserMessage string // Emoji-prefixed message shown to the user
}

WorkflowStep defines a single step in the migration workflow

Jump to

Keyboard shortcuts

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