libinfra

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsCrt

func ContainsCrt(bundle []byte, containedCrt []byte) bool

func ExpectResumingNodeLabellerToSucceed

func ExpectResumingNodeLabellerToSucceed(nodeName string, virtClient kubecli.KubevirtClient) *k8sv1.Node

func ExpectStoppingNodeLabellerToSucceed

func ExpectStoppingNodeLabellerToSucceed(nodeName string, virtClient kubecli.KubevirtClient) *k8sv1.Node

func GetDownwardMetricsDisk

func GetDownwardMetricsDisk(vmi *v1.VirtualMachineInstance) (*api.Metrics, error)

func GetDownwardMetricsVirtio

func GetDownwardMetricsVirtio(vmi *v1.VirtualMachineInstance) (*api.Metrics, error)

func GetHostnameFromMetrics

func GetHostnameFromMetrics(metrics *api.Metrics) string

func GetKeysFromMetrics

func GetKeysFromMetrics(metrics map[string]float64) []string

func GetLeader

func GetLeader() string

func GetMetricKeyForVmiDisk

func GetMetricKeyForVmiDisk(keys []string, vmiName string, diskName string) string

func GetNewLeaderPod

func GetNewLeaderPod(virtClient kubecli.KubevirtClient) *v12.Pod

func GetSupportedIP

func GetSupportedIP(ips []string, family v1.IPFamily) string

func GetTimeFromMetrics

func GetTimeFromMetrics(metrics *api.Metrics) int

func ParseMetricsToMap

func ParseMetricsToMap(lines []string) (map[string]float64, error)

func TakeMetricsWithPrefix

func TakeMetricsWithPrefix(output, prefix string) []string

func ValidatedHTTPResponses

func ValidatedHTTPResponses(errorsChan chan error, concurrency int) error

ValidatedHTTPResponses checks the HTTP responses. It expects timeout errors, due to the throttling on the producer side. In case of unexpected errors or no errors at all it would fail, returning the first unexpected error if any, or a custom error in case there were no errors at all.

func WakeNodeLabellerUp

func WakeNodeLabellerUp(virtClient kubecli.KubevirtClient)

Types

type MetricsGetter

type MetricsGetter func(vmi *v1.VirtualMachineInstance) (*api.Metrics, error)

Jump to

Keyboard shortcuts

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