helpers

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllNamespace

func GetAllNamespace(clientset *kubernetes.Clientset, ctx context.Context) ([]v1.Namespace, error)

Get All Namespaces in the cluster

func GetAllPods

func GetAllPods(excludeNamespace *[]string, matchNamespace string, clientset *kubernetes.Clientset, ctx context.Context) ([]v1.Pod, error)

Get all Pods

func GetPodStats

func GetPodStats(pod v1.Pod, podChan chan<- domain.K8sStats, wg *sync.WaitGroup)

func GetPodsByNamespace

func GetPodsByNamespace(clientset *kubernetes.Clientset, ctx context.Context, namespace string, podChan chan<- []v1.Pod, wg *sync.WaitGroup)

Get all Pods for a given namespace

func WriteOutputAsCsv

func WriteOutputAsCsv(resources *[]domain.K8sStats, groupByNamespace bool, csvFilePath string)

Write data to a .CSV file

func WriteOutputAsTable

func WriteOutputAsTable(resources *[]domain.K8sStats, groupByNamespace bool)

Write data to Output STDOUT as Table

func WriteOutputAsXlsx added in v1.2.0

func WriteOutputAsXlsx(resources *[]domain.K8sStats, groupByNamespace bool, xlsxFilePath string)

Write data to a .XLSX file

Types

This section is empty.

Jump to

Keyboard shortcuts

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