Documentation ¶
Index ¶
- func IsPodInCrashloopBackoff(status v1.PodStatus) bool
- func Key(namespaceOrName string, nameOpt ...string) client.ObjectKey
- func MergeMaps(a, b map[string]interface{}) map[string]interface{}
- func MergeStringMaps(oldMap map[string]string, newMaps ...map[string]string) map[string]string
- func StorageProviderFromInfraProvider(infra *druidv1alpha1.StorageProvider) string
- func TimeElapsed(timestamp *metav1.Time, duration time.Duration) bool
- func ValueExists(value string, list []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPodInCrashloopBackoff ¶ added in v0.1.4
IsPodInCrashloopBackoff checks if the pod is in CrashloopBackoff from its status fields.
func Key ¶
Key creates a new client.ObjectKey from the given parameters. There are only two ways to call this function:
- If only namespaceOrName is set, then a client.ObjectKey with name set to namespaceOrName is returned.
- If namespaceOrName and one nameOpt is given, then a client.ObjectKey with namespace set to namespaceOrName and name set to nameOpt[0] is returned.
For all other cases, this method panics.
func MergeMaps ¶
MergeMaps takes two maps <a>, <b> and merges them. If <b> defines a value with a key already existing in the <a> map, the <a> value for that key will be overwritten.
func MergeStringMaps ¶
MergeStringMaps merges the content of the newMaps with the oldMap. If a key already exists then it gets overwritten by the last value with the same key.
func StorageProviderFromInfraProvider ¶
func StorageProviderFromInfraProvider(infra *druidv1alpha1.StorageProvider) string
StorageProviderFromInfraProvider converts infra to object store provider.
func TimeElapsed ¶
TimeElapsed takes a <timestamp> and a <duration> checks whether the elapsed time until now is less than the <duration>. If yes, it returns true, otherwise it returns false.
func ValueExists ¶
ValueExists returns true or false, depending on whether the given string <value> is part of the given []string list <list>.
Types ¶
This section is empty.