Documentation ¶
Index ¶
- func CheckClusterVersion(ctx context.Context, client pd.Client, checker VerChecker) error
- func CheckTiDBVersion(versionStr string, requiredMinVersion, requiredMaxVersion semver.Version) error
- func CheckVersion(component string, ...) error
- func CheckVersionForBR(s *metapb.Store, tikvVersion *semver.Version) error
- func ExtractTiDBVersion(version string) (*semver.Version, error)
- func IsTiFlash(store *metapb.Store) bool
- func NextMajorVersion() semver.Version
- func NormalizeBackupVersion(version string) *semver.Version
- type VerChecker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckClusterVersion ¶
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 ¶
CheckVersionForBR checks whether version of the cluster and BR itself is compatible.
func ExtractTiDBVersion ¶
ExtractTiDBVersion extracts TiDB version from TiDB SQL `version()` outputs.
func NextMajorVersion ¶
NextMajorVersion returns the next major version.
func NormalizeBackupVersion ¶
NormalizeBackupVersion normalizes the version string from backupmeta.
Types ¶
type VerChecker ¶
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