nodemodel

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 NodeUsage) []k8s.Node

func DebugView

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

func FilterForColor

func FilterForColor(m NodeUsage) []k8s.Node

func FilterForLabel

func FilterForLabel(m NodeUsage) []k8s.Node

func FilterForNode

func FilterForNode(m NodeUsage) []k8s.Node

func GetBar

func GetBar(decider float64) progress.Model

func MetricsHandler

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

func PrintDesign

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

func RightMetric

func RightMetric(m NodeUsage, index int) float32

func SortByHandler

func SortByHandler(m NodeUsage)

Types

type NodeUsage

type NodeUsage struct {
	ClusterInfo k8s.Cluster
	Nodestats   []k8s.Node
	Args        *utils.Inputs
	Format      string
	// contains filtered or unexported fields
}

nodeusage is the Bubble Tea model.

func NewNodeUsage

func NewNodeUsage(args *utils.Inputs) NodeUsage

NewNodeUsage creates a new NodeUsage model

func (NodeUsage) Init

func (m NodeUsage) Init() tea.Cmd

Init Bubble Tea nodeusage

func (NodeUsage) Update

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

Update method for Bubble Tea - for constant update loop

func (NodeUsage) View

func (m NodeUsage) View() string

View renders bubble tea

Jump to

Keyboard shortcuts

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