version

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsKnownFormat added in v0.33.0

func IsKnownFormat(v string) bool

IsKnownFormat reports whether v parses as one of the four appliance version formats — the same validity rule UpdateAvailable uses, unlike the looser IsValidAgentVersion which accepts anything non-empty and non-"unknown".

func IsUpdateSupported added in v0.33.0

func IsUpdateSupported(runningVersion, minVersionUpdateSupported string) bool

IsUpdateSupported reports whether the running appliance version can be updated in place to the served image: same channel as the minimum and not numerically older than it. Not comparable (different channel, missing numbers, invalid) gives no signal — the gate only blocks on a proven comparison, so it fails open.

func IsValidAgentVersion added in v0.8.0

func IsValidAgentVersion(ver string) bool

IsValidAgentVersion reports whether ver is usable for agent version comparison and persistence. Empty string and "unknown" are treated as missing.

func MinApplianceVersion added in v0.33.0

func MinApplianceVersion() string

MinApplianceVersion returns the oldest appliance version the served image supports in-place updates from; empty means no gating.

func SameChannel added in v0.33.0

func SameChannel(a, b string) bool

SameChannel reports whether both versions have a known appliance format and belong to the same release channel. Invalid versions are never comparable.

func SetAgentVersionName added in v0.33.0

func SetAgentVersionName(v string)

SetAgentVersionName overrides the served appliance version. The ldflag is unset under go test, so tests set it explicitly instead of skipping.

func SetMinApplianceVersion added in v0.33.0

func SetMinApplianceVersion(v string)

SetMinApplianceVersion overrides the in-place update minimum for tests.

func UpdateAvailable added in v0.33.0

func UpdateAvailable(served, deployed string) bool

UpdateAvailable reports whether the served appliance version differs from the deployed one per the channel-aware rule: any difference within a channel (numbers or sha) is an update; anything not comparable gives no signal. The served version is only ever what the SaaS distributes, so a differing sha means the served generation is newer.

Types

type Info

type Info struct {
	Major               string `json:"major"`
	Minor               string `json:"minor"`
	GitVersion          string `json:"gitVersion"`
	GitCommit           string `json:"gitCommit"`
	GitTreeState        string `json:"gitTreeState"`
	BuildDate           string `json:"buildDate"`
	GoVersion           string `json:"goVersion"`
	Compiler            string `json:"compiler"`
	Platform            string `json:"platform"`
	Patch               string `json:"patch"`
	AgentGitCommit      string `json:"agentGitCommit"`
	AgentVersionName    string `json:"agentVersionName"`
	MinApplianceVersion string `json:"minApplianceVersion"`
}

func Get

func Get() Info

func (Info) String

func (info Info) String() string

Jump to

Keyboard shortcuts

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