podmodel

package
v3.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilters

func ApplyFilters(m PodUsage) []k8s.Pod

func DebugView

func DebugView(m PodUsage, output *strings.Builder)

func FilterForColor

func FilterForColor(m PodUsage) []k8s.Pod

func FilterForLabel

func FilterForLabel(m PodUsage) []k8s.Pod

func FilterForNode

func FilterForNode(m PodUsage) []k8s.Pod

func GetBar

func GetBar(decider float64) progress.Model

func MetricsHandler

func MetricsHandler(m PodUsage, output *strings.Builder)

func PrintDesign

func PrintDesign(output *strings.Builder, maxNameWidth int, maxNsWidth int, isMetricsDisk bool)

func RightMetric

func RightMetric(m PodUsage, index int) float32

func SortByHandler

func SortByHandler(m PodUsage)

Types

type PodUsage

type PodUsage struct {
	ClusterInfo k8s.Cluster
	Podstats    []k8s.Pod
	Args        *utils.Inputs
	Format      string
	// contains filtered or unexported fields
}

podusage is the Bubble Tea model.

func NewPodUsage

func NewPodUsage(args *utils.Inputs) PodUsage

NewPodUsage creates a new PodUsage model

func (PodUsage) Init

func (m PodUsage) Init() tea.Cmd

Init Bubble Tea podusage

func (PodUsage) Update

func (m PodUsage) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update method for Bubble Tea - for constant update loop

func (PodUsage) View

func (m PodUsage) View() string

View renders bubble tea

Jump to

Keyboard shortcuts

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