versioninfo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func IsCompatible(a, b semver.Version) bool

IsCompatible checks if the version a is compatible with the version b.

func IsFeatureSupported

func IsFeatureSupported(clusterVersion *semver.Version, f Feature) bool

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

func MinSupportedVersion(v Feature) *semver.Version

MinSupportedVersion returns the minimum support version for the specified feature.

func MustParseVersion

func MustParseVersion(v string) *semver.Version

MustParseVersion wraps ParseVersion and will panic if error is not nil.

func ParseVersion

func ParseVersion(v string) (*semver.Version, error)

ParseVersion wraps semver.NewVersion and handles compatibility issues.

func Print

func Print()

Print prints the version information, without log info, of the PD with the specific service mode.

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.

Jump to

Keyboard shortcuts

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