Documentation ¶
Index ¶
- Constants
- Variables
- type Migration
- type Migrator
- type Runner
- func (r *Runner) Backup() error
- func (r *Runner) CheckCompatible() bool
- func (r *Runner) CheckSessions() error
- func (r *Runner) Migrate() error
- func (r *Runner) RegisterSession() error
- func (r *Runner) Rollback() error
- func (r *Runner) Stop()
- func (r *Runner) Validate() error
- func (r *Runner) WatchSessions()
Constants ¶
View Source
const (
Role = "migration"
)
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Migration ¶
type Migration interface { // Validate if migration can be executed. For example, higher version to lower version is not allowed. Validate() error // CheckCompatible check if target is compatible with source. If compatible, no migration should be executed. CheckCompatible() bool // CheckSessions check if any sessions are alive. Abort migration if any. CheckSessions() error // RegisterSession register session to avoid any other migration is also running, registered session will be deleted // as soon as possible after migration is done. RegisterSession() error // Backup source meta information. Backup() error // Migrate to target backend. Migrate() error // Rollback migration. Rollback() error // Stop complete the migration overflow. Stop() }
type Migrator ¶
func NewMigrator ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) CheckCompatible ¶
func (*Runner) CheckSessions ¶
func (*Runner) RegisterSession ¶
func (*Runner) WatchSessions ¶
func (r *Runner) WatchSessions()
Click to show internal directories.
Click to hide internal directories.