Documentation ¶
Index ¶
- func Equal[K comparable, V comparable](a map[K]V, b map[K]V) bool
- func FilterKeys[K comparable, V any](a map[K]V, keys []K) map[K]V
- func FormatBinarySI(q int64) string
- func InverseMap[K comparable, V comparable](a map[K]V) map[V]K
- func MergeMaps[K comparable, V any](a map[K]V, b map[K]V) map[K]V
- func Min(a, b int) int
- func NewULID() string
- func RetryUntilSuccess(ctx *armadacontext.Context, performAction func() error, onError func(error))
- func StringFromUlid(id ulid.ULID) string
- func StringListToSet(list []string) map[string]bool
- func SubtractStringList(a []string, b []string) []string
- func Truncate(s string, max int) string
- func ULID() ulid.ULID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
func Equal[K comparable, V comparable](a map[K]V, b map[K]V) bool
func FilterKeys ¶
func FilterKeys[K comparable, V any](a map[K]V, keys []K) map[K]V
func FormatBinarySI ¶
func InverseMap ¶
func InverseMap[K comparable, V comparable](a map[K]V) map[V]K
InverseMap creates a new map where each key: value pair is swapped If the same value is present multiple times, a random one will be selected (depending on map key-value iteration)
func MergeMaps ¶
func MergeMaps[K comparable, V any](a map[K]V, b map[K]V) map[K]V
func NewULID ¶
func NewULID() string
NewULID returns a new ULID for the current time generated from a global RNG. The ULID is returned as a string converted to lower-case to ensure it is a valid DNS subdomain name; see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names
func RetryUntilSuccess ¶ added in v0.3.91
func RetryUntilSuccess(ctx *armadacontext.Context, performAction func() error, onError func(error))
func StringFromUlid ¶
StringFromUlid returns a string representation of a proto UUID. Because Kubernetes requires ids to be valid DNS subdomain names, the string is returned in lower-case; see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names
func StringListToSet ¶
func SubtractStringList ¶
Types ¶
This section is empty.