Documentation
¶
Index ¶
- Constants
- Variables
- func GetNodesHelpContent() []helpview.HelpCategory
- type AddLabelErrorMsg
- type AddLabelSuccessMsg
- type DemoteErrorMsg
- type DemoteSuccessMsg
- 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) LoadNodesCmd() tea.Cmd
- func (m *Model) Name() string
- func (m *Model) OnEnter() tea.Cmd
- func (m *Model) OnExit() tea.Cmd
- func (m *Model) SetContent(msg Msg)
- 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 PromoteErrorMsg
- type PromoteSuccessMsg
- type RemoveErrorMsg
- type RemoveLabelErrorMsg
- type RemoveLabelSuccessMsg
- type RemoveSuccessMsg
- type SetAvailabilityErrorMsg
- type SetAvailabilitySuccessMsg
- type SortField
- type TickMsg
Constants ¶
const ViewName = "nodes"
Variables ¶
var PollInterval = 5 * time.Second
Poll interval for checking node changes 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 GetNodesHelpContent ¶
func GetNodesHelpContent() []helpview.HelpCategory
GetNodesHelpContent returns categorized help for the nodes view
Types ¶
type AddLabelErrorMsg ¶
AddLabelErrorMsg reports an error occurred while adding a node label.
type AddLabelSuccessMsg ¶
type AddLabelSuccessMsg struct{}
AddLabelSuccessMsg indicates a label was successfully added to a node.
type DemoteErrorMsg ¶
DemoteErrorMsg reports an error occurred while attempting to demote a node.
type DemoteSuccessMsg ¶
type DemoteSuccessMsg struct{}
DemoteSuccessMsg indicates a node was successfully demoted.
type Model ¶
type Model struct {
List filterlist.FilterableList[docker.NodeEntry]
Visible bool
// 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 ¶
func (*Model) FrameHeader ¶
func (*Model) FrameTitle ¶
func (*Model) HasActiveFilter ¶
HasActiveFilter reports whether a filter query is active.
func (*Model) HelpContent ¶
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) LoadNodesCmd ¶
func (*Model) SetContent ¶
func (*Model) ShortHelpItems ¶
type PollRetryMsg ¶
type PollRetryMsg struct{}
PollRetryMsg signals that polling found no changes; the Update handler should schedule the next tick.
type PromoteErrorMsg ¶
PromoteErrorMsg reports an error occurred while attempting to promote a node.
type PromoteSuccessMsg ¶
type PromoteSuccessMsg struct{}
PromoteSuccessMsg indicates a node was successfully promoted.
type RemoveErrorMsg ¶
RemoveErrorMsg reports an error occurred while attempting to remove a node.
type RemoveLabelErrorMsg ¶
RemoveLabelErrorMsg reports an error occurred while removing a node label.
type RemoveLabelSuccessMsg ¶
type RemoveLabelSuccessMsg struct{}
RemoveLabelSuccessMsg indicates a label was successfully removed from a node.
type RemoveSuccessMsg ¶
type RemoveSuccessMsg struct{}
RemoveSuccessMsg indicates a node was successfully removed.
type SetAvailabilityErrorMsg ¶
SetAvailabilityErrorMsg reports an error occurred while setting node availability.
type SetAvailabilitySuccessMsg ¶
type SetAvailabilitySuccessMsg struct{}
SetAvailabilitySuccessMsg indicates node availability was successfully changed.