Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllowedVersions ¶
type AllowedVersions struct { Satellite OldSemVer Storagenode OldSemVer Uplink OldSemVer Gateway OldSemVer Identity OldSemVer Processes Processes `json:"processes"` }
AllowedVersions provides the Minimum SemVer per Service. TODO: I don't think this name is representative of what this struct now holds.
type Info ¶
type Info struct { Timestamp time.Time `json:"timestamp,omitempty"` CommitHash string `json:"commitHash,omitempty"` Version SemVer `json:"version"` Release bool `json:"release,omitempty"` // contains filtered or unexported fields }
Info is the versioning information for a binary
type OldSemVer ¶ added in v0.24.2
type OldSemVer struct { Major int64 `json:"major"` Minor int64 `json:"minor"` Patch int64 `json:"patch"` }
OldSemVer represents a semantic version. NB: this will be deprecated in favor of `SemVer`; these structs marshal to JSON differently.
func NewOldSemVer ¶ added in v0.24.2
NewOldSemVer parses a given version and returns an instance of OldSemVer or an error if unable to parse the version.
type Process ¶ added in v0.21.0
type Process struct { Minimum Version `json:"minimum"` Suggested Version `json:"suggested"` Rollout Rollout `json:"rollout"` }
Process versions for specific binary.
type Processes ¶ added in v0.21.0
type Processes struct { Satellite Process `json:"satellite"` Storagenode Process `json:"storagenode"` StoragenodeUpdater Process `json:"storagenode-updater"` Uplink Process `json:"uplink"` Gateway Process `json:"gateway"` Identity Process `json:"identity"` }
Processes describes versions for each binary. TODO: this name is inconsistent with the versioncontrol server pkg's analogue, `Versions`.
type Rollout ¶ added in v0.24.0
type Rollout struct { Seed RolloutBytes `json:"seed"` Cursor RolloutBytes `json:"cursor"` }
Rollout represents the state of a version rollout.
type RolloutBytes ¶ added in v0.24.0
type RolloutBytes [32]byte
RolloutBytes implements json un/marshalling using hex de/encoding.
func PercentageToCursor ¶ added in v0.24.0
func PercentageToCursor(pct int) RolloutBytes
PercentageToCursor calculates the cursor value for the given percentage of nodes which should update.
func (RolloutBytes) MarshalJSON ¶ added in v0.24.0
func (rb RolloutBytes) MarshalJSON() ([]byte, error)
MarshalJSON hex-encodes RolloutBytes and pre/appends JSON string literal quotes.
func (*RolloutBytes) UnmarshalJSON ¶ added in v0.24.0
func (rb *RolloutBytes) UnmarshalJSON(b []byte) error
UnmarshalJSON drops the JSON string literal quotes and hex-decodes RolloutBytes .
type SemVer ¶
SemVer represents a semantic version. TODO: replace with semver.Version
func NewSemVer ¶
NewSemVer parses a given version and returns an instance of SemVer or an error if unable to parse the version.
func (*SemVer) Compare ¶ added in v0.21.0
Compare compare two versions, return -1 if compared version is greater, 0 if equal and 1 if less.