monitoring

package
v0.0.0-...-2cb4bbe Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package monitoring provides common methods for all the monitoring components used in the tests

This package exposes following methods:

CheckPortAvailability(port int) error
	Checks if the given port is available
GetPods(kubeClientset kubernetes.Interface, app string) (*v1.PodList, error)
	Gets the list of pods that satisfy the label selector app=<app>
Cleanup(pid int) error
	Kill the current port forwarding process running in the background
PortForward(logf logging.FormatLogger, podList *v1.PodList, localPort, remotePort int) (int, error)
	Create a background process that will port forward the first pod from the local to remote port
	It returns the process id for the background process created.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPortAvailability

func CheckPortAvailability(port int) error

CheckPortAvailability checks to see if the port is available on the machine.

func Cleanup

func Cleanup(pid int) error

Cleanup will clean the background process used for port forwarding

func GetPods

func GetPods(ctx context.Context, kubeClientset kubernetes.Interface, app, namespace string) (*v1.PodList, error)

GetPods retrieves the current existing podlist for the app in monitoring namespace This uses app=<app> as labelselector for selecting pods

func PortForward

func PortForward(logf logging.FormatLogger, podList *v1.PodList, localPort, remotePort int, namespace string) (int, error)

PortForward sets up local port forward to the pod specified by the "app" label in the given namespace

Types

This section is empty.

Jump to

Keyboard shortcuts

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