Documentation
¶
Overview ¶
Package hosts provides the hosts list component displaying Zabbix hosts.
Index ¶
- type Model
- func (m Model) FilteredCount() int
- func (m Model) Init() tea.Cmd
- func (m Model) ItemCount() (total, filtered int)
- func (m Model) Selected() *zabbix.Host
- func (m Model) SelectedIndex() int
- func (m *Model) SetHosts(hosts []zabbix.Host)
- func (m *Model) SetStyles(styles *theme.Styles)
- func (m *Model) SetTextFilter(filter string)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
Model represents the hosts list component.
func (Model) FilteredCount ¶
FilteredCount returns the number of filtered items.
func (Model) Selected ¶
Selected returns the currently selected host. Returns a pointer to the element in the filtered slice. The pointer remains valid until the next call to SetHosts or filter changes. Callers should not store this pointer long-term.
func (Model) SelectedIndex ¶
SelectedIndex returns the index of the selected host in the original list.
func (*Model) SetStyles ¶ added in v0.5.0
SetStyles updates the component's styles (for runtime theme changes).
func (*Model) SetTextFilter ¶
SetTextFilter sets the text filter.
Click to show internal directories.
Click to hide internal directories.