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
Click to show internal directories.
Click to hide internal directories.