stacksview

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

Documentation

Index

Constants

View Source
const PollInterval = 5 * time.Second
View Source
const ViewName = "stacks"

Variables

This section is empty.

Functions

func GetStacksHelpContent

func GetStacksHelpContent() []helpview.HelpCategory

GetStacksHelpContent returns categorized help for the stacks view

Types

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 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

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 (m *Model) FrameHeader() string

func (*Model) FrameTitle

func (m *Model) FrameTitle() string

func (*Model) HasActiveFilter

func (m *Model) HasActiveFilter() bool

func (*Model) HasErrors

func (m *Model) HasErrors() bool

HasErrors returns true if any stack has errors

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) LoadStacksCmd

func (m *Model) LoadStacksCmd(nodeID string) tea.Cmd

func (*Model) Name

func (m *Model) Name() string

func (*Model) OnEnter

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

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) OnExit

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

func (*Model) ShortHelpItems

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

func (*Model) Update

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

Update handles all messages for the stacks view.

func (*Model) View

func (m *Model) View() string

type Msg

type Msg struct {
	NodeID string
	Stacks []docker.StackEntry
	Err    error
}

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

type RemoveErrorMsg struct {
	StackName string
	Error     error
}

RemoveErrorMsg is sent when stack removal fails

type SortField

type SortField int
const (
	SortByName SortField = iota
	SortByServices
	SortByTasks
	SortByError
)

type SpinnerTickMsg

type SpinnerTickMsg time.Time

SpinnerTickMsg drives the deploy spinner and the toast expiry.

type StackDeleteIntentMsg

type StackDeleteIntentMsg struct {
	StackName    string
	ChartRelease string
}

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

type StackTasksLoadedMsg struct {
	StackName string
	Tasks     []docker.TaskEntry
	Error     error
}

StackTasksLoadedMsg is sent when tasks for a stack are loaded

type TickMsg

type TickMsg time.Time

Jump to

Keyboard shortcuts

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