Documentation ¶
Index ¶
- Variables
- func PutVersion(cli *clientv3.Client, ver Version) (int64, error)
- func TryUpgrade(cli *clientv3.Client, uctx Context) error
- func TryUpgradeBeforeSchedulerStart(ctx context.Context, cli *clientv3.Client) error
- func UntouchVersionUpgrade(cli *clientv3.Client, uctx Context) error
- type Context
- type Version
Constants ¶
This section is empty.
Variables ¶
var ( // CurrentVersion represents the current version of the cluster. CurrentVersion = NewVersion(currentInternalNo, version.ReleaseVersion) // MinVersion represents the minimum version of the cluster. // this version only be set after finished importing from v1.0.x, but has not upgraded to the current version. MinVersion = NewVersion(minInternalNo, "min-ver") )
Functions ¶
func PutVersion ¶
PutVersion puts the version into etcd.
func TryUpgrade ¶
TryUpgrade tries to upgrade the cluster from an older version to a new version. This methods should have no side effects even calling multiple times.
func TryUpgradeBeforeSchedulerStart ¶
TryUpgradeBeforeSchedulerStart tries to upgrade the cluster before scheduler start. This methods should have no side effects even calling multiple times.
Types ¶
type Context ¶
Context is used to pass something to TryUpgrade NOTE that zero value of Context is nil, be aware of nil-dereference.
type Version ¶
type Version struct { InternalNo uint64 `json:"internal-no"` // internal version number ReleaseVer string `json:"release-ver"` // release version, like `v2.0.0`, human readable }
Version represents the version of the DM cluster used when upgrading from an older version.
func GetVersion ¶
GetVersion gets the version from etcd.
func NewVersion ¶
NewVersion creates a new instance of Version.
func (Version) Compare ¶
Compare compares the version with another version. NOTE: we only compare `InternalNo` now.