metrics

package
v0.0.0-...-cb9ab9a Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeUsage

type NodeUsage struct {
	NodeName     string
	NodeCpuUsage int
	NodeMemUsage int
}

func GetNodeMetrics

func GetNodeMetrics(kubeConfig string) ([]NodeUsage, error)

1. Creates a config object from the kubeconfig file provided 2. Creates a clientset (groups of client) from the config object 3. Calls the appropriate function to get the metrics from the given API 4. Creates a slice of struct elements having resource usage and returns it back

type PodUsage

type PodUsage struct {
	PodName     string
	PodCpuUsage int
	PodMemUsage int
}

func GetPodMetrics

func GetPodMetrics(kubeConfig string) ([]PodUsage, error)

Jump to

Keyboard shortcuts

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