Documentation ¶
Overview ¶
Package version provides helpers for working with versions and build info.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Component name, e.g. "pmm-managed" or "mongodb_exporter". // {{ .ProjectName }} for GoReleaser. ProjectName string // Component version, e.g. "2.1.2-beta1" for pmm-managed or "0.6.3" for mongodb_exporter. // {{ .Version }} for GoReleaser. Version string // PMM version. Empty for non-PMM builds. // For example, "2.1.2-beta1" for mongodb_exporter when built with PMM Client, empty otherwise. PMMVersion string // Build UNIX timestamp, e.g. "1545226908". // {{ .Timestamp }} for GoReleaser. Timestamp string // Full git commit hash, e.g. "6559a94ab33831deeda04193f74413b735edb1a1". // {{ .FullCommit }} for GoReleaser. FullCommit string // Git branch name, e.g. "master". Branch string )
Functions ¶
Types ¶
type PackageInfo ¶
type PackageInfo struct { Version string `json:"version"` FullVersion string `json:"full_version"` BuildTime *time.Time `json:"build_time"` Repo string `json:"repo"` }
PackageInfo describes a single package version.
type UpdateCheckResult ¶
type UpdateCheckResult struct { Installed PackageInfo `json:"installed"` Latest PackageInfo `json:"latest,omitempty"` UpdateAvailable bool `json:"update_available"` }
UpdateCheckResult represents `pmm-update -check` result.
type UpdateInstalledResult ¶
type UpdateInstalledResult struct {
Installed PackageInfo `json:"installed"`
}
UpdateInstalledResult represents `pmm-update -installed` result.
Click to show internal directories.
Click to hide internal directories.