version

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version represents a Cassandra database server version. Cassandra does not adhere to semver. A Cassandra version string may omit the patch version. In Navigator we query the version of the running Cassandra service via the JMX interface. It is returned as a string via: StorageService.getReleaseVersion: https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/service/StorageService.java#L2863 FBUtilities.getReleaseVersionString: https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/utils/FBUtilities.java#L326 Which appears to read the version string from a `Properties` API which appears to be created via this XML file: https://github.com/apache/cassandra/blob/cassandra-3.11.2/build.xml#L790 Internally, Cassandra converts the version string to a `CassandraVersion` object which supports rich comparison. See https://github.com/apache/cassandra/blob/cassandra-3.11.2/src/java/org/apache/cassandra/utils/CassandraVersion.java In Navigator we parse the Cassandra version string as early as possible, into a similar Cassandra Version object. This also fixes the missing Patch number and stores the version internally as a semver. It also keeps a reference to the original version string so that we can report that in our API. So that the version reported in our API matches the version that an administrator expects.

func New

func New(s string) *Version

func (*Version) Equal

func (v *Version) Equal(versionB *Version) bool

func (Version) MarshalJSON

func (v Version) MarshalJSON() ([]byte, error)

func (Version) Semver

func (v Version) Semver() string

func (Version) String

func (v Version) String() string

func (*Version) UnmarshalJSON

func (v *Version) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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