Documentation ¶
Index ¶
- func GetCluster(url, clusterName, jwtToken string) (*cr.ClusterSpec, error)
- func GetEnv(key, fallback string, logger echo.Logger) string
- func GetFunctionName(i interface{}) string
- func GetRandomTime(maxTime string, logger echo.Logger) string
- func RunFuncInLoop(f func(interface{}), config interface{}, timeInterval string, ...)
- type ClusterList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCluster ¶
func GetCluster(url, clusterName, jwtToken string) (*cr.ClusterSpec, error)
GetCluster gets cluster from CR
func GetEnv ¶
GetEnv gets env variable with an fallback value, if fallback is empty then env variable is mandatory and if missing exit the program
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
GetFunctionName returns the name ofa function
func GetRandomTime ¶
GetRandomTime returns a random time interval as a string
func RunFuncInLoop ¶
func RunFuncInLoop(f func(interface{}), config interface{}, timeInterval string, offSetStart string, logger echo.Logger)
RunFuncInLoop runs a function in a loop. f is the function to run, timeInterval is the time it waits to run again, offSetStart is the time to wait before the loop starts.
Types ¶
type ClusterList ¶
type ClusterList struct { Items []*cr.ClusterSpec `json:"items"` ItemsCount int `json:"itemsCount"` }
ClusterList ...
func GetClusters ¶
func GetClusters(url, perPageLimit, pageNr, jwtToken string) (*ClusterList, error)
GetClusters gets cluster from CR
Click to show internal directories.
Click to hide internal directories.