version

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterVersionInfo

type ClusterVersionInfo struct {
	// ClientVersion denotes the version of Virtlet command line tool
	ClientVersion Info `json:"clientVersion"`
	// NodeVersions specify versions for each node that runs Virtlet
	NodeVersions []Info `json:"nodeVersions,omitempty"`
}

ClusterVersionInfo specifies Virtlet version info for the whole cluster and the client

func (ClusterVersionInfo) AreNodesConsistent

func (v ClusterVersionInfo) AreNodesConsistent() bool

AreNodesConsistent returns true if all the nodes that run Virtlet run exactly same Virtlet build

func (ClusterVersionInfo) ToBytes

func (v ClusterVersionInfo) ToBytes(format string) ([]byte, error)

ToBytes returns a text representation of ClusterVersionInfo using the specified format which can be one of "text", "short", "json" or "yaml"

type Info

type Info struct {
	// NodeName denotes the name of the node this info belongs too
	// (empty if not applicable)
	NodeName string `json:",omitempty"`
	// Major is the major version number
	Major string `json:"major"`
	// Minor is the minor version number
	Minor string `json:"minor"`
	// GitVersion is the full version string
	GitVersion string `json:"gitVersion"`
	// GitCommit is the git commit id
	GitCommit string `json:"gitCommit"`
	// GitTreeState is the git tree state, which can be either "clean" or "dirty"
	GitTreeState string `json:"gitTreeState"`
	// BuildDate is the build date, e.g. 2018-04-16T18:48:12Z
	BuildDate string `json:"buildDate"`
	// GoVersion is the Go version that was used to build Virtlet
	GoVersion string `json:"goVersion"`
	// Compiler is the name of the compiler toolchain that
	// built the binary (either "gc" or "gccgo")
	Compiler string `json:"compiler"`
	// Platform denotes the platform such as "linux" or "darwin"
	Platform string `json:"platform"`
	// ImageTag specifies the image tag to use for Virtelt
	ImageTag string `json:"imageTag"`
}

Info specifies Virtlet version info

func Get

func Get() Info

Get returns the codebase version.

func (Info) ToBytes

func (v Info) ToBytes(format string) ([]byte, error)

ToBytes returns a text representation of Info using the specified format which can be one of "text", "short", "json" or "yaml"

Jump to

Keyboard shortcuts

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