Documentation ¶
Index ¶
- Variables
- func CheckClusterVersion(ctx context.Context, client pd.Client, pdAddrs []string, ...) error
- func CheckStoreVersion(ctx context.Context, client pd.Client, storeID uint64) error
- func CheckTiCDCVersion(versions map[string]struct{}) error
- func GetRawInfo() string
- func LogVersionInfo(app string)
- func ReleaseSemver() string
- func SanitizeVersion(v string) string
- type CreatorVersionGate
- type TiCDCClusterVersion
Constants ¶
This section is empty.
Variables ¶
var ( // MinTiKVVersion is the version of the minimal compatible TiKV. // The min version should be 7.x because we adapt to tidb concurrency ddl implementations. MinTiKVVersion = semver.New("7.1.0-alpha") // MinTiCDCVersion is the version of the minimal allowed TiCDC version. MinTiCDCVersion = semver.New("6.3.0-alpha") // MaxTiCDCVersion is the version of the maximum allowed TiCDC version. // for version `x.y.z`, max allowed `x+2.0.0` MaxTiCDCVersion = semver.New("10.0.0-alpha") )
var ( ReleaseVersion = "None" BuildTS = "None" GitHash = "None" GitBranch = "None" )
Version information.
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 CheckStoreVersion ¶
CheckStoreVersion checks whether the given TiKV is compatible with this CDC. If storeID is 0, it checks all TiKV.
func CheckTiCDCVersion ¶
CheckTiCDCVersion return true if all cdc instance have valid semantic version the whole cluster only allow at most 2 different version instances and should in the range [MinTiCDCVersion, MaxTiCDCVersion)
func LogVersionInfo ¶
func LogVersionInfo(app string)
LogVersionInfo prints the 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.
func SanitizeVersion ¶
SanitizeVersion remove the prefix "v" and suffix git hash.
Types ¶
type CreatorVersionGate ¶
type CreatorVersionGate struct {
// contains filtered or unexported fields
}
CreatorVersionGate determines the introduced version and compatibility of some features based on the creator's version value.
func NewCreatorVersionGate ¶
func NewCreatorVersionGate(version string) *CreatorVersionGate
NewCreatorVersionGate creates the creator version gate.
func (*CreatorVersionGate) ChangefeedAcceptProtocolInMysqlSinURI ¶
func (g *CreatorVersionGate) ChangefeedAcceptProtocolInMysqlSinURI() bool
ChangefeedAcceptProtocolInMysqlSinURI determines whether to accept protocol in mysql sink uri or configure based on the creator's version.
func (*CreatorVersionGate) ChangefeedAcceptUnknownProtocols ¶
func (g *CreatorVersionGate) ChangefeedAcceptUnknownProtocols() bool
ChangefeedAcceptUnknownProtocols determines whether to accept unknown protocols based on the creator's version.
func (*CreatorVersionGate) ChangefeedInheritSchedulerConfigFromV66 ¶
func (g *CreatorVersionGate) ChangefeedInheritSchedulerConfigFromV66() bool
ChangefeedInheritSchedulerConfigFromV66 determines whether to inherit changefeed scheduler config created by v6.6.0.
func (*CreatorVersionGate) ChangefeedStateFromAdminJob ¶
func (g *CreatorVersionGate) ChangefeedStateFromAdminJob() bool
ChangefeedStateFromAdminJob determines if admin job is the state of changefeed based on the version of the creator.
type TiCDCClusterVersion ¶
TiCDCClusterVersion is the version of TiCDC cluster
func GetTiCDCClusterVersion ¶
func GetTiCDCClusterVersion(captureVersion []string) (TiCDCClusterVersion, error)
GetTiCDCClusterVersion returns the version of ticdc cluster
func (*TiCDCClusterVersion) LessThan500RC ¶
func (v *TiCDCClusterVersion) LessThan500RC() bool
LessThan500RC returns true if th cluster version is less than 5.0.0-rc
func (*TiCDCClusterVersion) ShouldEnableUnifiedSorterByDefault ¶
func (v *TiCDCClusterVersion) ShouldEnableUnifiedSorterByDefault() bool
ShouldEnableUnifiedSorterByDefault returns whether Unified Sorter should be enabled by default
func (*TiCDCClusterVersion) ShouldRunCliWithOpenAPI ¶
func (v *TiCDCClusterVersion) ShouldRunCliWithOpenAPI() bool
ShouldRunCliWithOpenAPI returns whether to run cmd cli with open api