migrations

package
v3.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration

type Migration interface {
	NeedsMigration(ctx context.Context) (bool, error)
	Migrate(ctx context.Context) error
	Name() string
}

type MigrationRunner

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

func NewMigrationRunner

func NewMigrationRunner(ctx context.Context, cfg config.Config, storage models.Storage, leaseManager locker.EtcdLeaseManager) (MigrationRunner, error)

func (MigrationRunner) Run

func (m MigrationRunner) Run(ctx context.Context) error

type V0toV1

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

func NewV0toV1Migration

func NewV0toV1Migration(hostname string, leaseManager locker.EtcdLeaseManager, storage models.Storage) V0toV1

func (V0toV1) Migrate

func (m V0toV1) Migrate(ctx context.Context) error

func (V0toV1) Name

func (m V0toV1) Name() string

func (V0toV1) NeedsMigration

func (m V0toV1) NeedsMigration(ctx context.Context) (bool, error)

type V2toV3

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

func NewV2toV3Migration

func NewV2toV3Migration(hostname string, storage models.Storage) V2toV3

func (V2toV3) Migrate

func (m V2toV3) Migrate(ctx context.Context) error

func (V2toV3) Name

func (m V2toV3) Name() string

func (V2toV3) NeedsMigration

func (m V2toV3) NeedsMigration(ctx context.Context) (bool, error)

type V3toV4 added in v3.1.0

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

func NewV3toV4Migration added in v3.1.0

func NewV3toV4Migration(ctx context.Context, cfg config.Config, storage models.Storage) (*V3toV4, error)

func (*V3toV4) Migrate added in v3.1.0

func (m *V3toV4) Migrate(ctx context.Context) error

func (*V3toV4) Name added in v3.1.0

func (m *V3toV4) Name() string

func (*V3toV4) NeedsMigration added in v3.1.0

func (m *V3toV4) NeedsMigration(ctx context.Context) (bool, error)

Jump to

Keyboard shortcuts

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