Documentation
¶
Overview ¶
Package metrics demonstrates pkg/metrics inline primitives — Badge, Ratio, Bar, Spark — composed into a polled deployments table. Each row shows a deployment with its replica ratio, pod-status badge, CPU bar, and a 12-sample CPU sparkline. The data ticks every 2s; pkg/poll + SetKeyedRows keep the cursor pinned to the same deployment ID across every refresh.
Demonstrates: Badge for state breakdowns, Ratio for "N of M", Bar for utilization, Spark for short history. The history buffer is owned by this screen — pkg/metrics is rendering-only, so each tick the screen rolls the buffer (drop oldest, append newest) and re-renders.
Index ¶
- func New(t theme.Theme) screen.Screen
- type Screen
- func (s *Screen) Help() []key.Binding
- func (s *Screen) Init() tea.Cmd
- func (s *Screen) IsCapturingKeys() bool
- func (s *Screen) Layout() layout.Node
- func (s *Screen) OnEnter(any) tea.Cmd
- func (s *Screen) SetTheme(t theme.Theme)
- func (s *Screen) Title() string
- func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
func (*Screen) IsCapturingKeys ¶
Click to show internal directories.
Click to hide internal directories.