Documentation
¶
Index ¶
- Constants
- Variables
- func CanManageSnapshot() bool
- func CanManageVersion(v string) bool
- func CheckConstraintAgainstAstarteComponentVersion(constraint, componentVersion, astarteVersion string) error
- func CheckConstraintAgainstAstarteVersion(constraint, v string) error
- func GetAstarteSemanticVersionFrom(v string) (*semver.Version, error)
- func GetVersionForAstarteComponent(astarteVersion, componentVersion string) string
Constants ¶
const ( // Version is the Operator's version Version = "1.0.4" // AstarteVersionConstraintString represents the range of supported Astarte versions for this Operator. // If the Astarte version falls out of this range, reconciliation will be immediately aborted. AstarteVersionConstraintString = ">= 0.10.0, < 1.1.0" // SnapshotVersion represents the name of the master/snapshot version, which can or cannot be installed // by this cluster SnapshotVersion = "snapshot" )
Variables ¶
var ( // ErrConstraintNotSatisfied means the check happened correctly, but the constraint wasn't satisfied ErrConstraintNotSatisfied = errors.New("constraint not satisfied") )
Functions ¶
func CanManageSnapshot ¶ added in v1.0.0
func CanManageSnapshot() bool
CanManageSnapshot returns whether the Operator can handle snapshot or not. We assume it can in case the Operator itself is a prerelease
func CanManageVersion ¶ added in v1.0.0
CanManageVersion returns whether the Operator can manage the given version.
func CheckConstraintAgainstAstarteComponentVersion ¶ added in v1.0.0
func CheckConstraintAgainstAstarteComponentVersion(constraint, componentVersion, astarteVersion string) error
CheckConstraintAgainstAstarteComponentVersion checks a constraint against a specialized Astarte component version
func CheckConstraintAgainstAstarteVersion ¶ added in v1.0.0
CheckConstraintAgainstAstarteVersion validates a given Astarte version against a given constraint. Returns nil if the constraint is satisfied, an error otherwise
func GetAstarteSemanticVersionFrom ¶ added in v1.0.0
GetAstarteSemanticVersionFrom returns a semver object out of an Astarte version string, returning an error also if the version does not adhere to constraints or isn't supported by the Operator
func GetVersionForAstarteComponent ¶ added in v1.0.0
GetVersionForAstarteComponent returns the version for a given Astarte Component
Types ¶
This section is empty.