Documentation ¶
Index ¶
- Variables
- func DeleteItemFromSlice(x any, index int) any
- func Diff(expected, current any) string
- func DiffMapString(expected, current map[string]string, excludeKeys []string) string
- func Get(m map[string]any, key string) (value any, err error)
- func GetKubeClientTimeoutFromEnv() (timeout time.Duration, err error)
- func GetLogrusFormatterFromEnv() logrus.Formatter
- func GetLogrusLogLevelFromEnv() logrus.Level
- func GetWatchNamespaceFromEnv() (ns string, err error)
- func GetZapFormatterFromDev() zapcore.Encoder
- func GetZapLogLevelFromEnv() zapcore.Level
- func HasCRD(kclient *kubernetes.Clientset, groupVersion schema.GroupVersion) bool
- func Merge(dst any, srcs ...any) (err error)
- func PrintVersion(logger logr.Logger, metricsAddr, probeAddr string)
- func RandomString(length int) string
- func StringToSlice(value, separator string) (result []string)
- func ToSliceOfObject(s any) []client.Object
- func UnZipBase64Decode(original string, originalObject any) error
- func ZipAndBase64Encode(originalObject any) (string, error)
Constants ¶
This section is empty.
Variables ¶
var ErrKeyNotFound error = errors.Sentinel("Key not found in map")
Functions ¶
func DeleteItemFromSlice ¶ added in v0.1.3
DeleteItemFromSlice is a generic function to remove item from a slice
func Diff ¶ added in v0.1.3
Diff is cmp.Diff with custom function to compare slices with pretty.Sprint
func DiffMapString ¶ added in v0.1.3
DiffMapString permit to diff map[string]string
func GetKubeClientTimeoutFromEnv ¶ added in v0.1.3
func GetLogrusFormatterFromEnv ¶ added in v0.1.3
func GetLogrusLogLevelFromEnv ¶ added in v0.1.3
func GetWatchNamespaceFromEnv ¶ added in v0.1.3
func GetZapFormatterFromDev ¶ added in v0.1.3
func GetZapLogLevelFromEnv ¶ added in v0.1.3
func HasCRD ¶ added in v0.1.7
func HasCRD(kclient *kubernetes.Clientset, groupVersion schema.GroupVersion) bool
HasCRD checks if the Kubernetes server supports the given groupVersion for CustomResourceDefinition.
Parameters: - kclient: A pointer to a Kubernetes clientset. - groupVersion: The groupVersion of the CustomResourceDefinition to check.
Returns: - bool: True if the server supports the given groupVersion, false otherwise.
func Merge ¶ added in v0.1.3
Merge permit to merge unlimited same interface. The last src is the higher priority If some src are nil, it skip it It return error if dst is nil
func PrintVersion ¶ added in v0.1.3
func RandomString ¶ added in v0.1.3
RandomString generates a random string from a subset of characters
func StringToSlice ¶ added in v0.1.3
StringToSlice permit to convert string with separator to slice Is like strings.Split with trimSpaces each items
func ToSliceOfObject ¶ added in v0.1.3
ToSliceOfObject permit to convert any slice of object to slice of client.Object Slice must not contain pointer
func UnZipBase64Decode ¶ added in v0.1.3
func ZipAndBase64Encode ¶ added in v0.1.3
Types ¶
This section is empty.