Documentation ¶
Overview ¶
Package version provides build version information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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"` User string `json:"user"` Host string `json:"host"` GolangVersion string `json:"golang_version"` DockerHub string `json:"hub"` BuildStatus string `json:"status"` GitTag string `json:"tag"` }
BuildInfo describes version information about the binary build.
var ( // Info exports the build version information. Info BuildInfo )
func NewBuildInfoFromOldString ¶
NewBuildInfoFromOldString creates a BuildInfo struct based on the output of previous Istio components '-- version' output
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 }
CobraOptions holds options to be passed to `CobraCommandWithOptions`
type GetRemoteVersionFunc ¶
GetRemoteVersionFunc is the function protoype 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 ServerInfo ¶
ServerInfo contains the version for a single control plane component