migration

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: AGPL-3.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration

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

Migration migration 实例对象封装

func New

func New(options ...Option) *Migration

New 新建 Migration service

func (*Migration) CleanUnusedMigrationNs

func (m *Migration) CleanUnusedMigrationNs() (bool, error)

func (*Migration) Create

func (m *Migration) Create(migrationLog *dbclient.MigrationLog, diceyml *diceyml.DiceYaml, Runtime *dbclient.Runtime, App *apistructs.ApplicationDTO) (data interface{}, err error)

func (*Migration) Exist

func (m *Migration) Exist(migrationLog *dbclient.MigrationLog) (created, started bool, err error)

Exist 返回 job 存在情况 created: 调用 create 成功,job 在 etcd 中已创建 started: 调用 start 成功,job 在 cluster 中已存在并开始执行

func (*Migration) Remove

func (m *Migration) Remove(namespace string, migrationLog *dbclient.MigrationLog) (err error)

func (*Migration) Start

func (m *Migration) Start(migrationLog *dbclient.MigrationLog, diceyml *diceyml.DiceYaml, Runtime *dbclient.Runtime, App *apistructs.ApplicationDTO) (err error)

func (*Migration) Status

func (m *Migration) Status(migrationLog *dbclient.MigrationLog) (desc apistructs.MigrationStatusDesc, err error)

Status 获取migration status信息

type Option

type Option func(*Migration)

Option Migration 实例对象配置选项

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

func WithDBClient

func WithDBClient(db *dbclient.DBClient) Option

WithDBClient 配置 db client

Jump to

Keyboard shortcuts

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