Documentation
¶
Index ¶
- Constants
- func HandleKey(m *Model, k tea.KeyMsg) tea.Cmd
- type HideStoppedToggledMsg
- type InitStreamMsg
- type LineMsg
- type Model
- func (m *Model) ApplySearchQuery(query string)
- func (m *Model) CapturesInput() bool
- func (m *Model) ClearSearchQuery()
- func (m *Model) FrameContent() string
- func (m *Model) FrameFooter() string
- func (m *Model) FrameHeader() string
- func (m *Model) FrameTitle() string
- func (m *Model) GetNodeSelectVisible() bool
- func (m *Model) GetSearchMode() bool
- func (m *Model) HasActiveFilter() bool
- func (m *Model) HasErrors() bool
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsSearching() bool
- func (m *Model) Name() string
- func (m *Model) OnEnter() tea.Cmd
- func (m *Model) OnExit() tea.Cmd
- func (m *Model) SetContent(content string)
- func (m *Model) ShortHelpItems() []helpbar.HelpEntry
- func (m *Model) StopStreamingCmd() tea.Cmd
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) View() string
- type NodeFilterToggledMsg
- type StreamDoneMsg
- type StreamErrMsg
- type WrapToggledMsg
Constants ¶
const ViewName = "logs"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HideStoppedToggledMsg ¶
type HideStoppedToggledMsg struct{}
type InitStreamMsg ¶
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 ¶
ApplySearchQuery implements view.Filterable — sets the app-level "/" filter.
func (*Model) CapturesInput ¶
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 (*Model) FrameFooter ¶
func (*Model) FrameHeader ¶
func (*Model) FrameTitle ¶
func (*Model) GetNodeSelectVisible ¶
func (*Model) GetSearchMode ¶
GetSearchMode is exported for app to check search mode status
func (*Model) HasActiveFilter ¶
HasActiveFilter returns true when the app-level "/" filter is active.
func (*Model) IsSearching ¶
IsSearching is an alias for GetSearchMode for compatibility with app-level search checks
func (*Model) SetContent ¶
func (*Model) ShortHelpItems ¶
ShortHelpItems stays compatible with your helpbar interface.
func (*Model) StopStreamingCmd ¶
StopStreamingCmd returns a cmd that cancels the streaming context (if set on model). Use this to stop the docker log stream (kills follow).
type NodeFilterToggledMsg ¶
type NodeFilterToggledMsg struct{}
type StreamDoneMsg ¶
type StreamDoneMsg struct{}
type StreamErrMsg ¶
type StreamErrMsg struct {
Err error
}
type WrapToggledMsg ¶
type WrapToggledMsg struct{}