logsview

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ViewName = "logs"

Variables

This section is empty.

Functions

func HandleKey

func HandleKey(m *Model, k tea.KeyMsg) tea.Cmd

Types

type HideStoppedToggledMsg

type HideStoppedToggledMsg struct{}

type InitStreamMsg

type InitStreamMsg struct {
	Lines    chan string
	Errs     chan error
	MaxLines int
}

type LineMsg

type LineMsg struct {
	Line string
}

type Model

type Model struct {
	Visible bool

	MaxLines int

	ServiceEntry docker.ServiceEntry

	// streaming control
	StreamCtx    context.Context
	StreamCancel context.CancelFunc // cancel context for streaming goroutine
	// contains filtered or unexported fields
}

Model holds the state for the streaming logs view.

func New

func New(width, height int, maxLines int, service docker.ServiceEntry) *Model

New creates a logs model with sensible defaults.

func (*Model) ApplySearchQuery

func (m *Model) ApplySearchQuery(query string)

ApplySearchQuery implements view.Filterable — sets the app-level "/" filter.

func (*Model) CapturesInput

func (m *Model) CapturesInput() bool

CapturesInput returns true when the view is capturing all keyboard input.

func (*Model) ClearSearchQuery

func (m *Model) ClearSearchQuery()

ClearSearchQuery implements view.Filterable — clears the app-level "/" filter.

func (*Model) FrameContent

func (m *Model) FrameContent() string

func (*Model) FrameFooter

func (m *Model) FrameFooter() string

func (*Model) FrameHeader

func (m *Model) FrameHeader() string

func (*Model) FrameTitle

func (m *Model) FrameTitle() string

func (*Model) GetNodeSelectVisible

func (m *Model) GetNodeSelectVisible() bool

func (*Model) GetSearchMode

func (m *Model) GetSearchMode() bool

GetSearchMode is exported for app to check search mode status

func (*Model) HasActiveFilter

func (m *Model) HasActiveFilter() bool

HasActiveFilter returns true when the app-level "/" filter is active.

func (*Model) HasErrors

func (m *Model) HasErrors() bool

func (*Model) Init

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

func (*Model) IsSearching

func (m *Model) IsSearching() bool

IsSearching is an alias for GetSearchMode for compatibility with app-level search checks

func (*Model) Name

func (m *Model) Name() string

func (*Model) OnEnter

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

func (*Model) OnExit

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

func (*Model) SetContent

func (m *Model) SetContent(content string)

func (*Model) ShortHelpItems

func (m *Model) ShortHelpItems() []helpbar.HelpEntry

ShortHelpItems stays compatible with your helpbar interface.

func (*Model) StopStreamingCmd

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

StopStreamingCmd returns a cmd that cancels the streaming context (if set on model). Use this to stop the docker log stream (kills follow).

func (*Model) Update

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

Update processes Tea messages.

func (*Model) View

func (m *Model) View() string

type NodeFilterToggledMsg

type NodeFilterToggledMsg struct{}

type StreamDoneMsg

type StreamDoneMsg struct{}

type StreamErrMsg

type StreamErrMsg struct {
	Err error
}

type WrapToggledMsg

type WrapToggledMsg struct{}

Jump to

Keyboard shortcuts

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