Documentation
¶
Overview ¶
Package podlogs demonstrates Streamed data: a pod's log, read the way the Kubernetes API offers it — a tail, then a follow, and nothing else. There is no pagination and no offset, so it goes in a pkg/logview, with pkg/resume keeping reconnects exact (CLAUDE.md rule 34).
The fake kubelet here behaves like the real one where it matters:
- It writes four lines a second, and "since" is truncated to the second, so a naive reconnect repeats up to three lines. resume.Tracker remembers how many it saw in the last second and drops exactly those.
- The connection drops every 20 seconds. Each reconnect is marked in the log — lines written while it was down are fetched, but anything the kubelet rotated away in the meantime would be lost silently, and nothing can tell, so the marker says so rather than guessing.
- The container restarts every 100 seconds. Follow ends with it; the new container's lines continue after a marker, and P opens the previous run on its own, never interleaved.
- Only the newest minute (240 lines) is retained. O loads older lines by asking for a longer tail — which re-sends every newer line, so it is a key you press, never something scrolling does — until the start is reached.
Index ¶
- func New(t theme.Theme) screen.Screen
- type Screen
- func (s *Screen) Help() []key.Binding
- func (s *Screen) HelpSections() []help.Section
- 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) HelpSections ¶
func (*Screen) IsCapturingKeys ¶
Click to show internal directories.
Click to hide internal directories.