util

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: UPL-1.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRetry = wait.Backoff{
	Steps:    12,
	Duration: 5 * time.Second,
	Factor:   1.0,
	Jitter:   0.1,
}

DefaultRetry is the default backoff for e2e tests.

Functions

func GetManagedClusterKubeconfigSecretName

func GetManagedClusterKubeconfigSecretName(clusterID string) string

GetManagedClusterKubeconfigSecretName returns the secret for a managed cluster

func GetManagedClusterLabels

func GetManagedClusterLabels(managedClusterID string) map[string]string

GetManagedClusterLabels return labels for a managed cluster

func Retry

func Retry(backoff wait.Backoff, fn wait.ConditionFunc) error

Retry executes the provided function repeatedly, retrying until the function returns done = true, errors, or exceeds the given timeout.

func SendRequest

func SendRequest(action, reqURL, host string, headers map[string]string, parameterMap map[string]string, payload string, reqUserName string, reqPassword string, caData []byte) (*http.Response, string, error)

SendRequest sends http request

func WaitForSendRequest

func WaitForSendRequest(action, reqURL, host string, headers, parameterMap map[string]string, payload, reqUserName, reqPassword string, caData []byte, backoff wait.Backoff) (latestResponse *http.Response, latestResponseBody string, err error)

WaitForSendRequest waits for the given request to return results

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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