Documentation ¶
Index ¶
- Constants
- Variables
- func IsCompatible(a, b semver.Version) bool
- func IsFeatureSupported(clusterVersion *semver.Version, f Feature) bool
- func Log(serviceMode string)
- func MinSupportedVersion(v Feature) *semver.Version
- func MustParseVersion(v string) *semver.Version
- func ParseVersion(v string) (*semver.Version, error)
- func Print()
- type Feature
Constants ¶
View Source
const (
// CommunityEdition is the default edition for building.
CommunityEdition = "Community"
)
Variables ¶
View Source
var ( PDReleaseVersion = "None" PDBuildTS = "None" PDGitHash = "None" PDGitBranch = "None" PDEdition = CommunityEdition )
Version information.
Functions ¶
func IsCompatible ¶
IsCompatible checks if the version a is compatible with the version b.
func IsFeatureSupported ¶
IsFeatureSupported checks if the feature is supported by current cluster.
func Log ¶
func Log(serviceMode string)
Log prints the version information of the PD with the specific service mode.
func MinSupportedVersion ¶
MinSupportedVersion returns the minimum support version for the specified feature.
func MustParseVersion ¶
MustParseVersion wraps ParseVersion and will panic if error is not nil.
func ParseVersion ¶
ParseVersion wraps semver.NewVersion and handles compatibility issues.
Types ¶
type Feature ¶
type Feature int
Feature supported features.
const ( Base Feature = iota Version2_0 // RegionMerge supports the adjacent regions to be merged. // and PD will periodically check if there is enough small // region to be merged. if there is, will send the corresponding // merge command to the TiKV. RegionMerge // BatchSplit can speed up the region split. // and PD will response the BatchSplit request. BatchSplit Version3_0 Version4_0 Version5_0 // JointConsensus is supported in ConfChangeV2, which supports safe conf change across data center. ConfChangeV2 // HotScheduleWithQuery supports schedule hot region with query info. HotScheduleWithQuery // SwitchWithess supports switch between witness and non-witness. SwitchWitness )
Features list. The cluster provides corresponding new features if the cluster version greater than or equal to the required minimum version of the feature.
Click to show internal directories.
Click to hide internal directories.