migrate

package
v0.0.0-...-4624acb Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 23 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migrator

type Migrator interface {
	// ShouldMigrate checks if we need to migrate metadata
	ShouldMigrate(ctx context.Context) (bool, error)
	// Migrate migrates the cdc metadata
	Migrate(ctx context.Context) error
	// WaitMetaVersionMatched wait util migration is done
	WaitMetaVersionMatched(ctx context.Context) error
	// MarkMigrateDone marks migration is done
	MarkMigrateDone()
	// IsMigrateDone check if migration is done
	IsMigrateDone() bool
}

Migrator migrates the cdc metadata

func NewMigrator

func NewMigrator(cli etcd.CDCEtcdClient,
	pdEndpoints []string,
	serverConfig *config.ServerConfig,
) Migrator

NewMigrator returns a cdc metadata

type NoOpMigrator

type NoOpMigrator struct{}

NoOpMigrator do nothing

func (*NoOpMigrator) IsMigrateDone

func (f *NoOpMigrator) IsMigrateDone() bool

IsMigrateDone check if migration is done

func (*NoOpMigrator) MarkMigrateDone

func (f *NoOpMigrator) MarkMigrateDone()

MarkMigrateDone marks migration is done

func (*NoOpMigrator) Migrate

func (f *NoOpMigrator) Migrate(_ context.Context) error

Migrate migrates the cdc metadata

func (*NoOpMigrator) ShouldMigrate

func (f *NoOpMigrator) ShouldMigrate(_ context.Context) (bool, error)

ShouldMigrate checks if we need to migrate metadata

func (*NoOpMigrator) WaitMetaVersionMatched

func (f *NoOpMigrator) WaitMetaVersionMatched(_ context.Context) error

WaitMetaVersionMatched wait util migration is done

Jump to

Keyboard shortcuts

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