util

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidEKSKubernetesVersion is an error that is returned when the given EKS kubernetes version is invalid.
	ErrInvalidEKSKubernetesVersion = fmt.Errorf("invalid EKS kubernetes version")
	// ErrInvalidEKSKubernetesReleaseVersion is an error that is returned when the given EKS kubernetes release version is invalid.
	ErrInvalidEKSKubernetesReleaseVersion = fmt.Errorf("invalid EKS kubernetes release version")
)

Functions

func CompareEKSKubernetesVersions

func CompareEKSKubernetesVersions(version1, version2 string) (int, error)

CompareEKSKubernetesVersions compares two EKS kubernetes versions and returns 0 if they are equal, -1 if version1 is less than version2, and 1 if version1 is greater than version2. It returns an error if the given versions are not in the expected format.

func GetEKSVersionFromReleaseVersion

func GetEKSVersionFromReleaseVersion(version string) (string, error)

GetEKSVersionFromReleaseVersion returns the EKS kubernetes version from the given release version. It returns an error if the given version is not in the expected format.

For example, given "1.16.8-01012024", it returns "1.16"

func IncrementEKSMinorVersion

func IncrementEKSMinorVersion(version string) (string, error)

IncrementVersionMajor increments the minor version of the given EKS kubernetes version and returns the new version. It returns an error if the given version is not in the expected format.

For example, given "1.16", it returns "1.17"

Types

This section is empty.

Jump to

Keyboard shortcuts

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