logtail

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package logtail displays streamed logs and handles tail-session input.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtraAction

type ExtraAction struct {
	Binding key.Binding
	Run     func(context.Context) (string, error)
}

ExtraAction is a caller-supplied action that runs without closing the tail view.

type LogLineMsg

type LogLineMsg cluster.LogLine

type Model

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

Model displays streamed logs and handles tail-session input.

func New

func New(ctx context.Context, canReload bool, extras []ExtraAction) *Model

New creates a log-tail model.

func (*Model) Canceled

func (m *Model) Canceled() bool

Canceled reports that the user interrupted with Ctrl+C.

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Purge

func (m *Model) Purge() bool

Purge reports whether the requested reload should purge state first.

func (*Model) Reload

func (m *Model) Reload() bool

Reload reports whether the user requested a reload.

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

type ReloadKeys

type ReloadKeys struct {
	Reload      key.Binding
	PurgeReload key.Binding
}

ReloadKeys contains the reload bindings shared by the picker and tail view.

func DefaultReloadKeys

func DefaultReloadKeys() ReloadKeys

DefaultReloadKeys returns the default reload bindings.

func (ReloadKeys) WithEnabled

func (k ReloadKeys) WithEnabled(enabled bool) ReloadKeys

WithEnabled sets whether both bindings match input and appear in help.

type StreamEndedMsg

type StreamEndedMsg struct{ Err error }

StreamEndedMsg reports that the log stream ended.

Jump to

Keyboard shortcuts

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