utils

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MergeTags

func MergeTags(tags ...map[string]string) []ec2types.Tag

MergeTags takes a variadic list of maps and merges them together into a list of EC2 tags to be passed into EC2 API calls

func ParseInstanceID

func ParseInstanceID(providerID string) (string, error)

ParseInstanceID parses the provider ID stored on the node to get the instance ID associated with a node

func PrettySlice

func PrettySlice[T any](s []T, maxItems int) string

PrettySlice truncates a slice after a certain number of max items to ensure that the Slice isn't too long

func WithDefaultFloat64 added in v1.0.0

func WithDefaultFloat64(key string, def float64) float64

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.

Jump to

Keyboard shortcuts

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