Documentation
¶
Index ¶
- func CheckAlertExists(virtClient kubecli.KubevirtClient, alertName string) bool
- func DoPrometheusHTTPRequest(cli kubecli.KubevirtClient, endpoint string) []byte
- func GetAlerts(cli kubecli.KubevirtClient) ([]prometheusv1.Alert, error)
- func GetKubevirtVMMetrics(pod *k8sv1.Pod, ip string) string
- func GetMetricValueWithLabels(cli kubecli.KubevirtClient, query string, labels map[string]string) (float64, error)
- func KillPortForwardCommand(portForwardCmd *exec.Cmd) error
- func PrepareMetricsURL(ip string, port int) string
- func ReduceAlertPendingTime(virtClient kubecli.KubevirtClient)
- func VerifyAlertExist(virtClient kubecli.KubevirtClient, alertName string)
- func VerifyAlertExistWithCustomTime(virtClient kubecli.KubevirtClient, alertName string, timeout time.Duration)
- func WaitForMetricValue(client kubecli.KubevirtClient, metric string, expectedValue float64)
- func WaitForMetricValueWithLabels(client kubecli.KubevirtClient, metric string, expectedValue float64, ...)
- func WaitForMetricValueWithLabelsToBe(client kubecli.KubevirtClient, metric string, labels map[string]string, ...)
- func WaitForPortForwardCmd(stdout io.ReadCloser, src, dst int)
- func WaitUntilAlertDoesNotExist(virtClient kubecli.KubevirtClient, alertNames ...string)
- func WaitUntilAlertDoesNotExistWithCustomTime(virtClient kubecli.KubevirtClient, timeout time.Duration, alertNames ...string)
- type AlertRequestResult
- type QueryRequestResult
- type Scaling
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAlertExists ¶
func CheckAlertExists(virtClient kubecli.KubevirtClient, alertName string) bool
func DoPrometheusHTTPRequest ¶
func DoPrometheusHTTPRequest(cli kubecli.KubevirtClient, endpoint string) []byte
func GetAlerts ¶
func GetAlerts(cli kubecli.KubevirtClient) ([]prometheusv1.Alert, error)
func KillPortForwardCommand ¶
func PrepareMetricsURL ¶
func ReduceAlertPendingTime ¶
func ReduceAlertPendingTime(virtClient kubecli.KubevirtClient)
func VerifyAlertExist ¶
func VerifyAlertExist(virtClient kubecli.KubevirtClient, alertName string)
func VerifyAlertExistWithCustomTime ¶
func VerifyAlertExistWithCustomTime(virtClient kubecli.KubevirtClient, alertName string, timeout time.Duration)
func WaitForMetricValue ¶
func WaitForMetricValue(client kubecli.KubevirtClient, metric string, expectedValue float64)
func WaitForMetricValueWithLabelsToBe ¶ added in v1.4.0
func WaitForPortForwardCmd ¶
func WaitForPortForwardCmd(stdout io.ReadCloser, src, dst int)
func WaitUntilAlertDoesNotExist ¶
func WaitUntilAlertDoesNotExist(virtClient kubecli.KubevirtClient, alertNames ...string)
func WaitUntilAlertDoesNotExistWithCustomTime ¶
func WaitUntilAlertDoesNotExistWithCustomTime(virtClient kubecli.KubevirtClient, timeout time.Duration, alertNames ...string)
Types ¶
type AlertRequestResult ¶
type AlertRequestResult struct { Alerts prometheusv1.AlertsResult `json:"data"` Status string `json:"status"` }
type QueryRequestResult ¶
type QueryRequestResult struct { Data promData `json:"data"` Status string `json:"status"` }
func QueryRange ¶
type Scaling ¶
type Scaling struct {
// contains filtered or unexported fields
}
func NewScaling ¶
func NewScaling(virtClient kubecli.KubevirtClient, deployments []string) *Scaling
func (*Scaling) BackupScale ¶
func (*Scaling) RestoreAllScales ¶
func (s *Scaling) RestoreAllScales()
func (*Scaling) RestoreScale ¶
func (*Scaling) UpdateScale ¶
Click to show internal directories.
Click to hide internal directories.