nodesview

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: 20 Imported by: 0

Documentation

Index

Constants

View Source
const PollInterval = 5 * time.Second

Poll interval for checking node changes

View Source
const ViewName = "nodes"

Variables

This section is empty.

Functions

func GetNodesHelpContent

func GetNodesHelpContent() []helpview.HelpCategory

GetNodesHelpContent returns categorized help for the nodes view

Types

type AddLabelErrorMsg

type AddLabelErrorMsg struct {
	NodeID string
	Error  error
}

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

type DemoteErrorMsg struct {
	NodeID string
	Error  error
}

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 New

func New(width, height int) *Model

func (*Model) ApplySearchQuery

func (m *Model) ApplySearchQuery(query string)

ApplySearchQuery sets the filter query and applies it.

func (*Model) CapturesInput

func (m *Model) CapturesInput() bool

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 (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) HasActiveFilter

func (m *Model) HasActiveFilter() bool

HasActiveFilter reports whether a filter query 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 reports whether the list is currently in search mode.

func (*Model) LoadNodesCmd

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

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(msg Msg)

func (*Model) ShortHelpItems

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

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

type Msg

type Msg struct {
	Entries []docker.NodeEntry
}

type PollRetryMsg

type PollRetryMsg struct{}

PollRetryMsg signals that polling found no changes; the Update handler should schedule the next tick.

type PromoteErrorMsg

type PromoteErrorMsg struct {
	NodeID string
	Error  error
}

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

type RemoveErrorMsg struct {
	NodeID string
	Error  error
}

RemoveErrorMsg reports an error occurred while attempting to remove a node.

type RemoveLabelErrorMsg

type RemoveLabelErrorMsg struct {
	NodeID string
	Error  error
}

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

type SetAvailabilityErrorMsg struct {
	NodeID string
	Error  error
}

SetAvailabilityErrorMsg reports an error occurred while setting node availability.

type SetAvailabilitySuccessMsg

type SetAvailabilitySuccessMsg struct{}

SetAvailabilitySuccessMsg indicates node availability was successfully changed.

type SortField

type SortField int
const (
	SortByHostname SortField = iota
	SortByState
	SortByAvailability
	SortByRole
	SortByVersion
	SortByAddress
	SortByLabels
)

type TickMsg

type TickMsg time.Time

TickMsg triggers periodic node list check

Jump to

Keyboard shortcuts

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