migrate

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SlotFailed  = "failed"
	SlotSuccess = "success"
)
View Source
const (
	TaskStatusSuccess = iota + 1
	TaskStatusFailed
)

Variables

View Source
var (
	ErrMismatchMigrateSlot   = errors.New("mismatched slot")
	ErrWrongSlotNode         = errors.New("the slot isn't belong to the node")
	ErrSlotFailed            = errors.New("migrate slot fail")
	ErrSlotCompleted         = errors.New("task has been completed")
	ErrAbortedMigrateRoutine = errors.New("aborted migrate routine")
	ErrGetClusterInfo        = errors.New("get cluster info failed")
)

Functions

This section is empty.

Types

type Migrator

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

func New

func New(stor *storage.Storage) *Migrator

func (*Migrator) AddTask added in v0.2.0

func (m *Migrator) AddTask(ctx context.Context, task *storage.MigrationTask) error

func (*Migrator) Load

func (m *Migrator) Load(ctx context.Context) error

func (*Migrator) Shutdown

func (m *Migrator) Shutdown()

Jump to

Keyboard shortcuts

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