migrator

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration0001 added in v2.16.0

type Migration0001 struct{}

func (Migration0001) Migrate added in v2.16.0

func (m Migration0001) Migrate(migrator *Migrator) (Result, error)

Migrate creates the spaces directory structure

func (Migration0001) Rollback added in v2.16.0

func (Migration0001) Rollback(_ *Migrator) (Result, error)

Rollback is not implemented

type Migration0002 added in v2.16.0

type Migration0002 struct{}

func (Migration0002) Migrate added in v2.16.0

func (m Migration0002) Migrate(migrator *Migrator) (Result, error)

Migrate migrates spacetypes to indexes

func (Migration0002) Rollback added in v2.16.0

func (Migration0002) Rollback(_ *Migrator) (Result, error)

Rollback is not implemented

type Migration0003 added in v2.16.0

type Migration0003 struct{}

func (Migration0003) Migrate added in v2.16.0

func (m Migration0003) Migrate(migrator *Migrator) (Result, error)

Migrate migrates the file metadata to the current backend. Only the xattrs -> messagepack path is supported.

func (Migration0003) Rollback added in v2.16.0

func (Migration0003) Rollback(_ *Migrator) (Result, error)

Rollback is not implemented

type Migration0004 added in v2.16.0

type Migration0004 struct{}

func (Migration0004) Migrate added in v2.16.0

func (Migration0004) Migrate(migrator *Migrator) (Result, error)

Migrate migrates the directory tree based space indexes to messagepack

func (Migration0004) Rollback added in v2.16.0

func (Migration0004) Rollback(m *Migrator) (Result, error)

Rollback migrates the directory messagepack indexes to symlinks

type Migration0005 added in v2.16.0

type Migration0005 struct{}

func (Migration0005) Migrate added in v2.16.0

func (Migration0005) Migrate(migrator *Migrator) (Result, error)

Migrate fixes the messagepack space index data structure

func (Migration0005) Rollback added in v2.16.0

func (Migration0005) Rollback(migrator *Migrator) (Result, error)

Rollback rolls back the migration

type MigrationState added in v2.16.0

type MigrationState struct {
	State   string
	Message string
}

MigrationState holds the state of a migration

type Migrator

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

Migrator runs migrations on an existing decomposedfs

func New

func New(lu node.PathLookup, log *zerolog.Logger) Migrator

New returns a new Migrator instance

func (*Migrator) Migrations added in v2.16.0

func (m *Migrator) Migrations() (map[string]MigrationState, error)

Migrations returns the list of migrations and their states

func (*Migrator) RunMigration added in v2.16.0

func (m *Migrator) RunMigration(id string, rollback bool) error

RunMigration runs or rolls back a migration

func (*Migrator) RunMigrations

func (m *Migrator) RunMigrations() error

RunMigrations runs all migrations in sequence. Note this sequence must not be changed or it might damage existing decomposed fs.

type Result

type Result string

Result represents the result of a migration run

Jump to

Keyboard shortcuts

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