Documentation ¶
Index ¶
- func Contains(haystack []string, key string) bool
- func ContainsWithPrefix(haystack []string, prefix string) bool
- func CreateConfigFromYamlString(extras string, name string, keyValues map[string]string, exclusions ...string) (string, map[string]string)
- func Float64Or(envVar string, def float64) float64
- func Int32Or(envVar string, def int32) int32
- func Int64Or(envVar string, def int64) int64
- func IsOrdinalObjectIdle(ordinalObjName string, replicas int) bool
- func RandomBytes(len int) ([]byte, error)
- func RandomString(len int) (string, error)
- func Remove(key string, haystack []string) []string
- func RequireFloat64(envVar string) float64
- func RequireValue(envVar string) string
- func Value(envVar string) string
- func ValueOr(envVar, def string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsWithPrefix ¶ added in v0.1.9
ContainsWithPrefix check if the haystack contains a string with the prefix
func CreateConfigFromYamlString ¶
func CreateConfigFromYamlString(extras string, name string, keyValues map[string]string, exclusions ...string) (string, map[string]string)
CreateConfigFromYamlString create a config string from a key-value map updated with the yaml extras excluding exclusions
func IsOrdinalObjectIdle ¶ added in v0.10.4
IsOrdinalObjectIdle checks whether the ordinal object is idle. E.g for PVC, it means it's not longer attached to any pod.
func RandomBytes ¶
RandomBytes generates a random bytes of len len or error
func RandomString ¶
RandomString generates a random base64 string of length len or err
func Remove ¶
Remove returns a slice of haystack with the key removed if present otherwise returns the haystack itself
func RequireFloat64 ¶
RequireFloat64 returns the env variable as int64 or panic
func RequireValue ¶
RequireValue returns the env Value or panic if none exists
Types ¶
This section is empty.