version

package
v0.0.0-...-1b33b2a Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PDRequestTimeout = 5 * time.Second
)

Variables

View Source
var (
	ReleaseVersion = "None"
	BuildTS        = "None"
	GitHash        = "None"
	GitBranch      = "None"
	GoVersion      = "None"
)

Version information.

View Source
var (

	// MinTiKVVersion is the version of the minimal compatible TiKV.
	MinTiKVVersion *semver.Version = semver.New("6.2.0-alpha")
)
View Source
var TiKVCDCClusterVersionUnknown = TiKVCDCClusterVersion{}

TiKVCDCClusterVersionUnknown is a read-only variable to represent the unknown cluster version

Functions

func CheckClusterVersion

func CheckClusterVersion(
	ctx context.Context, client pd.Client, pdAddrs []string, credential *security.Credential, errorTiKVIncompat bool,
) error

CheckClusterVersion check TiKV and PD version. need only one PD alive and match the cdc version.

func CheckPDVersion

func CheckPDVersion(ctx context.Context, pdAddr string, credential *security.Credential) error

CheckPDVersion check PD version.

func CheckStoreVersion

func CheckStoreVersion(ctx context.Context, client pd.Client, storeID uint64) error

CheckStoreVersion checks whether the given TiKV is compatible with this CDC. If storeID is 0, it checks all TiKV.

func CheckTiKVCDCClusterVersion

func CheckTiKVCDCClusterVersion(cdcClusterVer TiKVCDCClusterVersion) (unknown bool, err error)

CheckTiKVCDCClusterVersion returns the version of ticdc cluster

func GetRawInfo

func GetRawInfo() string

GetRawInfo returns basic version information string.

func LogVersionInfo

func LogVersionInfo()

LogVersionInfo prints the TiKV-CDC version information.

func ReleaseSemver

func ReleaseSemver() string

ReleaseSemver returns a valid Semantic Versions or an empty if the ReleaseVersion is not set at compile time.

Types

type TiKVCDCClusterVersion

type TiKVCDCClusterVersion struct {
	*semver.Version
}

TiKVCDCClusterVersion is the version of TiKVCDC cluster

func GetTiKVCDCClusterVersion

func GetTiKVCDCClusterVersion(captureVersion []string) (TiKVCDCClusterVersion, error)

GetTiKVCDCClusterVersion returns the version of ticdc cluster

func (*TiKVCDCClusterVersion) IsUnknown

func (v *TiKVCDCClusterVersion) IsUnknown() bool

IsUnknown returns whether this is an unknown version

Jump to

Keyboard shortcuts

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