liveops

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 31 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package liveops is the live-data showcase: everything that changes while you watch, on one screen, so a change that breaks an older feature shows up where you can see it.

┌ applications ──────────────────────┐┌ workloads ─────────────────────┐
│ demoapi over HTTP: per-row         ││ pkg/metrics: Ratio, Badge,     │
│ activity, marking, the verbs       ││ Bar, Spark                     │
└────────────────────────────────────┘└────────────────────────────────┘
┌ events ──────────────────────────────────────────────────────────────┐
│ what each poll changed, searchable                                   │
└──────────────────────────────────────────────────────────────────────┘

What it exercises:

  • One pkg/poll drives every pane (rule 24): each tick fetches the applications from demoapi and advances the workloads. Both tables swap their rows by key, so the cursor stays on its row while the order moves under it. The verbs on the workloads and events panes pause and resume the poll, refresh now, and change its cadence.
  • Loading (rule 17): every pane shows its spinner until its first data lands, and "Reload" on the workloads pane clears it and shows it again.
  • Row activity (rule 33) on the applications, against an API shaped like Argo CD. The server is the source of truth: rows spin because the server says so (demoapi schedules syncs of its own every few seconds), and when the user starts work the row is told at once. One decision per verb — who knows when the work ends: Sync is Observed (the POST answers at once; the phase says when it ends). Refresh is Held (a GET that blocks until reconciled and shows nothing meanwhile). Sync and follow is Held on a job handle it streams. Quick sync ends between two polls and is reported with UnobservedMsg. Fail a sync shows the failure path, and Sync (dropped) a job that was accepted and never ran.
  • Reads that fail are reported once, and the title carries "reads failing" beside "refreshed Ns ago", which keeps counting.
  • pkg/metrics' inline primitives in table cells, coloured with foreground-only escapes so the selected row's background runs through them (rule 19).
  • A capped, searchable logview fed by what changed (rule 13).
  • focus.Group over the three panes; keys go to the focused pane, the mouse and everything else to all of them (rule 6).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(t theme.Theme) screen.Screen

New returns the live-ops screen.

Types

type Screen

type Screen struct {
	// contains filtered or unexported fields
}

func (*Screen) Actions

func (s *Screen) Actions() action.Set

Actions satisfies action.Provider: the application verbs on the applications, and the poll's on the other two panes.

func (*Screen) Help

func (s *Screen) Help() []key.Binding

func (*Screen) HelpSections

func (s *Screen) HelpSections() []help.Section

func (*Screen) Init

func (s *Screen) Init() tea.Cmd

func (*Screen) IsCapturingKeys

func (s *Screen) IsCapturingKeys() bool

func (*Screen) Layout

func (s *Screen) Layout() layout.Node

func (*Screen) OnEnter

func (s *Screen) OnEnter(any) tea.Cmd

func (*Screen) SetTheme

func (s *Screen) SetTheme(t theme.Theme)

func (*Screen) Title

func (s *Screen) Title() string

func (*Screen) Update

func (s *Screen) Update(msg tea.Msg) (screen.Screen, tea.Cmd)

Jump to

Keyboard shortcuts

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