migrator

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	// EventJobFailed is sent when a job fails.
	EventJobFailed = "Migration Job Failed"
	// EventJobCompleted is sent when a job completes successfully.
	EventJobCompleted = "Migration Job Completed"
	// EventUpdateJobStateFailed is sent when updating a job state fails.
	EventUpdateJobStateFailed = "Failed to update job state"
	// EventUpdateTaskStateFailed is sent when updating a task state fails.
	EventUpdateTaskStateFailed = "Failed to update task state"

	// RequestIDLength is the length of the request id, which is needed
	// for creating a trace_id. It is set to 20 for consistency with the
	// request id length used in log.go
	RequestIDLength = 20
)

Variables

This section is empty.

Functions

func NewDefaultMigrator

func NewDefaultMigrator(cfg *config.Config, jobService application.JobService, appClients *clients.ClientList, slackClient slack.Clienter, topicCache *cache.TopicCache) (*migrator, error)

NewDefaultMigrator creates a new default migrator with the provided job service and clients. topicCache must not be nil.

Types

type Migrator

type Migrator interface {
	Shutdown(ctx context.Context) error
	Start(ctx context.Context)
}

Migrator defines the contract for migration operations

type StateTransitionRule added in v0.22.0

type StateTransitionRule struct {
	// TargetState is the state all tasks must reach
	TargetState domain.State
	// Description explains the rule
	Description string
	// FailureState is the state tasks should transition to if they fail
	FailureState domain.State
}

StateTransitionRule defines when a job should transition based on task states

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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