Documentation ¶
Overview ¶
Package version provides build version information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Info exports the build version information. Info BuildInfo DockerInfo DockerBuildInfo )
Functions ¶
func CobraCommand ¶
CobraCommand returns a command used to print version information.
func CobraCommandWithOptions ¶
func CobraCommandWithOptions(options CobraOptions) *cobra.Command
CobraCommandWithOptions returns a command used to print version information. It accepts an CobraOptions argument that might modify its behavior
Types ¶
type BuildInfo ¶
type BuildInfo struct { Version string `json:"version"` GitRevision string `json:"revision"` GolangVersion string `json:"golang_version"` BuildStatus string `json:"status"` GitTag string `json:"tag"` }
BuildInfo describes version information about the binary build.
func (BuildInfo) RecordComponentBuildTag ¶
RecordComponentBuildTag sets the value for a metric that will be used to track component build tags for tracking rollouts, etc.
type CobraOptions ¶
type CobraOptions struct { // GetRemoteVersion is the function to be invoked to retrieve remote versions for // Istio components. Optional. If not set, the 'version' subcommand will not attempt // to connect to a remote side, and CLI flags such as '--remote' will be hidden. GetRemoteVersion GetRemoteVersionFunc GetProxyVersions GetProxyVersionFunc }
CobraOptions holds options to be passed to `CobraCommandWithOptions`
type DockerBuildInfo ¶
DockerBuildInfo contains and exposes Hub: buildHub, Tag: buildVersion, OS: buildOS, and Arch: buildArch
type GetProxyVersionFunc ¶
GetRemoteVersionFunc is the function prototype to be passed to CobraOptions so that it is called when invoking `cmd version`
type GetRemoteVersionFunc ¶
GetRemoteVersionFunc is the function prototype to be passed to CobraOptions so that it is called when invoking `cmd version`
type MeshInfo ¶
type MeshInfo []ServerInfo
MeshInfo contains the versions for all Istio control plane components
type NodeType ¶
type NodeType string
NodeType decides the responsibility of the proxy serves in the mesh
func ToUserFacingNodeType ¶
type ServerInfo ¶
ServerInfo contains the version for a single control plane component
type Version ¶
type Version struct { ClientVersion *BuildInfo `json:"clientVersion,omitempty" yaml:"clientVersion,omitempty"` MeshVersion *MeshInfo `json:"meshVersion,omitempty" yaml:"meshVersion,omitempty"` DataPlaneVersion *[]ProxyInfo `json:"dataPlaneVersion,omitempty" yaml:"dataPlaneVersion,omitempty"` }
Version holds info for client and control plane versions