Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunMigrationsFunc ¶
type RunMigrationsFunc func(ctx context.Context, ds datastore.Batching, migrations versioning.VersionedMigrationList, target versioning.VersionKey) (versioning.VersionKey, error)
RunMigrationsFunc is a function that runs migrations
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes a migrations exactly once and can queried for status of that migration and any migration errors
func NewRunner ¶
func NewRunner(ds datastore.Batching, migrations versioning.VersionedMigrationList, target versioning.VersionKey, runMigrations RunMigrationsFunc) *Runner
NewRunner returns a new runner instance for the given datastore, migrations, and target
func (*Runner) ReadyError ¶
ReadyError returns the ready state of the migration - either nil for ready or err for not ready or a migration error
Click to show internal directories.
Click to hide internal directories.