version

package
v5.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: Apache-2.0 Imports: 13 Imported by: 59

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckClusterVersion

func CheckClusterVersion(ctx context.Context, client pd.Client, checker VerChecker) error

CheckClusterVersion check TiKV version.

func CheckTiDBVersion

func CheckTiDBVersion(versionStr string, requiredMinVersion, requiredMaxVersion semver.Version) error

CheckTiDBVersion is equals to ExtractTiDBVersion followed by CheckVersion.

func CheckVersion

func CheckVersion(component string, actual, requiredMinVersion, requiredMaxVersion semver.Version) error

CheckVersion checks if the actual version is within [requiredMinVersion, requiredMaxVersion).

func CheckVersionForBR

func CheckVersionForBR(s *metapb.Store, tikvVersion *semver.Version) error

CheckVersionForBR checks whether version of the cluster and BR itself is compatible.

func ExtractTiDBVersion

func ExtractTiDBVersion(version string) (*semver.Version, error)

ExtractTiDBVersion extracts TiDB version from TiDB SQL `version()` outputs.

func IsTiFlash

func IsTiFlash(store *metapb.Store) bool

IsTiFlash tests whether the store is based on tiflash engine.

func NextMajorVersion

func NextMajorVersion() semver.Version

NextMajorVersion returns the next major version.

func NormalizeBackupVersion

func NormalizeBackupVersion(version string) *semver.Version

NormalizeBackupVersion normalizes the version string from backupmeta.

Types

type VerChecker

type VerChecker func(store *metapb.Store, ver *semver.Version) error

VerChecker is a callback for the CheckClusterVersion, decides whether the cluster is suitable to execute restore. See also: CheckVersionForBackup and CheckVersionForBR.

func CheckVersionForBackup

func CheckVersionForBackup(backupVersion *semver.Version) VerChecker

CheckVersionForBackup checks the version for backup and

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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