Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (25 sloc) 952 Bytes
// Copyright 2017 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.
package cluster
import "github.com/cockroachdb/cockroach/pkg/roachpb"
// IsActiveVersion returns true if the features of the supplied version are active at the running
// version.
func (cv ClusterVersion) IsActiveVersion(v roachpb.Version) bool {
return !cv.Less(v)
}
// IsActive returns true if the features of the supplied version are active at
// the running version.
func (cv ClusterVersion) IsActive(versionKey VersionKey) bool {
v := VersionByKey(versionKey)
return cv.IsActiveVersion(v)
}
func (cv ClusterVersion) String() string {
return cv.Version.String()
}
You can’t perform that action at this time.