utils

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package utils offers functions of general utility in other parts of the system

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenericToRuntime

func GenericToRuntime(obj map[string]interface{}, rtObj interface{}) error

GenericToRuntime converts a generic object to a Runtime object

func Retry

func Retry(timeout time.Duration, backoff time.Duration, f func() (bool, error)) (bool, error)

Retry retries a function until it returns true, error, or the timeout expires. If the function returns false, a new attempt is tried after the backoff period

func RuntimeToGeneric

func RuntimeToGeneric(obj interface{}) (map[string]interface{}, error)

RuntimeToGeneric converts a runtime object in a unstructured object

func RuntimeToUnstructured

func RuntimeToUnstructured(obj interface{}) (*unstructured.Unstructured, error)

RuntimeToUnstructured converts a runtime object in a unstructured object

func UnstructuredToRuntime

func UnstructuredToRuntime(uObj *unstructured.Unstructured, obj interface{}) error

UnstructuredToRuntime converts an unstructured object in a runtime object

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL