Documentation ¶
Index ¶
- func GetAllSingleValuedRequirementLabels(instanceType *cloudprovider.InstanceType) map[string]string
- func GetCapacityTypes(spotStrategy string) string
- func Hash(str string) string
- func ParseISO8601(timeStr string) (time.Time, error)
- func ParseInstanceID(providerID string) (string, error)
- func PrettySlice[T any](s []T, maxItems int) string
- func WithDefaultFloat64(key string, def float64) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllSingleValuedRequirementLabels ¶
func GetAllSingleValuedRequirementLabels(instanceType *cloudprovider.InstanceType) map[string]string
GetAllSingleValuedRequirementLabels converts instanceType.Requirements to labels Like instanceType.Requirements.Labels() it uses single-valued requirements Unlike instanceType.Requirements.Labels() it does not filter out restricted Node labels
func GetCapacityTypes ¶
func ParseISO8601 ¶
ParseISO8601 parses the given time string into a time.Time object
func ParseInstanceID ¶
ParseInstanceID parses the provider ID stored on the node to get the instance ID associated with a node
func PrettySlice ¶
PrettySlice truncates a slice after a certain number of max items to ensure that the Slice isn't too long
func WithDefaultFloat64 ¶
WithDefaultFloat64 returns the float64 value of the supplied environment variable or, if not present, the supplied default value. If the float64 conversion fails, returns the default
Types ¶
This section is empty.