Documentation
¶
Index ¶
- Constants
- func GetStoreValues(ctx context.Context, client client.Client, store *druidv1alpha1.StoreSpec, ...) (map[string]interface{}, error)
- func IsPodInCrashloopBackoff(status v1.PodStatus) bool
- func Key(namespaceOrName string, nameOpt ...string) client.ObjectKey
- func Max(x, y int) int
- 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, error)
- func TimeElapsed(timestamp *metav1.Time, duration time.Duration) bool
- func ValueExists(value string, list []string) bool
Constants ¶
const ( // LocalProviderDefaultMountPath is the default path where the buckets directory is mounted. LocalProviderDefaultMountPath = "/etc/gardener/local-backupbuckets" // EtcdBackupSecretHostPath is the hostPath field in the etcd-backup secret. EtcdBackupSecretHostPath = "hostPath" )
const (
Local = "Local"
)
Variables ¶
This section is empty.
Functions ¶
func GetStoreValues ¶ added in v0.7.0
func GetStoreValues(ctx context.Context, client client.Client, store *druidv1alpha1.StoreSpec, namespace string) (map[string]interface{}, error)
GetStoreValues converts the values in the StoreSpec to a map, or returns an error if the storage provider is unsupported.
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, error)
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.