k8s

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeStatsList []Node

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Context string
	Version string
	URL     string
}
var K8sinfo Cluster

func ClusterInfo

func ClusterInfo() Cluster

type Node

type Node struct {
	Name                 string
	Capacity_disk        int
	Capacity_memory      int
	Capacity_cpu         int
	Usage_disk           int
	Usage_memory         int
	Usage_cpu            float32
	Free_disk            int
	Free_memory          int
	Free_cpu             float32
	Usage_disk_percent   float32
	Usage_memory_percent float32
	Usage_cpu_percent    float32
	TotalPods            string
	LabelToDisplay       string
	Labels               map[string]string
}

func GetMetricsForNode

func GetMetricsForNode(nodestats *Node, node *core.Node, nm *v1beta1.NodeMetrics, metric string) []Node

This Go function takes in node statistics, node information, node metrics, a specific metric, and returns an array of nodes. responsible for collecting memory, cpu, and disk statistics for each node

func Nodes

func Nodes(inputs *utils.Inputs) (NodeStatsList []Node)

Jump to

Keyboard shortcuts

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