Documentation
¶
Index ¶
- Constants
- Variables
- func GetStacksHelpContent() []helpview.HelpCategory
- type ChartJumpMsg
- 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) HasActiveFilter() bool
- func (m *Model) HasErrors() bool
- func (m *Model) HelpContent() []helpview.HelpCategory
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsSearching() bool
- func (m *Model) LoadStacksCmd(nodeID string) tea.Cmd
- func (m *Model) Name() string
- func (m *Model) OnEnter() tea.Cmd
- func (m *Model) OnExit() tea.Cmd
- func (m *Model) ShortHelpItems() []helpbar.HelpEntry
- func (m *Model) Update(msg tea.Msg) tea.Cmd
- func (m *Model) View() string
- type Msg
- type PollRetryMsg
- type RefreshErrorMsg
- type RemoveErrorMsg
- type SortField
- type SpinnerTickMsg
- type StackDeleteIntentMsg
- type StackTasksLoadedMsg
- type TickMsg
Constants ¶
const ViewName = "stacks"
Variables ¶
var PollInterval = 5 * time.Second
PollInterval is how often the view re-reads its resource. It is a var, not a const, so tests can shrink it: a tea.Tick cmd invoked synchronously blocks for the full interval, so a test that runs one to see what it scheduled would otherwise sit here for five seconds.
Functions ¶
func GetStacksHelpContent ¶
func GetStacksHelpContent() []helpview.HelpCategory
GetStacksHelpContent returns categorized help for the stacks view
Types ¶
type ChartJumpMsg ¶ added in v1.14.0
ChartJumpMsg carries the result of checking, when "g" is pressed, whether the selected stack belongs to a chart release. ChartRelease is non-empty when it does, and the view then navigates to the charts browser on that release.
type Model ¶
type Model struct {
List filterlist.FilterableList[docker.StackEntry]
Visible bool
DelayInitialLoad bool // when true, delay the first LoadStacksCmd by 3s
// contains filtered or unexported fields
}
func (*Model) ApplySearchQuery ¶
ApplySearchQuery sets the filter query and applies it.
func (*Model) CapturesInput ¶
CapturesInput reports whether the view is currently capturing all keyboard input.
func (*Model) ClearSearchQuery ¶
func (m *Model) ClearSearchQuery()
ClearSearchQuery clears the filter query and resets the view.
func (*Model) FrameContent ¶
func (*Model) FrameFooter ¶
FrameFooter shows an in-flight deploy in place of the row counter: `docker stack deploy` blocks with no output of its own, so without this a slow deploy and a hung one look identical.
func (*Model) FrameHeader ¶
func (*Model) FrameTitle ¶
func (*Model) HasActiveFilter ¶
func (*Model) HelpContent ¶ added in v1.14.0
func (m *Model) HelpContent() []helpview.HelpCategory
HelpContent implements the app's optional help-screen contract: "?" is handled centrally, and a view carrying its own screen supplies it here.
func (*Model) IsSearching ¶
IsSearching reports whether the list is currently in search mode.
func (*Model) OnEnter ¶
OnEnter re-arms the animation tick when a deploy is still running, so navigating away and back does not leave a frozen spinner in the footer.
func (*Model) ShortHelpItems ¶
type PollRetryMsg ¶
type PollRetryMsg struct{}
PollRetryMsg signals that polling found no changes; the Update handler should schedule the next tick.
type RefreshErrorMsg ¶
type RefreshErrorMsg struct {
Err error
}
type RemoveErrorMsg ¶
RemoveErrorMsg is sent when stack removal fails
type SpinnerTickMsg ¶
SpinnerTickMsg drives the deploy spinner and the toast expiry.
type StackDeleteIntentMsg ¶
StackDeleteIntentMsg carries the result of checking, when a stack delete is requested, whether that stack belongs to a chart release. ChartRelease is non-empty when it does, so the confirm dialog can warn before removal.
type StackTasksLoadedMsg ¶
StackTasksLoadedMsg is sent when tasks for a stack are loaded